This is a solution for highloadcup.ru.
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.select
s, which are too slow. No extra caching or any hardcore optimizations.
elli is doing all the serving; JSON is done with jiffy.
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.
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.
Alpine image doesn't work at highloadcup.ru.