Skip to content

lattenwald/highloadcup.ru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Round1

This is a solution for highloadcup.ru.

Technology

I am using Elixir. Not actually using there Elixir-specific stuff, so you could say it's just Erlang.

Data is stored in ets, there's some data redundancy to avoid :ets.selects, which are too slow. No extra caching or any hardcore optimizations.

elli is doing all the serving; JSON is done with jiffy.

Building image

Ubuntu

% docker build -f Dockerfile-ubuntu -t round1_ubuntu --build-arg bust="`date`" .

Alpine, you guessed right

% docker build -f Dockerfile-alpine -t round1_alpine --build-arg bust="`date`" .

bust argument is for bumping image, you can safely omit it if code actually changed.

Running image

First checkout the repo, go to TRAIN or FULL data (i.e., hlcupdocs/data/TRAIN/data) and create an archive

% zip data *json

Then you are set to go

% docker run -p 8080:80 -v /path/to/hlcupdocs/data/TRAIN/data/:/tmp/data/ -t round1_alpine

Replace path and tag with appropriate values.

Caveats

Alpine image doesn't work at highloadcup.ru.

About

Solution for highloadcup.ru contest

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published