Check out the new USENIX Web site. next up previous
Next: 11 Memory management Up: 10 Baseline-Core communication Previous: 10.2 The Baseline part

10.3 Calling Core-Baseline methods

Figure 8 shows a sequence diagram of the publication and a Core-Baseline method call. Arrows crossing the horizontal line between Baseline and Core are standing for data sent through the FIFOs. The data sent is described in the balloons.

Name, type and ID (for optimization) of a published object are received by the FifoListener and internally stored in a hash map of CoreDomain for lookup. The latter is not shown in the sequence chart. For every published object a proxy object on the Baseline side is created. This proxy objects contains wrappers for all the Core-Baseline methods in the corresponding Core object. When called, these wrappers send a "call method" command followed by the object ID, method ID and the parameters to the CoreListener. Since multiple threads can call the same method concurrently an additional call ID is sent. This is important to distinguish the method returns. The call ID can be a thread ID or a unique number. On the Core side a thread is started executing the wanted method.

The calling Baseline thread is blocked by a wait(). The calling thread will be resumed by a notify() after the calls Core method has sent its return values. Since multiple threads can call Core-Baseline methods concurrently return values are stored in a hash map with their call ID and can be fetched by the wrappers.

Figure 8: publishing methods and method call
\includegraphics[scale=0.5]{images/sequence_basecore_04}


next up previous
Next: 11 Memory management Up: 10 Baseline-Core communication Previous: 10.2 The Baseline part
Urs Gleim 2002-05-29