All Projects → matpalm → median

matpalm / median

Licence: other
erlang experiment in distributed median finding

Programming Languages

erlang
1774 projects
ruby
36898 projects - #4 most used programming language
shell
77523 projects
finding the median of a trillion numbers
http://matpalm.com/median
see above page for walkthrough, basic instructions follow
 
-----------------
generate a list of (approx) 1000 numbers whose min is 1, max is 100 and median is 40
spread this across 4 files; numbers.0, numbers.1, numbers.2, numbers.3

bash> ./generate_test_data.rb 1 40 100 1000 > numbers.all
bash> cat numbers.all | ./spread_across_files.rb numbers 4

-----------------
run ruby version

bash> ./median.rb < numbers.all

-----------------
run erlang single process version

bash> erl -noshell -run median from_file numbers.all

-----------------
run erlang multiple process version (all processes on local machine) using full list impl

bash> erl -noshell -sname bob -run controller init worker numbers.[0-3]

-----------------
run erlang multiple process version (all processes on local machine) using list freq impl

bash> erl -noshell -run generate_binary_dicts main numbers.all numbers.dict 4
bash> erl -noshell -sname bob -run controller init worker_freq numbers.dict.[0-3]
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].