Extending Erlang

Vlad Dumitrescu (EAW) <>
Thu Feb 20 09:10:20 CET 2003


Hi,

I had some thoughts buzzing in my head for the last few days, and I will share them with you - who knows, maybe they are of some interest. I amy also be plain wrong in some assumptions.

I started looking seriously at drivers and how Erlang can be extended. A first impression is that it's unnecessarily complicated. And three different alternatives came up : 

- C-processes; just like C-nodes emulate Erlang nodes, C-processes are Erlang processes look-alikes in more ways than ports: they understand Erlang terms directly, they have a message box. The difference is that they are written in C and run in an OS thread. This *might* make writing C extensions conceptually closer to writing Erlang code.

- Dynamically added BIFs; for library-type functions, like for example advanced math. Current ports feel like too bulky.

- "Inverse plug-in" system; found no better name. What I refer to is that instead of loading drivers into the beam VM, one might embed the VM into an external application. More or less what is done for werl.exe, I think. This one is rather fuzzy even for me, but can it be so that this kind of integration is different than with a pipe driver? Or is it just the same, communication via stdin/stdout?

Comments are welcome. Best regards,
Vlad



More information about the erlang-questions mailing list