[okl4-developer] cell to threads communication

Hannes Payer hannes.payer at gmail.com
Thu Oct 15 18:35:15 EST 2009


Hi Josh,
thanks for your reply. I am aware of this feature for synchronous
communications, which is really useful. But I have
to use asynchronous communications. Is there a possibility to do the same
thing for asynch/notify? If not, I guess
the main thread of the cell has to multiplex messages to the other threads
of the cell.
-H

On Wed, Oct 14, 2009 at 11:33 PM, Josh Matthews <jmatthews at ok-labs.com>wrote:

> Hi Hannes,
> What you're looking for are "Reply Capabilities". These are temporary
> (one-shot) capabilities that are created on receipt of a synchronous IPC -
> intended exactly for client-server type interactions such that the server
> does not need to possess a capability to every possible client (and can
> instead trust that as long as a client possesses a capability to the server,
> that client is valid and can be replied to).
>
> Check out section B-18.4 of the OKL4 3.0 Library reference manual - you can
> see the reply_cap that you receive as an output parameter to
> okl4_message_wait.
>
> Note that this is only for synchronous communications - you appear to be
> using asynch/notify. Is it possible for you to use synchronous comms?
>
> Josh
>
> On Fri, Oct 2, 2009 at 5:15 AM, Hannes Payer <
> hannes.payer at cs.uni-salzburg.at> wrote:
>
>>
>> Well, this question seems to be somehow related to the question asked in
>> "Capability Passing in OKL4 3.0"
>> http://wiki.ok-labs.com/forum#nabble-td2241729. Can I dynamically create
>> these capabilities in the server cell at runtime? A client thread would
>> have
>> to pass some information(?) to the server cell. The server would then have
>> to create the necessary capability and send the result back to the given
>> client thread. Is this possible in OKL4?
>>
>> -H
>>
>>
>>
>> Hannes Payer wrote:
>> >
>> > Hi,
>> >
>> > how can multiple threads running in one cell communicate with another
>> > cell? I looked at the available OKL4 documentation and played around
>> with
>> > the API, but I am not sure how to get this done.
>> >
>> > The following program works for me:
>> > There are 2 cells running in the system. One is a server cell performing
>> a
>> > calculation based on client input and returning the result to the
>> client.
>> > The server cell waits for a notification (okl4_notify_wait) from the
>> > client cell. Whenever the client cell wants to communicate with the
>> server
>> > it writes data to a known shared memory location and sends the server
>> cell
>> > a notification (okl4_notify_send) and waits for a notification from the
>> > server for the result. The server cell looks-up the input in shared
>> > memory, computes the result, writes the result to shared memory and
>> sends
>> > the client a notification. This example is very similar to the decrypt
>> > demo of the OKL4 examples and on a cell-to-cell communication basis this
>> > system works.
>> >
>> > My question:
>> > Can I implement this example also with multiple threads running in the
>> > client cell where each single thread communicates with the server cell?
>> > How does the server cell get the capability to send a given thread from
>> > the client cell a notification? Do I have to stick to cell-to-cell
>> > communication and multiplex the messages from the server cell on the
>> > client cell side?
>> >
>> > I hope my problem description is precise enough. Thank you very much for
>> > your help.
>> >
>> > -H
>> >
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/cell-to-threads-communication-tp3750541p3754410.html
>> Sent from the OKL4 Community Forum mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Developer mailing list
>> Developer at okl4.org
>> https://lists.okl4.org/mailman/listinfo/developer
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20091015/33a205aa/attachment.htm 


More information about the Developer mailing list