FifoPairWiseOrder P C[Producer, Consumer]
State Prod[Producer]
State Cons[Consumer]
∀p : Producer | p ∈ domProd EventsP
• ∃S : iseqEVENT | {S} = Prod EventsP(| {p} |)
• #S = 1 ⇒ (S1).stamp = 1 [Pred-1]
∀p : Producer; F : iseqEVENT
| p ∈ domProd EventsP
∧ {F} = Prod EventsP(| {p} |) ∧ #F > 1
• ∀i,j : domF | j = i+ 1
• (Fj).stamp = 1+ (Fi).stamp [Pred-2]
∀c : Consumer; R : seqEVENT
| c ∈ domNotif EventsC
∧ {R} = Notif EventsC(| {c} |) ∧ #R > 1
• ∀i,j : domR | j = i+ 1
• (Ri).stamp ≤ (Rj).stamp [Pred-3]
The declarative part contains the state of produc-
ers and consumers. In the predicative part, [Pred − 1]
states that the first notification issued by every pro-
ducer has a stamp equal to one. [Pred − 2] expresses
that the stamp is used to incrementally mark the notifi-
cations originating from a single producer. [Pred − 3]
describes that the marked stamps will be used for or-
dering notifications on the consumer side.
3.5 Proving Consistency
We proved the consistency of the extended P/S-CoM
schemas (state of components and behavioral prop-
erties). We instantiated the “initialization theorem”
(Woodcock and Davies, 1996) for all the specifica-
tions and we implemented the proofs under the Z-
EVES theorem prover.
4 RELATED WORK
In the literature, only the P/S-CoM formal approach
focuses on the generic modeling of correct PSAS
and uses the construction method. However, this ap-
proach is interested only in modeling the structural
view. Concerning the formal modeling of the be-
havioral properties of the publish/subscribe systems,
Mahambre et al. (Mahambre et al., 2007) and Bal-
doni et al. (Baldoni et al., 2003) propose the for-
mal modeling of service guarantees with mathemat-
ical equations. The first work includes delivery se-
mantics and message ordering whereas the second
work stresses minimality and completeness proper-
ties considered as delivery semantics, too. However,
these works do not promote the correct by design of
PSAS and the use of the construction method. Some
publish/subscribe middlewares support to behavioral
properties as QoS guarantees. Jedi and Ready (Ma-
hambre et al., 2007) provide mechanisms for the
ordering of notifications and ensure the lossless of
events. In addition, Ready adopt some delivery se-
mantics for notifications. As standardized specifi-
cation, we mention DDS (Data-Distribution Service)
(OMG, 2007) that defines configurable QoS (priority,
order of notifications, ...) and programming model for
distributed systems. Though these works and specifi-
cation provide behavioral properties as QoS, they are
handled at runtime level. At design level, our work
leverages on the P/S-CoM approach by augmenting it
with behavioral view including the state of the com-
ponent types and some behavioral properties.
5 CONCLUSIONS
In this paper, we proposed the integration of behav-
ioral view into P/S-CoM approach. We formally
model the state of publish/subscribe component types
and behavioral properties (lossless of events, delivery
semantics and ordering of notifications) in Z notation.
For future work, we currently design a methodology
for composing the new communication schemas and
develop a GUI as an eclipse plugin. Several other is-
sues require further investigations. First, we project to
incorporate other behavioral properties and the tem-
poral aspect. Second, we plan to integrate a process
algebra language in order to check and validate these
behavioral properties. Third, it is interesting to in-
spect the presented approach with applications.
REFERENCES
Baldoni, R., Contenti, M., Piergiovanni, S. T., and Vir-
gillito, A. (2003). Modelling publish/subscribe
communication systems: Towards a formal ap-
proach. Object-Oriented Real-Time Dependable Sys-
tems, IEEE International Workshop on, 0:304.
Eugster, P. T., Felber, P. A., Guerraoui, R., and Kermarrec,
A.-M. (2003). The many faces of publish/subscribe.
ACM Computing Surveys, 35(2):114–131.
Loulou, I., Jmaiel, M., Drira, K., and Kacem, A. H. (2010).
P/S-CoM: Building correct by design publish/ sub-
scribe architectural styles with safe reconfiguration.
Journal of Systems and Software, 83(3):412–428.
Mahambre, S. P., Kumar S.D., M., and Bellur, U. (2007). A
taxonomy of qos-aware, adaptive event-dissemination
middleware. IEEE Internet Computing, 11(4):35–44.
OMG (2007). Data distribution service for real-time sys-
tems, version 1.2, 2007. http://www.omg.org/spec/
DDS/1.2/PDF/.
Woodcock, J. and Davies, J. (1996). Using Z: specifica-
tion, refinement, and proof. Prentice-Hall, Inc., Upper
Saddle River, NJ, USA.
FORMAL MODELING OF BEHAVIORAL PROPERTIES TO SUPPORT CORRECT BY DESIGN
PUBLISH/SUBSCRIBE ARCHITECTURAL STYLES
289