[erlang-questions] On selective receive (Re: eep: multiple patterns)

Vlad Dumitrescu <>
Wed Jun 4 09:06:41 CEST 2008


On Wed, Jun 4, 2008 at 8:46 AM, Andreas Hillqvist <
> wrote:

>
> What if it would be possible to create Message Queues in addition to
> process "default" Message Queue?
>
> How would you send messages? Something like
    {Pid, Queue} ! Message
?

Since the sender will have to know which queue to send to, this is no
different than having a cluster of processes that cooperate (from the
client's point of view). Possibly it would be somewhat easier to code the
server, but it could get hairy too...

Maybe if this would be combined with Richard O'Keefe's suggestion for
filtered receive statements: each queue has a filter and messages are
automagically added to the right queue (by the runtime), without the client
having to care about this implementation detail... But then the server
process must juggle with the different queues anyway and my first impression
is that it won't get easier to understand what's happening.

Personally, I would rather have some kind of framework that would help
manage the cluster of processes mentioned above. I feel it would be much
easier to get right and debug.

regards,
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080604/5361f2b8/attachment.html>


More information about the erlang-questions mailing list