Using UNIX sockets with Erlang
Scott Lystig Fritchie
Wed Sep 19 00:18:05 CEST 2001
>>>>> "jm" == =?iso-8859-1?q?J=E9r=F4me?= Marant <> writes:
jm> Of course, UNIX sockets don't work on other platforms than UNIX
jm> systems. However, you can always make the API behave differently
jm> with respect to the system it runs on, for instance returning some
jm> special error codes telling that there is no implementation for
jm> the function on that on that system.
Ja, I agree. That argument hasn't had much traction so far, but
perhaps with more public demonstrations may help. :-)
jm> Well, it seems that there is such a driver in the
jm> examples. However, I'd like to see it either as a contrib or as
jm> part of the Erlang release: there is no doubt that it more usefull
jm> than you can imagine.
Our RPC application saw about a 10% throughput improvement (bulk data
transfer) using UNIX domain sockets rather than TCP on the loopback
interface ... and no other code changes, other than changes to pattern
matching to accomodate the driver. That was under FreeBSD. If I did
any of those tests under Linux or Solaris, I don't recall their
>> If you're really, *really* itching to use it, I can try putting
>> the source together into something sortof-useful. Let me know.
jm> So yes, please release it ;-)
The code is nasty ugly. I started by taking the inet driver and
stripping out what wasn't needed by stream-type sockets, which made a
bit of a mess. Not understanding all the details in the
descriptor-process-less driver design introduced in the R7 inet driver
just made things uglier.
I'll see what I can do in my spare time this week. Like I said,
licensing compels us to release it. It's public as-is already, if you
know where to look, but that isn't helpful right now.
More information about the erlang-questions