This is just a small repo where is play with erlang ;) I used Rebar to work with application and mochiweb mochijson2 module to play with json. It's my first erlang project.
- Added better error handling
- Build client module
- Write better tests for application
- Refactor init module to reflect better OTP patterns
- Move blocking accept to other module with own nonblocking start / spawn
- Add spawn_links to client workers.
- Write some docs
- Add DETS server with disk copy of inmemory data, just to simulate some safe :D
- Refactor application to be able to work with multiple key-val storages ( change api, error , message handling )
- compile
rebar compile
- compile and run tests
rebar compile eunit
Ways of handling multiple storages:
a) add call that creates new directory { create, storage_name } -> ...
b) add them on the fly if someone requests { set , storage_name, key, val } -> ...
different types of tables set, bag, ordered_set
compile and run it using ebin/run.sh or in erlang shell application:start(boobshake).
then open telnet 127.0.0.1 3666 and start json talk
eg.
{"peek":"name"}
-> ["error","No such value"]
{"set":{"name":"kuba"}}
-> ["ok","value added"]
{"peek":"name"}
-> ["ok", "kuba"]
Application now can only "set" value and "peek"
Thanks to mochiweb team for json module :). Thanks guys, just borrowed it :> and Spec'u for saying i should aim more for Ocaml then Erlang and whole Static vs Dynamic typing conversation.