middleware-layer connector synthesis: beyond state of the art in middleware interoperability

84
Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability Valérie Issarny, INRIA Joint work with A. Bennaceur, D. Bromberg And colleagues from FP7 ICT FET CONNECT project

Upload: dawn

Post on 23-Feb-2016

41 views

Category:

Documents


1 download

DESCRIPTION

Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability. Valérie Issarny, INRIA Joint work with A. Bennaceur, D. Bromberg And colleagues from FP7 ICT FET C ONNECT project. Composing Systems in Today’s Pervasive Networks. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Middleware-layer Connector Synthesis:

Beyond State of the Art in Middleware Interoperability

Valérie Issarny, INRIA

Joint work with A. Bennaceur, D. BrombergAnd colleagues from FP7 ICT FET CONNECT project

Page 2: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Composing Systems inToday’s Pervasive Networks

1. Discovery protocol interoperability2. Interaction protocol interoperability3. Data interoperability4. Application interoperability5. Interoperability of non-functional

properties

2

The Simple Yet Challenging Photo Sharing Scenario

Any peer around?How may I get the picture?Is it a jpg file?May I get all the related pictures?Am I allowed to forward those pictures?

See Lecture by Gordon Blair onInteroperability in Complex Distributed Systems

Page 3: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Mediation to Make Systems Interoperable

3

P2P Photo Sharing C/S-based Producer

See Lecture by Paola Inverardi onApplication-layer Connector Synthesis

Mediation that actually bridges the Application (Different protocols for accessing photo files)

&Middleware (Different interaction paradigms)

Layers

Page 4: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Mediation Must Span All Layers

4

Constituent systems heterogeneity in coordination models, communication protocols, data representation models (middleware platforms)

Most common coordination models: client/server, pub/sub, tuple space

Yet Another Scenario: Search & Rescue Operations

See Lecture by Nikolaos Georgantas onCONNECT Architecture

Page 5: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Outline

Middleware-based connectors Formalizing middleware-based connectors Revisiting interoperability connectors Emergent connector synthesis Emergent connector in practice Conclusion

8

Page 6: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Middleware-based Connector

10

HeterogeneousMiddleware

Built-in Mediation

Discovery &Routing

Supporting Middleware

NFPEnforcement

See R. N. Taylor et al. Software Architecture: Foundations, Theory & Practice - Wiley

Page 7: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Connecting Systems

12

Page 8: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Classifying Connection Mismatches

13

Page 9: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Application Mismatches

14

Page 10: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Middleware Mismatches

15

Page 11: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Mediation Connector

16

Page 12: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

The Many Facets of Mediation

17

How to make mediation connector emergent?

Page 13: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Towards Emergent Connectors

Formalizing middleware-based connectors to reason about interoperability

Revisiting existing interoperability connectors

Emergent connector synthesis

18

Page 14: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Outline

Middleware-based connectors Formalizing middleware-based connectors Revisiting interoperability connectors Emergent connector synthesis Emergent connector in practice Conclusion

19

Page 15: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Finite State Processes

20

END Predefined process, successfull terminationset S Denotes a set of action labels[i : S] Binds the variable i to a value from S

Primitive Processes (P)a -> P Action prefixa -> P | b -> P ChoiceP;Q Sequential compositionP(X =‘ a) Parameterized process: P is described using parameter X

and modeled for a particular parameter value, P(a)P/{new_1/old_1, …, new_n/old_n}

RelabelingP \{a1, a2, …, an} HidingP +{a1, a2, …, an} Alphabet extension

Composite Processes (||P)P||Q Parallel compositionforall [i : 1..n] P(i) Replicator construct: equivalent to the parallel compositiona : P Process labeling

Page 16: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

SOAP-based Middleware Connector

21

Role ClientSOAP = SOAP-RPCCall -> SOAP-RPCReceiveReply -> ClientSOAP

Role ServerSOAP = SOAP-RPCReceiveCall -> SOAP-RPCReply -> ServerSOAP

GlueSOAP = SOAP-RPCCall -> SOAP-RPCReceiveCall -> GlueSOAP | SOAP-RPCReply -> SOAP-RPCReceiveReply -> GlueSOAP

||ConnectorSOAP = ClientSOAP || GlueSOAP || ServerSOAP

SOAP

See Work by D. Garlan et al. at CMU

Page 17: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Photo Sharing over SOAP - Application -

set SOAP_PhotoSharing_Actions = {uploadPhoto, searchPhoto, downloadPhoto, downloadComment, commentPhoto}

PhotoSharingConsumer = (req.searchPhoto -> P1),P1 = (req.downloadPhoto ->P1 | req.commentPhoto -> P1)

|req.downloadComment -> P1 | terminate -> END).PhotoSharingProducer =

(req.uploadPhoto -> PhotoSharingProducer | terminate -> END).PhotoSharingServer =

(prov.uploadPhoto -> PhotoSharingServer|prov.searchPhoto -> PhotoSharingServer|prov.downloadPhoto -> PhotoSharingServer|prov.commentPhoto -> PhotoSharingServer|prov.downloadComment -> PhotoSharingServer | terminate -> END).

22

Page 18: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Photo Sharing over SOAP - SOAP Middleware -

ClientSOAP (X =’ op) = (req.[X] -> P1 | terminate -> END),

P1 = (SOAP-RPCCall[X] ->SOAP-RPCReceiveReply[X] -> ClientSOAP ).

ServerSOAP (X =’ op) = (prov.[X] -> P2 | terminate -> END),

P2 = (SOAP-RPCReceiveCall[X] -> SOAP-RPCReply[X] -> ServerSOAP ).

GlueSOAP (X =’ op) = (SOAP-RPCCall[X] -> P0 | terminate -> END),

P0 = (SOAP-RPCReceiveCall[X] -> SOAP-RPCReply[X]-> SOAP-RPCReceiveReply[X] -> GlueSOAP ).

23

Page 19: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Photo Sharing over SOAP - Photo Sharing System -

||SOAP_PhotoSharing = (PhotoSharingProducer|| PhotoSharingConsumer|| PhotoSharingServer|| (forall [op:SOAP_PhotoSharing_Actions] ServerSOAP (op))|| (forall [op:SOAP_PhotoSharing_Actions] ClientSOAP (op))|| (forall [op:SOAP_PhotoSharing_Actions] GlueSOAP (op))).

24

Page 20: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Outline

Middleware-based connectors Formalizing middleware-based connectors Revisiting interoperability connectors Emergent connector synthesis Emergent connector in practice Conclusion

25

Page 21: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Approaches to Interoperability

Solutions applicable to Middleware and Application layers• Software Bridges• Interoperability Platforms• Transparent Interoperability

26See Lecture by Gordon Blair & Massimo Paolucci on

Interoperability in Complex Distributed Systems

Page 22: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Software Bridges

27

LegacyApplication

Legacy Middleware

APeer

Legacy Application

Legacy Middleware

BPeer

Bridge A to B

3rd Party Peer

E.g.:OrbixCOMet, SOAP2CORBA at middleware-layer

Domain-specific bridges –MSN-Yahoo bridge - at application-layer

Page 23: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Bridge Mediator

28

||Direct_Bridge_Mediator = (Bridge || T)

Page 24: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Bridging ConnectorLegacy connectorsRole R1i,i in [1..2] = Role R1 of Connectori

Role R2i,i in [1..2] = Role R2 of Connectori

Gluei,i in [1..2] = Glue of Connectori

set Ii,i in [1..2] = Set of events initiated from Role R1i and R2i

Bridge = tag1.[e1:I1] -> tag2.[e1] -> Bridge | tag2.[e2:I2] -> tag1.[e2] -> Bridge

Adaptation processT = Required transformations of (tagi.ej)s to bridge Connector1 to Connector2

Direct bridge connector||C-DBridge = R11 || tag1:Glue1 || Bridge || T || tag2:Glue2 ||R22

29

Page 25: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Indirect Bridge Mediator

30

||Indirect_Bridge_Mediator = (T1 || Bridge1 || Bridge2 || T2)

E.g., ESB solutions (Artix, PetalS, …), Interoperability manager (MUSDAC)Domain-specific J-EAI for interoperable IMs

Page 26: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

ESB ConnectorBusRole R1bus = Role R1 of Connectorbus

Role R2bus = Role R2 of Connectorbus

Gluebus = Interactions between Role R1bus and Role R2bus Legacy connectorsRole R1 = |i=1..n (a.gluei -> R1i),R1i, i=1..n = (R1i initial specification as given by Connectori) | reset -> R1Role R2 = |k=1..m (a.glue’k -> R2k), R2k, k=1..m = (R2k initial specification as given by Connector’k) | reset -> R2Glue i=1..n = Interactions between R1i and R2i

Glue’ k=1..m = Interactions between R’1k and R’2k

Eventsset I1i, i=1..n (O1i, i=1..n ) Set of events initiated (observed) from Role R1i

set I2k, k=1..m (O2k, k=1..m ) Set of events initiated (observed) from Role R2k

31

R1 R2

Page 27: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

ESB Connector (2)Adaptation processT1 = |i=1..n (a.gluei -> ToTi),ToT i=1..n = Required transformations to bridge Connectori to Connectorbus | a.reset -> T1

T2 = |k=1..m (b.glue’k -> ToT’k),ToT’k, k=1..m = Required transformations to bridge Connectorbus to Connector’k | b.reset -> T2

Bridging processesBridge1 = |i=1..n (a.gluei -> Bridgei), Bridgei=1..n = [e : I1i] -> a.tagi.[e] -> Bridgei | a.tagi.[e : O1i] -> [e] -> Bridgei

| a.reset -> Bridge1

Bridge2 = |k=1..m (b.glue’k -> Bridge’k), Bridge’k=1..m = [e : I2k] -> b.tagk.[e] -> Bridge’k|b.tagk.[e : O2k] -> [e] -> Bridge’k

|b.reset -> Bridge2

Indirect bridge connector||C-IBridge = R1 || T1 ||i=1..n a.tagi:Gluei || Bridge1|| Gluebus || Bridge2 ||k=1..m b.tagk:Glue’k || T2 || R2

32

T1 T2

Page 28: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Software Bridges Assessment

33

• Handcoded development of bridges (i.e., Process T)• Direct bridging does not scale • Interoperability limited to the behavior of the intermediary in

the case of indirect bridging

Page 29: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Interoperability Platforms

34

Application

Peer

ApplicationLegacy Middleware

Peer

Substituted MiddlewareTranslation

Interoperability Platform

E.g.: UIC, ReMMoC at middleware-layer

Domain-specific platform – IM Pidgin, Adium - at application-layer

Page 30: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Interoperability Mediator

35

||Interoperability_Mediator = (Switch || Bridge || T)

Page 31: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Interoperability Connector (1)

Proprietary interfaceRole Rinterface = Bridge interfaceRole R2 = |i=1..n (gluei -> R2i),R2i,i in [1..n] = Inititial spec of Role R2 of Connectori | reset -> R2Gluei,i in [1..n] = Glue of Connectori

Initiated and observed eventsset I2 (O2)i,i in [1..n] = Set of events initiated (observed) from Role R2i

set I (O) interface = Set of events initiated (observed) from Role Rinterface

Switch processSwitch = (election -> reset -> Switch |i=1..n election -> gluei -> Switch)\{election}

36

Page 32: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Interoperability Connector (2)

Adaptation processT = |i=1..n (gluei -> ToTi),ToT i=1..n = Required transformations to bridge Rinterface to Connectori | reset -> T

Bridging processBridge = |i=1..n (gluei -> Bridgei),Bridgei, i in [1..n] = [e : Rinterface] -> tagi:[e] -> Bridgei | tagi:[e :Ointerface] -> [e]-> Bridgei

| [e : I2i] -> tagi:[e] -> Bridgei | tagi.[e :O2i] -> [e]-> Bridgei

| reset -> Bridge

Interoperability platform connector||C-InteropPlatforms = Rinterface || Switch || T || Bridge ||i=1..n tagi :Gluei || R2

37

Page 33: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Interoperability Platform Assessment

38

• Proprietary interface and behavior

Page 34: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Transparent Interoperability

3939

LegacyApplication

Legacy Middleware

Peer

Legacy Application

Legacy Middleware

Peer

Translation to

Intermediary

3rd Party Peer

Translation to

Intermediary

E.g.:INDISS, ubiSOAP at middleware layer

Domain-specific interoperability – IM CrossTalk – at application layer

Page 35: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Transparent Mediator

40

||Transparent_Mediator = (Switch || W1 || M1 || Bridge1 || Bridge2 || M2 || W2 || Switch’)

Page 36: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Transparent Interoperability Connector (1)Legacy connectorsRole R1 = |i=1..n (a.gluei -> R1i),R1i,i in [1..n] = Inititial spec of Role R1i of Connectori | reset -> R1Role R2 = |k=1..m (b.gluek -> R2k),R2k,k in [1..m] = Inititial spec of Role R2 of Connector’k | reset -> R2Gluei,i in [1..n] = Interactions between R1i and R2i

Glue’k,k in [1..m] = Interactions between R’1k and R’2k

Initiated and observed eventsset I2 (O2)i,i in [1..n] = Set of events initiated (observed) from Role R1i

set I2 (O2)k, k in [1..m] = Set of events initiated (observed) from Role R’2k

set Ei, i in [1..n] (Ek, k in [1..m]) = aR1i ∩ aGluei (aR2k ∩ aGlue’k) Set S E1n (S E2m)= Ui=1..n E1i (Uk=1..m E2k)Set S O1n (S O2m)= Ui=1..n O1i (Uk=1..m O2k)41

Page 37: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

TransparentInteroperability Connector (2)Switch processesSwitch = (a.election -> a.reset -> Switch |i=1..n a.election -> a.gluei -> Switch)\{a.election}Switch’ = (b.election->b.reset->Switch’ |k=1..m b.election ->b.glue’k ->Switch’)\{b.election}Image protocol generationW1 = |i=1..n (a.gluei -> ToGluei),ToGluei=1..n = [e : I1i]->a.tagi:[e]->ToGluei | a.tagi:[e :O1i] -> [e]-> ToGluei | a.reset -> W1

W2 = |k=1..m (b.glue’k -> ToGlue’k),ToGlue’k=1..m = [e : I2k->b.tagk:[e]->ToGlue’k | b.tagk:[e :O2k]-> [e]->ToGlue’k| b.reset->W2

M1 = |i=1..n (a.gluei -> ToMapi),ToMapi=1..n = a.tagi.[e : I1i]->a.tagi.f(e)->ToMapi

| a.tagi.f(e:SO1n) -> a.tagi.[e : O1i]-> -> ToMapi | a.reset -> M1

M2 = |k=1..m (b.glue’k -> ToMap’k),ToMap’k=1..m = b.tagk.[e : I2k]->b.tagk.f(e)->ToMap’k

| b.tagk.f(e:SO2m) -> b.tagk.[e : O2k]-> -> ToMap’k| b.reset -> M2

42

Page 38: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

TransparentInteroperability Connector (3)Bridging processBridge1 = |i=1..n (a.gluei -> ToBridgei),ToBridgei, i in [1..n] = a.tagi.f(e2:SE2m) -> f(e2) -> ToBridgei

| f(e1:SE1n) -> a.tagi.f(e2) -> ToBridgei

| a.reset -> Bridge1

Bridge2 = |k=1..m (b.glue’k -> ToBridge’k),ToBridge’k, k in [1..m] = b.tagk.f(e1:SE1n) -> f(e1) -> ToBridge’k

| f(e2:SE2m) -> b.tagk.f(e2) -> ToBridge’k| b.reset -> Bridge2

Transparent interoperability connector||C-Transparent_Interop

= R1 || Switch ||i=1..n a.tagi:Gluei/{f(r:aGluei)/[r]} || W1 || M1 || Bridge1

|| M2 || W2 ||k=1..m b.tagk:Gluek/{f(r:aGlue’k)/[r]} || Switch’ || R2

43

Page 39: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Transparent Interoperability Assessment

44

• Addresses interoperability at a single layer• Projection function f to be given, making it similar to indirect

bridging although with (design-time) adaptive buses• Does not account for the heterogeneity of interaction paradigms

Page 40: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Outline

Middleware-based connectors Formalizing middleware-based connectors Revisiting interoperability connectors Emergent connector synthesis Emergent connector in practice Conclusion

45

Page 41: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

The CONNECT Approach to Interoperability: Emergent Middleware

Synthesize CONNECTors between heterogeneous Networked Systems (NS)• Generate middleware and

application protocols to create connections that will overcome the interoperability barrier

• CONNECTors devised and created at Run Time

• Minimal a priori knowledge/ assumptions

4646

NSCONNECTor

NS« Mediation » connectoraka Emergent middleware

See Lecture by Nikolaos Georgantas & Paul Grace onThe CONNECT Architecture

Page 42: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Meeting in the Heterogeneous World

47

OPhoto

OSOAPP

Networked systems meet according to matching “Affordances”

QOPhoto

OLime

Photo sharing using SOAP

Photo sharing using LIME

“Affordance” behaviour is characterized by its protocol and related ontology

from application down to middleware layer

Photo sharing Photo sharing

“Affordance” behaviour is characterized by its protocol and related ontology

Page 43: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Networked System Model forOn-the-fly Connection

Interface definition leveraging Semantic Web service technologies• Affordance aka Capability

<Type, Concept, Inputs, Outputs>• Interface signature

• Action defined as <Mdw, Application, I, O> • Affordance behavior

48

Page 44: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

P2P Photo Sharing Interface

Interfacephoto_sharing = {< Out, PhotoMetadata, , < photoMetadata >>,< Out, PhotoFile, , < photoFile >>,< Rdg, PhotoMetadata,< photoMetadata >, < photoMetadataList >>,< Rd, PhotoFile, < photoID >, < photoFile >>,< Rd, PhotoComment, < photoID >, < photoComment >>,< Out, PhotoComment, , < photoComment >>,< In, PhotoComment, < photoID >, < photoComment >>,< Rd, PhotoComment, < photoID >, < photoComment >>

}

49

Page 45: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

P2P Photo Sharing Protocol Application Layer

set Lime_PhotoSharing_Actions = {photoMetadata, photoFile, photoComment}

PhotoSharingPeer = (req.photoMetadata -> Consumer | prov.photoMetadata -> Producer),

Producer = (prov.photoFile -> PhotoSharingPeer),Consumer = (req.photoFile ->Consumer

| req.photoComment -> Consumer | prov.photoComment -> Consumer | req.photoFile -> PhotoSharingPeer | req.photoComment -> PhotoSharingPeer | prov.photoComment -> PhotoSharingPeer | terminate -> END)

50

Page 46: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

P2P Photo Sharing ProtocolMiddleware Layer

Lime_Reader(X =‘ tuple) = (req.[X] -> P1),P1 = (rd[X] -> Lime_Reader | rdp[X] -> Lime_Reader | rdg[X] -> Lime_Reader

| in[X] -> Lime_Reader | inp[X] -> Lime_Reader | ing[X] -> Lime_Reader | terminate -> END).

Lime_Writer(X =‘ tuple) = (prov.[X] -> P2),P2 = (out[X] -> Lime_Writer | outp[X] -> Lime_Writer

| outg[X] -> Lime_Writer | terminate -> END).

Lime_glue(X =‘ tuple) = (write[X] -> P0 | outp[X] -> P0 | outg[X] ->P0 | terminate -> END),

P0 = (rd[X] -> P0 | rdp[X] -> P0 | rdg[X] -> P0 | in[X] -> Lime_glue | inp[X] -> Lime_glue | ing[X] -> Lime_glue).

51

Page 47: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

P2P Photo Sharing ProtocolPhoto Sharing System

const NumberOfPeers = 2

||Lime_PhotoSharing = ( [i : 1..NumberOfPeers]:PhotoSharingPeer|| (forall [tuple:Lime_PhotoSharing_Actions] Lime_Writer(tuple))

|| (forall [tuple:Lime_PhotoSharing_Actions] Lime_Reader(tuple)) || (forall [tuple:Lime_PhotoSharing_Actions] Lime_glue(tuple))).

52

Page 48: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Talking the Same LanguageThe Key Role of Ontology

53

P’ Q’

Q

TranslatedProtocols

OPhotoOPhoto

AlignedOntology

Interoperate?

OSOAP

OPhoto

OLime

OPhotoOMW

OPhotoOMW

Translation

P OMW

Behavioralmatchmaking

?

Page 49: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

The Photo Sharing Ontology

54

Classified according to subsumption relationships

Page 50: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Reasoning about Mediated Matching

Equivalence of LTS traces as the basis

55

Behavioral matchmaking under:mapping of semantic-based actions

But must account for application-layer interactions using middleware

Leveraging the rich SOTA on protocol conversion/mediation

See Lecture by Paola Inverardi onApplication-layer Connector Synthesis

Page 51: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Need to Abstract Middleware Protocols

Towards aligning middleware functions• 4 main middleware types

• RPC• Shared memory• Event-based• Message-based

56

Page 52: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

RPC Middleware

57

Page 53: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Shared Memory Middleware

58

Page 54: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Event-based Middleware

59

Page 55: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Message-based Middleware

60

Page 56: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Semantics of Middleware Functions

61

Page 57: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

From Lime to Shared Memory P2P Photo Sharing to…

Reader(X =‘ data) = (req.[X] -> P1),P1 = (read[X] -> Reader | terminate -> END).

Writer(X =‘ data) = (prov.[X] -> P2),P2 = (write[X] -> Writer | terminate -> END).

SM_glue(X =‘ data) = (write[X] -> P3 | terminate->END),P3 = (read[X] -> SM_glue).

62

Page 58: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Shared Memory P2P Photo Sharing (LTS)

63

<Write, PhotoMetadata, , photoMetadata>

<Write, PhotoFile, , photoFile>

<Read, PhotoFile, photoID, photoFile>

<Read, PhotoMetadata, photoMetadata, photoMetadataList>

<Write, PhotoComment, , photoComment>

<Read, PhotoComment, photoID, photoComment>

Page 59: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

… to Middleware AgnosticP2P Photo Sharing

Reader(X =‘ data) = (req.[X] -> P1),P1 = (input[X] -> Reader | terminate -> END).

Writer(X =‘ data) = (prov.[X] -> P2),P2 = (output[X] -> Writer | terminate -> END).

SM_glue(X =‘ data) = (output[X] -> P | terminate -> END),

P = (input[X] -> SM_glue).

64

Page 60: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Middleware AgnosticP2P Photo Sharing (LTS)

65

<PhotoMetadata, , photoMetadata>

<PhotoFile, , photoFile>

<PhotoFile, photoID, photoFile>

<PhotoComment, , photoComment >

<PhotoComment, photoID, photoComment>

Page 61: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Middleware AgnosticC/S Photo Sharing (LTS)

66

Consumer

<SearchPhotos, photoMetadata, photoMetadataList>

<DownloadPhoto, photoID, photoFile>

<CommentPhoto, photoComment, acknowledgement >

Page 62: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Interoperable Systems atAbstract Level

67

<PhotoMetadata, , photoMetadata>

<PhotoFile, , photoFile>

<PhotoFile, photoID, photoFile>

<PhotoComment, , photoComment >

<PhotoComment, photoID, photoComment><SearchPhotos, photoMetadata, photoMetadataList>

<DownloadPhoto, photoID, photoFile>

<CommentPhoto, photoComment, acknowledgement >

Page 63: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Emergent Connectors Synthesis

Affordance matching according to subsumption relationships between concepts of the affordances

Interface mapping among the actions of the protocols to be made interoperable for the following mismatches• Splitting of input actions / Merging of output actions • Extra output actions

Verifying whether protocols may successfully coordinate according to the computed interface mapping

→Mediation connector that implements the computed interface mapping + message translation

68

Page 64: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Interface Mapping

MapI(IA1, IA2) = <a, I, O>IA1 {<a, I, O> → map(<a, I, O>, IA2)}

<a’, I’, O’>IA2 {<a’, I’, O’> → map(<a’, I’, O’>, IA1)}with:map(<a, Ia, Oa>, I) = {<<out.bi, Ii, Oi> I>i=1..n |

a i {bi}^ Ii ≤ n (j<i {Oi}) {Ia}^ Oa (j<i {Oi}) {Ia}}

and:seq1 map(<a, Ia, Oa>, I), seq2 map(<a, Ia, Oa>, I) | seq2 < seq1

69

Page 65: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Mediator SynthesisAdaptation processes:Ma = (||i Processes that merge/split A1 actions)Ma’ = (||i’ Processes that merge/split A2 actions)Mb’ = (||i Processes that consume extra output actions of A2)Mb = (||i Processes that consume extra output actions of A1)

Behavioral matching under mediation:P1 || Ma || Mb’ ≤ P2 || Ma’ || Mb

where A1 A2 and A1 req A2Emergent connector:Ma || Mb’ || Ma’ || Mb

70

Page 66: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

From Abstract to Concrete Emergent Connectors

71See Lecture by Nikolaos Georgantas & Paul Grace on

The CONNECT Architecture

Page 67: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Appraches to Middleware Synthesis

72

Still a long way to go…

Page 68: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Outline

Middleware-based connectors Formalizing middleware-based connectors Revisiting interoperability connectors Emergent connector synthesis Emergent connector in practice Conclusion

73

Page 69: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

The Instant Messaging Case Study

74

XMPP System

XMPP Client XMPP ClientXMPP

MSNP SystemMSN Client MSN ClientMSNP

• 1-1 Interface mapping• Behavioral matching using OFSP

(FSP enriched with ontology reasoning over actions)

Page 70: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Making IMs interoperable

Software bridges• Direct: MSN & Yahoo!Messenger• Indirect: J-EAI

Interoperability platforms• Pidgin, Adium

Transparent interoperability• CrossTalk

75

Page 71: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

The CONNECT Way

76

XMPPMSNP

XMPPOFSP process

MSNPOFSP process

Behavioral Matching

IM Ontology(OWL)

Adaptation

Mediator

OFSP Modeling

Failure

Exact matching

Partial matchingNo matching

Ontology-based Model Checking

Mediation

Dealing with Infrastructure-based functionalities

abdc

e

Page 72: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

The IM Ontology

77

Page 73: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

OFSP Specification of MSNPMSNClient =

(<input, MSNAuthenticationRequest, {UserID}, {Challenge} >-> < input, MSNAuthenticationResponse, {Response}, {Authenticationok} >-> ExchangeMsgs).

ExchangeMsgs = (< input, CreateChatRoom, {UserID}, {ConversationID} >-> < input, JoinChatRoom, {UserID}, {Acceptance} -> P1| < output, JoinChatRoom, {UserID}, {Acceptance} >-> < input, {ChatRoomInfo, , {ConversationID} > -> P1

P1 = (< input, InstantMessage, {UserID, ConversationID, Messageg}, > -> P1| < output, InstantMessage, {UserID, ConversationID, Message}, > -> P1| < input, MSNLogout, {UserID }, > -> END

78

Page 74: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

OFSP Specification of XMPP

79

XMPPClient = (< input, XMPPAuthenticationRequest, {UserID}, {Challenge} >-> < input, XMPPAuthenticationResponse, {Response}, {Authenticationok}> -> ExchangeMsgs).

ExchangeMsgs = (< input, InstantMessage, {SenderID, RecepientID, Message}, > -> ExchangeMsgs| < output, InstantMessage, {SenderID, RecipientID, Message <}, > -> ExchangeMsgs| < input, XMPPLogout, {UserID}, > -> END).

Page 75: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

OFSP Specification MSNP-XMPP Mediator

80

Map1 = (<output, InstantMessage, {SenderID, RecepientID, Message} , >-> <input, InstantMessage,{UserID, ConversationID, Message } , >-> Map1).

Map2 = (<output, InstantMessage, {UserID, ConversationID, Message } , >-> <input, InstantMessage, {SenderID, RecepientID, Message}, >-> Map2).

||Mediator = (Map1 || Map2).

Page 76: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

On-line Mediation

81

Parser

Composer

Operation1

Inputs1

Outputs1

input

Parser

ComposerTransform

Operation2

Inputs2

Outputs2

output

InstantMessage

senderID, recepientIDmessage∅

input

InstantMessage

userID, conversationIDmessage∅

input

Mediator

Page 77: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Message Mediation

82

UUM 15 [email protected] 32 1 159MIME-Version: 1.0Content-Type: text/plain; charset=UTF-8X-MMS-IM-Format: FN=Segoe%20UI; EF=; CO=0; CS=1; PF=0Dest-Agent: client

Test Message from MSN to XMPP

<?xml version="1.0" encoding="UTF-8"?><Thing><Version>17</Version><IM>?0</IM><Service>6</Service><PacketLength>142</PacketLength><MSNP>YMSG</MSNP><Status>1515563606</Status><Sender>amel.bennaceur1</Sender><Recipient>[email protected]</Recipient><SessionID>5684388</SessionID><VendorID>0</VendorID></Thing>

<ObjectPropertyIRI="#consistsOf"/><NamedIndividual IRI="#first"/><NamedIndividual IRI=“MSN"/><DataPropertyIRI="#hasSender"/><NamedIndividual IRI="#first"/><Literal abbreviatedIRI="xsd:string">amel.bennaceur1</Literal></DataPropertyAssertion><DataPropertyAssertion><DataPropertyIRI="#hasRecipient"/><NamedIndividual IRI="#first"/><Literal abbreviatedIRI="xsd:string">[email protected]</Literal></DataPropertyAssertion>…

<?xml version="1.0" encoding="UTF-8"?><message

from=‘[email protected]' id='ktx72v49' to=‘[email protected]' type='chat' xml:lang='en'>

<body>Test Message from MSN to XMPP</body> </message>

<ObjectPropertyIRI="#consistsOf"/><NamedIndividual IRI="#first"/><NamedIndividual IRI=“XMPP"/><DataPropertyIRI="#hasSender"/><NamedIndividual IRI="#first"/><Literal abbreviatedIRI="xsd:string"> [email protected] </Literal></DataPropertyAssertion><DataPropertyAssertion><DataPropertyIRI="#hasRecipient"/><NamedIndividual IRI="#first"/><Literal abbreviatedIRI="xsd:string“> [email protected] </Literal></DataPropertyAssertion>…

DSL parser

XSLT engine

Reasoning

XSLT engine

XML Composer

Instant MessagingOntology

MSNP DSL Specs

MSNP OWL individual

MSNP XML Message

MSNP text message

XMPP OWL individual

XMPP Message

Page 78: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Performance EvaluationProprietary vs Synthesized Mediator

Latency (ms)

Native Hand SynthesizedPars Trans

MSNP - MSNP 22 12 231 11YMSG - YMSG 24 08 342 12YMSG - MSNP 35 06 234 20MSNP - XMPP N/A 52 135 07YMSG - XMPP N/A 44 145 06MSNP - GTalk N/A 65 N/AYMSG - GTalk N/A 78 N/A

83

Page 79: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Performance EvaluationProprietary vs Synthesized Mediator

Lines of Code/Spec

Hand-coded SynthesizedPars Trans

YMSG - MSNP 1172 245MSNP - XMPP 0750 203YMSG - XMPP 0945 144

84

Page 80: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

On the fly IM Interoperability in Action

Demo by Amel Bennaceur

86

Page 81: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Outline

Middleware-based connectors Formalizing middleware-based connectors Revisiting interoperability connectors Emergent connector synthesis Emergent connector in practice Conclusion

87

Page 82: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

88

Composing Pervasive Systems

State-of-the art survey in middleware & data interoperability shows that no current approach meets today’s interoperability challenge

Need for emergent middleware where connectors are synthesized on the fly

Page 83: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

89

Synthesizing CONNECTors for Pervasive Systems

• CONNECTors implementing emergent middleware that mediate interactions among pervasive networked systems

• Formalization of interoperability based on matching and mapping relationships between interaction protocols run by networked systems

• Dealing with application- and middleware-layer connectors

• Further challenge of enforcing non-functional properties

Page 84: Middleware-layer Connector Synthesis: Beyond State of the Art in Middleware Interoperability

Thank you and

Thanks to CONNECT colleagues(A. Bennaceur, G. Blair, N. Georgantas, P. Grace, P.

Inverardi, R. Saadi, R. Spalazzese, …)