Server handling lots of connections ...

Jérémie Lumbroso jeremie@REDACTED
Sat Apr 22 02:45:08 CEST 2006


Hello,

Just wanted to know, typically, how would you handle a server
 with these methods:

start(Port) -> ...
stop(Port) -> ...

I've seen an astute programmer have the start/1 function create a thread and
register it using the atom created by:

list_to_atom("serverProcess_" ++ integer_to_list(Port)).

However I've also read that creating atoms like that is not good. Is there
something more idiomatic?

I've also thought of using an ETS table that maps a port to a process.

In both cases, there's a look up time—but what is more efficient?

How would you do it?


Also, by the way, does anybody have a good link that introduces how to write
applications that take advantage of several nodes? I know that Erlang
handles this transparently, but what does transparent mean?


My Best Regards,

- Jérémie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060422/cf097744/attachment.htm>


More information about the erlang-questions mailing list