10. # rebar -c
clean Clean
compile Compile sources
create template= [var=foo,...] Create skel based on template and vars
create-app [appid=myapp] Create simple app skel
create-node [nodeid=mynode] Create simple node skel
list-templates List available templates
doc Generate Erlang program documentation
check-deps Display to be fetched dependencies
get-deps Fetch dependencies
update-deps Update fetched dependencies
delete-deps Delete fetched dependencies
list-deps List dependencies
generate [dump_spec=0/1] Build release with reltool
generate-upgrade previous_release=path Build an upgrade package
generate-appups previous_release=path Generate appup files
eunit [suite=foo] Run eunit [test/foo_tests.erl] tests
ct [suite=] [case=] Run common_test suites in ./test
xref Run cross reference analysis
help Show the program options
version Show version information
11. Mochiweb
git clone https://github.com/mochi/mochiweb
● Легкий высокопроизводительный HTTP-сервер
● mochijson, mochijson2 – Erlang terms в JSON и обратно
● mochiglobal – эмуляция глобальных переменных
● reloader
● Мелкие полезные утилиты (mochinum, mochilists, etc)
● Есть форк с поддержкой websockets
14. reloader
# erl -pa ebin -s reloader
# vi src/myapp.erl
...
# ./rebar compile
Reloading myapp ... ok.
15. Другие веб-сервера
● YAWS
● misultin (очень похож на mochiweb, но полегче и попроще)
● cowboy (похож на mochiweb и misultin, но использует не
parametrized modules, а callbacks)
16. Riak
git clone https://github.com/basho/riak
● riak_core – фреймворк для создания распределенных систем
● riak_error – ограничение размера error reports
● lager – фрймворк для логирования
● basho_bench – утилита для измерения производительности
● rebar
17. lager
lager:error("oh no!")
lager:warning("~s, ~s and ~s, oh my!", [lions, tigers, bears])
2011-07-19 18:02:02 [error] <0.31.0>@test2:start:8 oh no! 2011-07-19 18:02:02
[warning] <0.31.0>@test2:start:9 lions, tigers and bears, oh my!
2011-07-19 17:51:21 [error] <0.60.0> gen_server crash terminated with reason: no match
of right hand value {} in crash:handle_call/3
2011-07-19 17:51:22 [error] <0.60.0> CRASH REPORT Process crash with 0 neighbours
crashed with reason: no match of right hand value {} in crash:handle_call/3
18. RabbitMQ
● Используется для взаимодействия узлов
распределенных систем
● Persistent messaging
● Полная поддержка протокола AMQP
● Кроссплатформенный
● Клиенты на всех популярных языках
● Используется в продакшне сотнями компаний (включая
Echo и Mochi Media)
gen_bunny – библиотека для удобной работы с RabbitMQ в
эрланге