<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Erlang Devs,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I have a procces in machine M1 which receives 
requests to run a state machine which I called "service". </FONT></DIV>
<DIV><FONT face=Arial size=2>N clients send a request to machine M1 to 
execute the service.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>From the Erlang point of view, is it a good design 
to have a process for each client request (N processes) ?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Viewing it from another way, the service has the 
same code (logic) for each client but different instances for each client 
(the states).</FONT></DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2>It'd be harder to implement but </FONT><FONT 
face=Arial size=2>I don't know how Erlang manages the N processes (N same 
execution routines) in memory when a huge number of processes are 
running.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I'd greatly appreciate some feedback about 
this.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2>Eduardo Figoli</FONT></DIV>
<DIV><FONT face=Arial size=2>INswitch solutions</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV></BODY></HTML>