Efficient Erlang Port Driver

I want to create Erlang processes that will interact with a C program through a port driver.

As spawning many of these processes can be inefficient, can I create one Erlang process that receives messages and queues these messages for processing using C program?

How will this C program begin to wait for incoming tasks, will it be blocked?

What is the best strategy / architecture?

Thanks!

+6
c erlang system distributed
source share
1 answer

Yes, usually you have one process that is connected to the port through which traffic passes. For a reasonable description of ports and how to use them, read the Erlang User Guide Interaction Interaction Guide . He explains the various types of ports and their properties.

In general, the documentation at http://www.erlang.org is good and worth reading.

+4
source share

All Articles