Dynamic Synthesis of Mediators to Support Interoperability in Autonomic Systems Amel Bennaceur and Valérie Issarny ARLES project-team Inria Paris-Rocquencourt NII-Shonan Workshop: Engineering Autonomic Systems (EASy)
Jul 08, 2015
Dynamic Synthesis of Mediators
to Support Interoperability in
Autonomic Systems
Amel Bennaceur and Valérie Issarny
ARLES project-team
Inria Paris-Rocquencourt
NII-Shonan Workshop: Engineering Autonomic Systems (EASy)
Interoperability in Autonomic
Systems
Systems are becoming increasingly connected
• Future Internet, Cyber-Physical System, Internet of Things
• Integration becoming more difficult
Interactions among components cannot be planned
beforehand
• Increasingly dynamic
• Unanticipated components
System and its components figure out how to interact at
runtime
• Automatically ensuring interoperation at runtime
Our Research on Interoperability
Sustaining composition in highly heterogeneous
and dynamic environments
• Multi-* networking environments with heterogeneity at
all layers (application, middleware)
• Semantics of networked systems needed to reason
about and achieve on-the-fly interoperability
• Ontology for the description of functional
semantics
• LTSs for the description of behavioural semantics
3
Illustrating the Interoperability
Challenges
GMES: Global Monitoring for Environment & Security
Discovery
4
What are the available services in vicinity?How can I communicate with other peers?What kind of data can I exchange with other peers?What kind of application can I use?Am I allowed to forward data to other peers?
, Interaction, Data , Application, NFP heterogeneity
Highly-dynamic and complex environments
Existing Approaches to
Interoperability
5
Change the system
or attach an adaptor× A chosen shared
language
No one-size-fits-all
standard
Use a common abstraction
Need to be aware about all the
possible configurations beforhand
Legacy systems
No runtime support
× ×
Transform on the fly using
an intermediary system:
the mediator
Can we observe, synthesize and deploy mediators
dynamically?
Dynamic Mediation to Support
Interoperability
Systems with compatible functionalities should
be able to interact despite heterogeneities in
their data and behavioral models.
Mediators that seamlessly overcome these
heterogeneities should be dynamically
synthesized and deployed in their environment.
6
Dynamic Mediation to Support
InteroperabilityDiscovery
Model
level
System
level
→ Learning → Synthesis → Concretization → Monitoring
DownloadPhotowrite PhotoFile
write PhotoMetadata
Model
Extraction
Model
Extraction
read PhotoFile
Mediator Model
downloadPhoto
read PhotoMetadata
Deployment
Monitor
Emergent
Middleware
Ontolog
yDownloadPhoto = getPhotoPhoto = PhotoMetadata + PhotoFile
PhotoMetadata = PhotoID + Location + CameraID + details …
write PhotoFile
write PhotoMetadata
System (NS2)
DownloadPhoto
System (NS1)
Synthesis
Ontology-based Networked System
Model
Ontology-based Functional Semantics
• Affordance
• The high-level functionality of a system
• e.g., <Req, PhotoSharing, Preferences, Photo>
• Interface
• A set of observable actions
• e.g., <SendSOAPRequest, DownloadPhoto,
{CameraID}, >
LTS-based Behavioural semantics
• The way the observable actions are coordinated
• At both application and middleware layers
• Application → Business logic
• Middleware → Communication & coordination protocol
8
Interface
Networked
System
Affordance Behaviour1
0..n
1
Ontologies
<SendSOAPRequest,
DownloadPhoto,{CameraID}, >
<ReceiveSOAPResponse,
DownloadPhoto, , {Photo}>
Functional
Matching
Emergent Middleware Synthesis
Informed by Ontologies
Affordance
Behaviour
NS2 Model
<Prov, B, IB,OB>
Interface
?δ2!ρ2
!δ1?ρ1
?λ1
t3
t4
!δ1
δ1 = <SOAPCall, d, id, od>
λ1 = <SOAPCall, l, il, ol>
ρ1 = <SOAPCall, r, ir, or>
Affordance
Behaviour
Model
<Req, A, IA,OA>
Interface
NS1
α1 = <rd, a, ia, oa>
β1 = <out, b, ib, ob>
?β1!α1
?α2 !β2
t1
t2
ia
a Thing
Nothing
Ontologies
dir AB
Does it make sense for NS1 and NS2
to interact?
Middleware
Abstraction
Emergent Middleware Synthesis
Informed by Ontologies
Affordance
Behaviour
NS2 Model
<Prov, B, IB,OB>
Interface
?δ2!ρ2
!δ1?ρ1
?λ1
t3
t4
!δ1
δ1 = <SOAPCall, d, id, od>
λ1 = <SOAPCall, l, il, ol>
ρ1 = <SOAPCall, r, ir, or>
Affordance
Behaviour
Model
<Req, A, IA,OA>
Interface
NS1
α1 = <rd, a, ia, oa>
β1 = <out, b, ib, ob>
?β1!α1
?α2 !β2
t1
t2
ia
a Thing
Nothing
Ontologies
dir AB
Abstract from the communication
protocol details and concentrate on
application semantics
Emergent Middleware Synthesis
Informed by Ontologies
Affordance
Behaviour
NS2 Model
<Prov, B, IB,OB>
δ
δλ
ρ
ρ
δ = <d, id, od>
λ = <l, il, ol>
ρ = <r, ir, or>
Interface
Affordance
Behaviour
Model
<Req, A, IA,OA>
Interface
NS1
α β
α
α = <a, ia, oa>
β = <b, ib, ob> Ontology-based
Action Mapping
α' = < α , <δ, λ> >
β' = < β , <ρ> >
….
ia
a Thing
Nothing
Ontologies
dir AB
What are the translations that need to
be performed?
Abstract CONNECTor Model
α
δλ
β
ρ
Success
α' = < α , <δ, λ> >
β' = < β , <ρ> >
….
Behavioral
Matching & Synthesis
Emergent Middleware Synthesis
Informed by Ontologies
Affordance
Behaviour
NS2 Model
<Prov, B, IB,OB>
δ
δλ
ρ
ρ
δ = <d, id, od>
λ = <l, il, ol>
ρ = <r, ir, or>
Interface
Affordance
Behaviour
Model
<Req, A, IA,OA>
Interface
NS1
α β
α
α = <a, ia, oa>
β = <b, ib, ob>
Select the appropriate mapping processes
and compose them such that both
systems reach their final states
Abstract CONNECTor Model
α
δλ
β
ρ
Concretization
Concrete CONNECTor Model
?β1!ρ1
?ρ2 !β2?δ2
!α2
!δ1?α1
?λ1
t1
t2 t3
t4
Emergent Middleware Synthesis
Informed by Ontologies
Affordance
Behaviour
NS2 Model
<Prov, B, IB,OB>
δ
δλ
ρ
ρ
δ = <d, id, od>
λ = <l, il, ol>
ρ = <r, ir, or>
Interface
Affordance
Behaviour
Model
<Req, A, IA,OA>
Interface
NS1
α β
α
α = <a, ia, oa>
β = <b, ib, ob>
ia
a Thing
Nothing
Ontologies
dir AB
Refines the mediator model into a
concrete software artifact:
an emergent middleware
Approach In Action:Domain-specific Ontology
14
PhotoSharingProducer PhotoSharingServer PhotoSharingConsumer
PhotoMetadata PhotoFile
Photo
SearchPhoto DownloadPhoto UploadPhoto
PhotoSharing
PhotoSharingProducer PhotoSharingServer PhotoSharingConsumer
PhotoMetadata PhotoFile
Photo
SearchPhoto DownloadPhoto UploadPhoto
PhotoSharing
Subsumption (is-a)
PhotoID: stringCameraID: stringLongitude: doubleLatitude: doubleResolution: integerInformation:string
Approach In Action:Functional Matching
15
System 2System1
AffC2 = <Req, PhotoSharing,
{CameraID}, {PhotoFile}>
AffDrone = <Prov, PhotoSharing,
, {Photo}>
There is a functional matching between AffC2 and AffDrone
CameraID subsumes (co-variant)
Photo subsumes a PhotoFile (contra-variant)
Approach In Action:Middleware Ontology
16
RemoteProcedureCallAPI
MethodName Arguments ReturnValue
0..1 + follows {some} 0..1 + follows {some}
RemoteProcedureCallAPI
ReceveReply ReceiveCall Reply
MethodName Arguments ReturnValue
0..1 + follows {some}
+hasInput {some}
+hasOutput {some}
+hasOutput {some}
+hasInput {some}
+hasOutput {some}
Call
0..1 + follows {some}
+hasInput {some}
+hasInput {some}
Call
RemoteProcedureCallAPI
ReceveReply ReceiveCall Reply
MethodName Arguments ReturnValue
0..1 + follows {some}
+hasInput {some}
+hasOutput {some}
+hasOutput {some}
+hasInput {some}
+hasOutput {some}
SendSOAPRespReceiveSOAPResp ReceiveSOAPRqt
SOAPRequest SOAPResponse
SendSOAPRqt
Call
0..1 + follows {some}
+hasInput {some}
ReceiveReply ReceiveCall ReplyCall
Approach In Action:
Middleware Abstraction
17
<SendSOAPRequest,
DownloadPhoto,{CameraID}, >
<ReceiveSOAPResponse,
DownloadPhoto,{Photo} >
<DownloadPhoto,{CameraID}, {Photo}>
C2 BehaviorC2 Middleware-agnostic
Behavior
Approach In Action:Middleware Abstraction
18
Drone BehaviorDroneMiddleware-agnostic
Behavior
<write, PhotoMetaData, ,
{photometadata}>
<write,
PhotoFile, , {photofile}>
<PhotoMetaData, , {photometadata}>
<PhotoFile, , {photofile}>
Approach In Action:Generating Mapping Processes
19
Drone InterfaceC2 Interface
<DownloadPhoto,{CameraID}, {Photo}> <PhotoMetaData, , {photometadata}>
<PhotoFile, , {photofile}>
DownloadPhotoPhotoMetaData PhotoFile
1 - Define the constraints that need to hold between compatible actions
2- Use constraint programming to find possible mapping between interfaces
<DownloadPhoto,{CameraID}, {Photo}>⟼<<PhotoMetaData, , {photometadata}>, <PhotoFile, , {photofile}>>
e.g., photo sumsumed by photometadata union photofile
3- Generate the corresponding mapping process
Approach In Action:Behavioral Matching
20
PhotoMetaData
PhotoFile
PhotoMetaData
PhotoFile
DownloadPhoto
DownloadPhoto
Drone BehaviorC2 Behavior Mediator Behavior
Approach In Action:Deployment
Refine the mapping
processes using
middleware semantics
21
<receiveCall, DownloadPhoto,
{cameraID}, >
<read, PhotoMetadata,
{cameraID}, {photometadata}>
<reply, DownloadPhoto,
, {photoFile}>
<read, PhotoFile,
{photoID}, {photoFile}>
PhotoMetaData
PhotoFile
DownloadPhoto
Get photoID from photoMetadata
Middleware
& Domain-specific
Ontologies
Approach In Action:Deployment
Composer 2
Parser 2
Parser 1Composer
1
Emergent Middleware
Mediator
System 2System1
Open Issues
Learning is (almost) always partial
Evolution and incremental synthesis
23
Monitoring
Evolution of the
NS Model
Discovery
Learning
Synthesis
New NSs
(re)Synthesis
Open Issues In CONNECT
Enforcing the goal instead of achieving it
Ontologies
• Processing overhead, fuzziness, learning,
heterogeneity in ontologies, alignment
Summary
Interoperability remains a fundamental
problem in today’s complex systems
Dynamic synthesis of mediators promises
to address interoperability in a future-proof
manner
Still..
Need to make complete the NS model and
re(synthesize) mediators incrementally
25
Thank you
Further Information
Home page: www-rocq.inria.fr/~bennaceu
ARLES: www.rocq.inria.fr/arles
CONNECT: connect-forever.eu
The Role of Ontologies in Emergent Middleware:
Supporting Interoperability in Complex Distributed
Systems, In Proc. Middleware 2011
Middleware-layer Connector Synthesis: Beyond State of
the Art in Middleware Interoperability, In SFM 2011
Towards an architecture for runtime interoperability, In
Proc. ISoLA 2010
27