here - Stefan-Marr.de
here - Stefan-Marr.de
here - Stefan-Marr.de
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
6. Evaluation: The OMOP as a Unifying Substrate<br />
by one. Both of the presented implementations guarantee this basic aspect.<br />
Furthermore, both implementations guarantee the notion of safe messaging (cf.<br />
Sec. 3.3.2). Thus, messages exchanged between actors are guaranteed not to<br />
introduce shared state.<br />
State encapsulation on the other hand is not supported by either of the implementation,<br />
even though it would be straightforward with the OMOP.<br />
Ad Hoc Solution The ad hoc implementation strategy is similar to the one<br />
<strong>de</strong>scribed by Schäfer and Poetzsch-Heffter [2010], but kept much simpler. Similar<br />
to their approach of wrapping objects, we use stratified [Bracha and Ungar,<br />
2004] proxies [Van Cutsem and Miller, 2010] to represent far references,<br />
i. e., references between objects residing in different actors. The proxy wraps<br />
actual objects and reifies all operations on them to enforce safe messaging and<br />
asynchronous execution. This approach also provi<strong>de</strong>s coverage for Smalltalk’s<br />
reflection, because it is based on message sends to the object.<br />
Safe messaging is realized by wrapping all objects in parameters and return<br />
values. Thus, this implementation comes with the performance drawbacks<br />
<strong>de</strong>scribed in Sec. 3.3.2. Each object needs to be wrapped with another object.<br />
However, it avoids the need for copying the entire object graph.<br />
While not implemented, this approach can be exten<strong>de</strong>d to provi<strong>de</strong> ownership<br />
transfer semantics upon message send. With Smalltalk’s #become: it is<br />
possible to ensure that the original actor does not hold on to the object it sent<br />
via a message. However, the #become: operation is expensive. It scans the<br />
whole heap to exchange object references of the receiver with the reference<br />
given as an argument. Furthermore, the #become: operation is not supported<br />
by VMs such as the JVM and CLI, and, it cannot be used as a general implementation<br />
strategy.<br />
Unfortunately, the approach of using proxies, i. e., wrapper objects does<br />
not account for global state. Thus, class variables are shared between actors<br />
and introduce un<strong>de</strong>sired shared state. In Java, this could be avoi<strong>de</strong>d by using<br />
different class loa<strong>de</strong>rs for each actor. However, in Squeak/Pharo t<strong>here</strong> are no<br />
facilities which could provi<strong>de</strong> such functionality. Since the implementation<br />
with the <strong>de</strong>scribed features is already larger than the OMOP-based implementation,<br />
we <strong>de</strong>ci<strong>de</strong>d to accept the limitation of partial state encapsulation<br />
only.<br />
OMOP-based Solution The OMOP-based implementation uses the ATActor<br />
domain as the actor itself. Thus, a domain instance corresponds to an execut-<br />
154