In One major difference - ZeroMQ and Erlang author mentions briefly "request as a process" idea. I'm new to Erlang and I'd like to see an example or an article how to do it.
Any resource or hint will be highly appreciated.
In One major difference - ZeroMQ and Erlang author mentions briefly "request as a process" idea. I'm new to Erlang and I'd like to see an example or an article how to do it.
Any resource or hint will be highly appreciated.
I am a newbie too but to me the idea seems simple. For each request, whatever it is, spawn a new process and let it handle the request. That is all. This guy talks about that too: http://vimeo.com/19806728
So my understanding is that when you receive a request, you spawn a process by calling
spawn(Module, Name, Args)
, or another variant of this function (see http://www.erlang.org/doc/reference_manual/processes.html) and pass the request data in theArgs
list.Module
andName
identify a function that is executed when the process starts and that deals with theArgs
.