05.08.2014 Views

here - Stefan-Marr.de

here - Stefan-Marr.de

here - Stefan-Marr.de

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.4. Comparing Implementation Size<br />

taken into account, the additional implementation size remains reasonable<br />

and requires only a 35% larger implementation accounting for the ad<strong>de</strong>d<br />

genericity.<br />

6.4.4. Event-Loop Actors: AmbientTalkST<br />

This section examines the ad hoc as well as the OMOP-based implementation<br />

of event-loop actors. It briefly restates the two implementation strategies (cf.<br />

Sec. 6.2.3 for <strong>de</strong>tails), outlines the supported features, and then discusses the<br />

implementation sizes.<br />

Ad hoc Implementation The ad hoc implementation realizes the notion of<br />

safe messaging by implementing AmbientTalk’s far references with stratified<br />

proxies. Thus, actors do not exchange object references directly when message<br />

are sent. Instead, all object references to remote objects are wrapped in a<br />

proxy, i. e., the far reference.<br />

While this implementation achieves a good <strong>de</strong>gree of isolation with low<br />

implementation effort, it does not ensure complete state encapsulation. For<br />

instance, it does neither handle global state, introduced by class variables,<br />

nor potential isolation breaches via primitives. This choice was ma<strong>de</strong> to keep<br />

the implementation minimal, accepting the restrictions discussed in Sec. 3.3.2.<br />

OMOP-based Implementation As discussed in Sec. 6.2.3 and as sketched<br />

in Lst. 6.7, the OMOP-based implementation relies on the full feature set provi<strong>de</strong>d<br />

by the OMOP.<br />

While it offers the same APIs and features as the ad hoc implementation,<br />

its semantic guarantees are stronger. By utilizing the OMOP, it can provi<strong>de</strong><br />

the full <strong>de</strong>gree of isolation, i. e., state encapsulation and safe message passing.<br />

Thus, access to global state and use of primitives are properly handled and<br />

do not lead to breaches of isolation between actors. Note that this implementation<br />

does not use proxies to realize far references. Instead, it relies on the<br />

notion of ownership to enforce the <strong>de</strong>sired semantics.<br />

Results and Conclusion As listed in Tab. 6.6, the ad hoc implementation of<br />

AmbientTalkST uses 5 classes with 38 methods. These account for 183 LOC<br />

and have a total of 428 byteco<strong>de</strong>s. The OMOP-based implementation on the<br />

other hand has 2 classes, which have in total 18 methods with 83 LOC and<br />

190 byteco<strong>de</strong>s.<br />

167

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!