Date post: | 20-May-2015 |
Category: |
Documents |
Upload: | anthony-gelibert |
View: | 1,915 times |
Download: | 0 times |
Context Contribution Validations Perspectives
OSGi Applications Clustering using DistributedShared Memory
Anthony Gelibert1 Walter Rudametkin2 Didier Donsez2
Sebastien Jean1
1Grenoble Institute of Technology,LCIS Laboratory, CTSYS Team
Valence, [email protected]
2Grenoble University,LIG Laboratory, ADELE Team
Grenoble, [email protected]
11th Annual International Conference on New Technologiesof Distributed System
1 / 25
Context Contribution Validations Perspectives
Agenda
1 ContextOSGiOSGi and DistributionDistributed Shared Memory
2 ContributionPropositionUse CasesToolchainExample
3 ValidationsEvent AdminCiliauGASP
4 Perspectives
2 / 25
Context Contribution Validations Perspectives
OSGi
Hardware
Operating System
Java Virtual Machine
OSGi Framework
Bundle 1 Bundle 2 Bundle N
Figure: OSGi & System-Layering
De facto Module System(“bundle”) for Java(Eclipse IDE & RCP,JavaEE, OSGiME).
Dependency management.
Service OrientedArchitecture with DirectReferences.
3 / 25
Context Contribution Validations Perspectives
OSGi (cont.)
Figure: OSGi Bundle Life-Cycle
Dynamic ComponentModel.
Dynamic evolution:No JVM reboot.
4 / 25
Context Contribution Validations Perspectives
Remote Method Invocations
Stub
RRL
Transport Layer
Skeleton
RRL
Client Server
Figure: Remote Method Invocation
Use a stub to call methodsexported by a remoteskeleton.
Many solutions for OSGi :
R-OSGiROSEExtended ServiceBinderSCARemote Services
5 / 25
Context Contribution Validations Perspectives
Distributed Deployment
Several bundle repositories.
Bundle offering the same functionalities on each.
Deployment optimizing non-functional parameters.
Use a P2P overlay.
6 / 25
Context Contribution Validations Perspectives
Distributed Shared Memory
P2P1 • • • Pn-1P0
Software DSM Layer
MEMMEMMEM MEM
Network
Figure: Software Distributed Shared Memory
7 / 25
Context Contribution Validations Perspectives
Terracotta
JVM
Application
Shared Objects
Host 1
• • •DSO Lib JVM
Application
Shared Objects
Host 2
DSO Lib JVM
Application
Shared Objects
Host N-1
DSO Lib
Terracotta Server
Figure: Terracotta
8 / 25
Context Contribution Validations Perspectives
Proposition
Distributed Shared Memory
JVM
OSGi
Clustered Service
Module A
Module B
JVM
OSGi
ClusteredService
Module C
Figure: Clustered Service
Clustered (i.e. Replicated)Services.Apply DSO to Servicespublished in distributed[OSGi / JVM] platforms.Avoid the re-engenerringgymnastic to distributeOSGi services.
Clustered Bundles:Bundles containing servants providing and consuming localand clustered services
9 / 25
Context Contribution Validations Perspectives
Pitfalls
Versioning of Clustered Bundles
Dynamic Updates of clustered bundles1
1Synchronous vs. Asynchronous10 / 25
Context Contribution Validations Perspectives
Use Cases
Traditional targets of distributed shared memoryState sharingMessage bus
Re-engineering of existing solutionsParallelization of servicesOriginal data access paradigm
11 / 25
Context Contribution Validations Perspectives
Toolchain
Java CodeAnnotations
Annotation Processing Tool
Annotation Processor
DSM Configuration File
Java Compiler
Java Classes
Build-time
Supplied by user Provided tools
12 / 25
Context Contribution Validations Perspectives
Example
Annotations for Terracotta
Enabling the delegation of class loading
Figure: Annotations in the source code
13 / 25
Context Contribution Validations Perspectives
Example (cont.)
APT Maven plugin
Terracotta Configuration File
Figure: Build process
14 / 25
Context Contribution Validations Perspectives
Validations
Various use cases validated.
Chosen pieces:Event AdminCiliauGasp
15 / 25
Context Contribution Validations Perspectives
Event Admin
OSGi Platform
Distributed Shared Memory
Producer of
eventsBridge
OSGi Platform
BridgeConsumer
of events
Indicates a propagation of events
Figure: Propagation of events across multiple platforms
16 / 25
Context Contribution Validations Perspectives
Cilia
Mediator 1
ProcessorScheduler
handler
Collector
Dispatcherhandler
Sender
Mediator 2
ProcessorScheduler
handler
Collector
Dispatcherhandler
Sender
Mediator 3
ProcessorScheduler
handler
Collector
Dispatcherhandler
Sender
Mediator 2'
ProcessorScheduler
handler
Collector
Dispatcherhandler
Sender
Distributed Shared Memory
Figure: Replication and persistence in pervasive applications
17 / 25
Context Contribution Validations Perspectives
uGASP
Game Server A(u)GASP + Bluetooth antenna
Game Server B(u)GASP + Bluetooth antenna
Migration of the players from A to B
without any loss of data
Distributed Shared Memory
Player on the server A
Playeron the server A
Playeron the server A
Player previously
on the server A
Playerpreviously
on the server A
Playerpreviously
on the server A
Figure: State share for a DTN application
18 / 25
Context Contribution Validations Perspectives
Future works
Terracotta containerExtension of the container:
Enhance Terracotta integrationAdd persistence, cache. . .
Dynamic updateDynamically update clustered services at run-timeRun-time compliance & Update policiesUpdate without stopping the bundle.
19 / 25
Context Contribution Validations Perspectives
Thank you for your attention!———————
Contact: [email protected]
20 / 25
Context Contribution Validations Perspectives
Additional information—————————————————
21 / 25
Context Contribution Validations Perspectives
Further information
Terracotta Documentation, download. . .http://www.terracotta.orgOpen Sourcehttp://www.terracotta.org/open-source
Felix Documentation, download. . .http://felix.apache.org
Chameleon Documentation, download. . .http://wiki.chameleon.ow2.org
22 / 25
Context Contribution Validations Perspectives
Complete toolchain
Java CodeAnnotation Java 5.0
Annotation Processing Tool
Annotation ProcessorTerracotta-specific
classesDSM-generic
classes
Terracotta configuration file
Java Compiler
Java Classes
Terracotta java agent + Java
Terracotta Server(s) Cluster
Build-time
Supplied by user Provided tools
23 / 25
Context Contribution Validations Perspectives
Cilia mediators
Mediator 1
ProcessorScheduler
handler
Collector
Dispatcherhandler
Sender
Mediator 2
ProcessorScheduler
handler
Collector
Dispatcherhandler
Sender
24 / 25
Context Contribution Validations Perspectives
Cluster
25 / 25