[erlang-questions] : : sctp_peeloff() support in OTP

Valentin Micic v@REDACTED
Tue Apr 21 17:58:47 CEST 2009


>> implementing it without defeating the purpose behind SCTP?

> Could you elaborate...?

Let me try by saying that TCP was not adequate for "multiplexing", a traffic
case where a bunch of things on one machine wants to talk to a bunch of
things on another using the same connection. The SCTP addressed this issue
on a number of levels, but most importantly -- by eliminating a head-of-line
blocking bottleneck (someone mentioned a year or two ago that SCTP would be
far better protocol for Erlang distribution).

The reasoning behind SCTP is to provide for a minimal latency, where
processing of one stream should not create a processing delay on another.
Having the same port owner responsible for all the processing is at odds
with this design goal. In other words, {active, once} would effectively
reintroduce head-of-line blocking, by serializing all the traffic and
forcing it through a single process.

Not so well thought through approach to active socket processing:
-----------------------------------------------------------------
Maybe one may mitigate this by creating a number of Erlang processes as
there are streams (call it stream processors), and route upstream traffic to
a particular stream processor? Then, if there is an "external process"
requesting {active, [once|true, StramNo, PID]} that relationship may be
remembered by that particular "stream processor". The stream processor may
also be responsible for queuing, etc. If there no "external process",
requesting the traffic, it may be routed to the port-owner...

Down-stream traffic may always be forced through port-owner, thus avoiding
port locking problems (See below).

 +-------------------------------+
 |   +-----------+               |
 |   |           |               |
 V   V           |               |
+-----+  	   +--+            +--+
|Owner| <--+   |P1|<----+      |Pn|<------+
+-----+    |   +--+     |      +--+       |
 |         |            |                 |
 |         |            |                 |
 |     +----------+ +----------+ +----------+ 
 |     |StrmProc#1| |StrmProc#2| |StrmProc#n|
 |     +----------+ +----------+ +----------+
 |       A               A             A
 V       |               |             |
+-----------+            |             |
|Port Driver|============+-------------+
+-----------+

Where:
 Owner      - Port Owner
 StrmProc#n - Stream Processor n
 Pn         - External Process n

Kind Regards,
V.




More information about the erlang-questions mailing list