Design phase in Erlang
Thu Dec 5 21:34:46 CET 2002
The following documents could give you the picture of Erlang process
creation and message passing cost in comparison with other languages:
erlang> I have a procces in machine M1 which receives requests to run a state machine which I called "service".
erlang> N clients send a request to machine M1 to execute the service.
erlang> >From the Erlang point of view, is it a good design to have a process for each client request (N processes) ?
erlang> Viewing it from another way, the service has the same code (logic) for each client but different instances for each client (the states).
erlang> Though, could be better to have those states for every client saved in some kind of structure and use the same code for every client by messages and recursion usage ( only 1 process) ? N times reentrant code vs N processes.
erlang> It'd be harder to implement but I don't know how Erlang manages the N processes (N same execution routines) in memory when a huge number of processes are running.
erlang> I'd greatly appreciate some feedback about this.
erlang> Eduardo Figoli
erlang> INswitch solutions
More information about the erlang-questions