[erlang-questions] examples for erlang with joins

Hubert Plociniczak hubert.plociniczak@REDACTED
Mon Mar 9 12:51:39 CET 2009

2009/3/9 Valentin Micic <v@REDACTED>

> I'd like to add one more concern: considering operational characteristics
> of
> Erlang VM, I think that adding support for join patterns at such a low
> level
> (i.e. receive...end construct) may cause performance degradation.
> It may be safer (at least at this point) to achieve this as a part of
> post-receive processing, by having some form of, say, correlation context,
> as hinted by Richard. Bad (or IMO good) news is that this would not be part
> of the language syntax.

I tried to give it a go in implementing the joins directly in VM, but it
would take me too much time to get through all the magic that goes in erts.
Instead, I added primitives that allow me to manipulate the mailbox directly
and do all the logic of joins directly in Erlang.
I believe that you won't get performance degradation for standard receive
constructs (i.e. joins with single pattern), or at least the drop should be
However, at the end of the day, the users should have more freedom to do
synchronization on messages (solutions should be more elegant).

The implementation in VM would not be ready to go straight to the standard
VM, it is more of a proof-of-concept that such that thing is useful and
allows me to experiment with joins.
It might be even better to leave the plain old receive construct, and add
join construct that works similarly, but is more powerful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090309/a34b76a5/attachment.htm>

More information about the erlang-questions mailing list