[Barrelfish-users] publish/subscribe with send, notify and wait
Tim Harris (RESEARCH)
tharris at microsoft.com
Wed Oct 5 12:15:16 CEST 2011
Hi Lucian,
One other option to consider are the AC primitives for writing message passing programs:
http://research.microsoft.com/en-us/um/people/tharris/papers/2011-oopsla.pdf
Note that the source code uses the name "THC" instead of "AC".
There's a simple example in the source tree in usr/tests/thcidctest. This example shows how to write a client and a server, and the use of the AC-style blocking primitives along with the ASYNC and FINISH constructs for allowing other work to proceed while waiting for a response. The thcidctest example also shows the lines you need in the Hakefile to link with the AC runtime system and to generate the AC stubs from a Flounder interface.
--Tim
-----Original Message-----
From: Simon Peter [mailto:speter at inf.ethz.ch]
Sent: 02 October 2011 20:33
To: Lucian Cojocar
Cc: barrelfish-users at lists.inf.ethz.ch
Subject: Re: [Barrelfish-users] publish/subscribe with send, notify and wait
Hi Lucian,
> I need to implement a publish/subscribe mechanism, i.e. all processes
> that are waiting (are subscribed) for an event will be waken up when a
> condition/event has occurred.
>
> What is the easiest way to do this?
>
> Is there a notify/wait mechanism (server) already implemented? How about
> the send/recv primitives?
You might want to have a look at the semaphore implementation in chips.
You can also use names in the nameserver directly to wait for an event.
E.g. everyone waits for a certain name to be resolved. They will be
woken up when that name is published.
> What is the easiest way to send messages between processes (dispatchers)?
The regular Barrelfish message passing primitives. I.e. create an
interface definition and bind to it via Flounder. The specifics are
explained in the IDC technote (#11).
Hope this helps,
Simon
_______________________________________________
Barrelfish-users mailing list
Barrelfish-users at lists.inf.ethz.ch
https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
More information about the Barrelfish-users
mailing list