RUDP, shared libraries, etc.
Raimo Niskanen
raimo@REDACTED
Tue Mar 29 09:04:36 CEST 2005
Erlang uses poll() instead of select() on platforms where it exists,
and it does not have the 1024 file descriptor limitation of select();
however, the OS itself may limit the number of allowed file descriptors.
You can use "ulimit -n" to change the number of allowed file
descriptors for a shell. On my Solaris 9 machine, I cannot exceed
1024 unless being root, but then it does not stop for at least
524288 (I did not try further). The same applies to Red Hat 9 Linux.
How efficient it is for half a Mega file descriptors I do not know...
UDP has its quirks that gen_udp reflects, e.g message ordering
is not guaranteed. It is not related to Erlang inter-process
communiation at all.
About Erlang as a shared library: the Erlang emulator (Beam)
also needs to be running main(). You might write interface code
in C to dynamically link with the game engine, and communicate
through an Erlang port program. I do not know, I hope someone
else will give a better answer on this point.
joelr1@REDACTED (Joel Reymont) writes:
> Folks,
>
> I'm writing client/server poker software and have a few questions
> regarding Erlang...
>
> Is there a reliable UDP implementation for Erlang? I would like my server
> to support at least 10,000 simultaneous users and it seems that I could
> only do 1024 with gen_tcp due to a Unix select limitation.
>
> This seems like a non-issue with UDP but what's the best way to ensure
> that messages are ordered and positively delivered? The documentation
> states that messages sent from process A to B are indeed ordered but does
> this apply to UDP?
>
> I would like to build the user interface using the Torque Game Engine
> (www.garagegames.com) and it uses a custom main on Windows and Mac OSX
> which makes it very hard to build it into a shared library to be called
> from Erlang. What is the best way to interface with Erlang here? Can I
> make the Erlang runtime and my code into a shared library to be loaded
> into C++?
>
> P.S. I'm using Common Lisp right now
>
> Thanks, Joel
>
> --
> http://wagerlabs.com/tech
>
>
--
/ Raimo Niskanen, Erlang/OTP, Ericsson AB
More information about the erlang-questions
mailing list