13.07.2015 Views

Modeling Software Architectures in the Unified Modeling Language

Modeling Software Architectures in the Unified Modeling Language

Modeling Software Architectures in the Unified Modeling Language

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Model<strong>in</strong>g</strong> <strong>Software</strong> <strong>Architectures</strong> <strong>in</strong> UML • 45Fig. 19.Use of submach<strong>in</strong>e state reference <strong>in</strong> UML representation of Rapide constra<strong>in</strong>ts.ma<strong>in</strong>ta<strong>in</strong><strong>in</strong>g <strong>in</strong>formation about causality <strong>in</strong> distributed systems are well known[Lamport 1978]. The traditional solution for explicitly represent<strong>in</strong>g <strong>the</strong> partialorder of a set of events is to associate a vector timestamp with each event [Fidge1991]. In UML, many of <strong>the</strong> more subtle nuances of event order<strong>in</strong>g semanticsare left unspecified, or are specified very loosely [Object Management Group2000]. In particular, we <strong>in</strong>terpret <strong>the</strong> semantics of UML (especially <strong>the</strong> semanticsof event queues for state mach<strong>in</strong>es) as allow<strong>in</strong>g one component to sendsignals <strong>in</strong> one order and ano<strong>the</strong>r component to observe <strong>the</strong> signals <strong>in</strong> a completelydifferent order, with no means for avoid<strong>in</strong>g deadlock <strong>in</strong> <strong>the</strong> observ<strong>in</strong>gcomponent. Hence, signals <strong>in</strong> UML do not respect typical notions of causality. InRapide, however, an event pattern may specify that, say, a sequence of causallyordered events is to be matched, or that a set of events that are not causallyordered is to be matched; <strong>the</strong> Rapide runtime system will ga<strong>the</strong>r <strong>the</strong> necessary<strong>in</strong>formation about <strong>the</strong> generated events and <strong>the</strong>ir causal relationships <strong>in</strong> orderto perform <strong>the</strong> match as specified.There are a number of possible approaches to address<strong>in</strong>g causality <strong>in</strong> UML.One approach would be to ignore causality, forgo <strong>the</strong> possibility of constra<strong>in</strong><strong>in</strong>gcomponent behaviors with respect to causally related events, and simply acceptUML’s “looser” semantics for event order<strong>in</strong>g. A second approach would beto specify and use vector timestamps as additional model elements for encod<strong>in</strong>g<strong>the</strong> partial order with<strong>in</strong> <strong>the</strong> signals used <strong>in</strong> a UML model; OCL stereotypeswould be needed to formalize <strong>the</strong> semantics of <strong>the</strong> vector timestamps and to ensure<strong>the</strong>ir consistent and correct use across <strong>the</strong> model. A third approach wouldbe to specify an additional model element that is <strong>the</strong> equivalent of <strong>the</strong> Rapideruntime system; this would still require <strong>the</strong> declaration and use of additional<strong>in</strong>formation <strong>in</strong> <strong>the</strong> signals used <strong>in</strong> a UML model.Each of <strong>the</strong>se approaches has its strengths and weaknesses, but <strong>the</strong>y allshare <strong>the</strong> disadvantage of greatly complicat<strong>in</strong>g <strong>the</strong> result<strong>in</strong>g models. This suggeststhat causality among events is an architectural concern that simply cannotbe represented <strong>in</strong> UML <strong>in</strong> a straightforward manner at <strong>the</strong> present time.While we <strong>in</strong>tend to explore <strong>the</strong>se possibilities <strong>in</strong> greater detail <strong>in</strong> <strong>the</strong> future, weare hopeful that future versions of UML will <strong>in</strong>corporate a more precise andcomprehensive semantics for event order<strong>in</strong>g.5.3.5 Discussion of Rapide Extensions. This section has focused on represent<strong>in</strong>gRapide’s features for event-based behavioral model<strong>in</strong>g of architecturalACM Transactions on <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology, Vol. 11, No. 1, January 2002.

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

Saved successfully!

Ooh no, something went wrong!