2011/09/25

Great time in Kanda, Tokyo: Erlounge

Yesterday (9/23) was a great day that Erlang workshop as a satellite of ICFP/ACM SIGPLAN international conference. Although I did not participated in the workshop, I joined the party because Francesco Cesarini and Ryosuke Nakai said me to join. Seeing living legends in Europe (indeed just community members in Western countries) was very exciting.
I was introduced by Kenji Rikitake (AKA @kenji_rikitake) as an author of MessagePack Erlang port - That made me think I should output more and more to the open source community and the Erlang/OTP community. Until this day I was thinking of stopping reading, writing and saying anything about Erlang/OTP because of baby sitting (many thanks to my wife for helping me work for community and study that does not make money to live along) and some my personal disgust about my work... But their activeness, amount of beers they drunk, the time when the party was finished, speaking English in a positive way and their positive attitude made me think positive to keep in touch with Erlang.
Don't ask permission. Ask for forgiveness.
All thanks to Erlangers who were in Kanda, Tokyo at 2011/9/23.

2011/07/20

Use MessagePack/Erlang and write message queue in an hour

I wrote a toy software within an hour (and additional debug time), which is message queue server accessible from clients with many kind of languages: C, C++, Ruby, Java, Python and so on. Erezrdfh (pronounces "e-re' zerd f") is a simple, on-memory message queue with 9-nines availability of Erlang/OTP. It doesn't need particular client library but users can use MessagePack-RPC to write client in a minute. Ruby one-liner is as follows:
c = MessagePack::RPC::Client.new(host,port); c.call(:push, "name", "message"); c.call(:pop, "name);

and C++ code is like this:
msgpack::rpc::client c(host,port);
c.call("pop", "name", "message").get<bool>();
c.call("pop", "name").get<std::string>();

and Java code is like:
Client c = new Client(host,port);
c.callApply("push", new Object[]{"name","message"});
c.callApply("pop", new Object[]{"name"});

MessagePack is a software suite of serializer, RPC and IDL compiler. This is a great library due to its performance, simplicity and language diversity. Erlang is also a great software that promises scalability, simplicity and solidness. Why don't you miss these great technologies?

Its performance is also so great that I can't believe it is less than of 250 LOC. With my quad-core Phenom machine, load-generation tool and erezrdfh server running in one machine, its performance of push/pop was 20000 qps. Due to Erlang/OTP's scalability if you install on dedicated machine with more cores, erezrdfh will scale more. The source code includes basho_bench driver and just try it!