[erlang-questions] Keeping massive concurrency when interfacing with C
Thu Oct 6 14:59:53 CEST 2011
On Wed, Oct 5, 2011 at 5:55 PM, Alceste Scalas <alceste@REDACTED> wrote:
> In the second case, the future NIF extensions planned by OTP
> folks may be very useful --- see Rickard Green's talk at the SF
> Bay Area Erlang Factory 2011: http://bit.ly/eH61tX
Just watched the video and read the slides of this talk.
This would be perfect to handle more heavyweight numerical library
support. Especially the dirty schedulers look very promising for
Also the native processes which make it easy to run untrusted large
libraries in their own node.
> 1. if the vectors/matrices are "small enough", then the native
> code could be called directly using NIFs;
> 2. otherwise, the operands could be passed to a separate worker
> thread, which will later send back its result to the waiting
> Erlang process (using enif_send()).
This won't be necessary if dirty schedulers are used if you look at slide 25 of
"Example of dirty scheduler use" you can see this two step solution
working with dirty schedulers without sending of messages and other
This is perfect for the numerical libraries.
-- Peer Stritzinger
More information about the erlang-questions