[erlang-questions] UNIX streams and Erlang ports

Ulf Wiger ulf@REDACTED
Sat Feb 3 11:49:53 CET 2007


Den 2007-02-03 03:27:21 skrev Claes Wikstrom <klacke@REDACTED>:

> Robert Virding wrote:
>>
>> "A stream is a full-duplex connection bwtween a user's
>> process and a device or pseudo device. It consists of
>> several linearly connected processing modules, and is
>> analagous to a Shell pipeline, except that data flows
>> in both directions. The modules in a stream communicate
>> almost exclusively by passing messages to thier neighbors. ..."
>>
>> It is a truly elegant concept.
>
>
> Except that it was never implemented efficiently enough,
> thus the port_XXX commands. Our fault. Had we done
> better job 13 years ago, we'd never seen the port_XXX
> commands ... and more


Agreed - except perhaps with the part about you not having
done a good enough job. (:

Ten years ago, when we started building the AXD 301,
we often had to disregard the ideal model and make all sorts
of low-level optimizations. But recall that our task then
was to handle 100 ATM calls/s on a 110 MHz MicroSPARC CPU...
(In truth, we didn't reach that until we plugged in the
enormously fast 400 MHz UltraSPARC CPU.) The big question
was not whether we could stay true to the Erlang model,
but whether we could use Erlang *at all*.

We contributed to the introduction of the port_XXX commands,
because the difference in speed was simply to great to
ignore. Nowadays, we try to "turn back time" and encourage
textbook Erlang, rather than doing lots of low-level
optimizations.

We think that this will pay off especially with SMP Erlang,
so this may be a really good time to resurrect some of the
core concepts.

BR,
Ulf W
-- 
Ulf Wiger



More information about the erlang-questions mailing list