[erlang-questions] Difference between enif_schedule_dirty_nif and driver_async?

Max Lapshin max.lapshin@REDACTED
Mon Jun 23 17:29:11 CEST 2014

On Mon, Jun 23, 2014 at 6:09 PM, Robert Raschke <rtrlists@REDACTED>

> Hi Max,
> since you are already using separate nodes running NIFs, there's probably
> not much worth in converting to a C node or port. So this is just for
> posterity.

Wrong. It will be a very big work to convert to C node.

Right now my data flow is following:

1) 5-8 mbit of data are transferred to separate node
2) they pass through complicated code on erlang that prepares them for
3) then original frame goes to decoder
4) decoder outputs from 100 to 1000 megabits of data
5) then they again go to tricky logic
6) after this huge amount of raw data gets into encoders
7) and again through erlang it gets back, being around 2-4 mbit/s

So erlang has to copy less than 10 mbit here and there. All serious payload
is zerocopies inside one node.

If I change to driver, then I will have to write much more boilerplate
demarshalling code.

If I change to C node or port then I will have to rewrite big amount of
working erlang code in C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140623/fcf98a35/attachment.htm>

More information about the erlang-questions mailing list