Page 1
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Building dynamic distributed data stores with OSGi
Tim Ward http://[email protected]
Wednesday, 30 October 13
Page 2
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
•Senior Consulting Engineer and Architect at Paremus
• 5 years at IBM developing WebSphere Application Server• Container Implementation experience with Java EE and OSGi, including Blueprint, JPA, EJB
and JTA
•OSGi Specification lead for JPA and Bytecode Weaving
•PMC member of the Apache Aries project
•Previous speaker at EclipseCon, Devoxx, Jazoon, JAX London, OSGi Community Event...
•Author of Manning’s Enterprise OSGi in Action
• http://www.manning.com/cummins
Who is Tim Ward?@TimothyWard
Wednesday, 30 October 13
Page 3
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
What we’re going to cover
•OSGi Remote Services
•Deploying external processes using Packager
•Building Dynamically wired distributed systems
•Demo
Wednesday, 30 October 13
Page 4
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services
Wednesday, 30 October 13
Page 5
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (1)
Wednesday, 30 October 13
Page 6
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (1)
•OSGi Bundles communicate using the Service Registry
Wednesday, 30 October 13
Page 7
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (1)
•OSGi Bundles communicate using the Service Registry
• This allows for dynamic, loosely coupled interaction
Consumer
Provider A
Wednesday, 30 October 13
Page 8
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (1)
•OSGi Bundles communicate using the Service Registry
• This allows for dynamic, loosely coupled interaction
Consumer
Provider A
Provider B
Wednesday, 30 October 13
Page 9
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (1)
•OSGi Bundles communicate using the Service Registry
• This allows for dynamic, loosely coupled interaction
Consumer
Provider A
Provider B
Wednesday, 30 October 13
Page 10
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (2)
Wednesday, 30 October 13
Page 11
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (2)
•Because OSGi services are loosely coupled they can come from anywhere!
Wednesday, 30 October 13
Page 12
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (2)
•Because OSGi services are loosely coupled they can come from anywhere!
•Any service can be transparently remoted *
Wednesday, 30 October 13
Page 13
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (2)
•Because OSGi services are loosely coupled they can come from anywhere!
•Any service can be transparently remoted *
•Service properties are made available remotely too
Wednesday, 30 October 13
Page 14
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (2)
•Because OSGi services are loosely coupled they can come from anywhere!
•Any service can be transparently remoted *
•Service properties are made available remotely too
Provider A
Network
Wormhole
Wednesday, 30 October 13
Page 15
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (2)
•Because OSGi services are loosely coupled they can come from anywhere!
•Any service can be transparently remoted *
•Service properties are made available remotely too
Consumer Provider A
Network
Wormhole
Wednesday, 30 October 13
Page 16
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (2)
•Because OSGi services are loosely coupled they can come from anywhere!
•Any service can be transparently remoted *
•Service properties are made available remotely too
Consumer Provider A
* Make sure your service is actually suitable for remoting!
Network
Wormhole
Wednesday, 30 October 13
Page 17
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (3)
Wednesday, 30 October 13
Page 18
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (3)
• Exposing a remote service is not transparent
Wednesday, 30 October 13
Page 19
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (3)
• Exposing a remote service is not transparent
Consumer Provider A
Network
Wormhole
objectclass ={List, Collection}
Wednesday, 30 October 13
Page 20
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (3)
• Exposing a remote service is not transparent
•Services opt-in using the service.exported.interfaces property
Consumer Provider A
Network
Wormhole
objectclass ={List, Collection}
Wednesday, 30 October 13
Page 21
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (3)
• Exposing a remote service is not transparent
•Services opt-in using the service.exported.interfaces property
Consumer Provider A
Network
Wormhole
objectclass ={List, Collection}
service.exported.interfaces ={Collection}
objectclass ={Collection}
Wednesday, 30 October 13
Page 22
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services (3)
• Exposing a remote service is not transparent
•Services opt-in using the service.exported.interfaces property
• Imported services are marked with a service.imported = true
Consumer Provider A
Network
Wormhole
objectclass ={List, Collection}
service.exported.interfaces ={Collection}
objectclass ={Collection}
service.imported =true
Wednesday, 30 October 13
Page 23
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services and Remote Service Admin
Wednesday, 30 October 13
Page 24
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services and Remote Service Admin
• The OSGi Alliance has two specifications. Remote Services and Remote Service Admin (RSA)
Wednesday, 30 October 13
Page 25
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services and Remote Service Admin
• The OSGi Alliance has two specifications. Remote Services and Remote Service Admin (RSA)
•What I have described is Remote Services
Wednesday, 30 October 13
Page 26
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services and Remote Service Admin
• The OSGi Alliance has two specifications. Remote Services and Remote Service Admin (RSA)
•What I have described is Remote Services
• The underlying implementation is completely unspecified
Wednesday, 30 October 13
Page 27
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services and Remote Service Admin
• The OSGi Alliance has two specifications. Remote Services and Remote Service Admin (RSA)
•What I have described is Remote Services
• The underlying implementation is completely unspecified
•RSA builds on Remote Services, and is more prescriptive
Wednesday, 30 October 13
Page 28
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services and Remote Service Admin
• The OSGi Alliance has two specifications. Remote Services and Remote Service Admin (RSA)
•What I have described is Remote Services
• The underlying implementation is completely unspecified
•RSA builds on Remote Services, and is more prescriptive
•Pluggable distribution mechanisms (WS, RMI, JMS...)
Wednesday, 30 October 13
Page 29
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services and Remote Service Admin
• The OSGi Alliance has two specifications. Remote Services and Remote Service Admin (RSA)
•What I have described is Remote Services
• The underlying implementation is completely unspecified
•RSA builds on Remote Services, and is more prescriptive
•Pluggable distribution mechanisms (WS, RMI, JMS...)
•Pluggable discovery mechanisms (SLP, mDNS, Zookeeper...)
Wednesday, 30 October 13
Page 30
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
OSGi Remote Services and Remote Service Admin
• The OSGi Alliance has two specifications. Remote Services and Remote Service Admin (RSA)
•What I have described is Remote Services
• The underlying implementation is completely unspecified
•RSA builds on Remote Services, and is more prescriptive
•Pluggable distribution mechanisms (WS, RMI, JMS...)
•Pluggable discovery mechanisms (SLP, mDNS, Zookeeper...)
•Notifications for “Topology Manager” bundles to decide which services to export/import
Wednesday, 30 October 13
Page 31
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packaging Applications with Packager
Wednesday, 30 October 13
Page 32
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Aims and advantages
Wednesday, 30 October 13
Page 33
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Aims and advantages
•Package programs as self-describing OSGi Bundles
Wednesday, 30 October 13
Page 34
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Aims and advantages
•Package programs as self-describing OSGi Bundles•Allows Dynamic Resolution and Assembly of runtimes
Wednesday, 30 October 13
Page 35
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Aims and advantages
•Package programs as self-describing OSGi Bundles•Allows Dynamic Resolution and Assembly of runtimes•Can be semantically versioned
Wednesday, 30 October 13
Page 36
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Aims and advantages
•Package programs as self-describing OSGi Bundles•Allows Dynamic Resolution and Assembly of runtimes•Can be semantically versioned
• Leverage the existing bundle/service lifecycle and API
Wednesday, 30 October 13
Page 37
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Aims and advantages
•Package programs as self-describing OSGi Bundles•Allows Dynamic Resolution and Assembly of runtimes•Can be semantically versioned
• Leverage the existing bundle/service lifecycle and API•Allow processes to be installed and uninstalled in a running system
Wednesday, 30 October 13
Page 38
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Aims and advantages
•Package programs as self-describing OSGi Bundles•Allows Dynamic Resolution and Assembly of runtimes•Can be semantically versioned
• Leverage the existing bundle/service lifecycle and API•Allow processes to be installed and uninstalled in a running system•Allow processes to be dynamically started and stopped
Wednesday, 30 October 13
Page 39
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Aims and advantages
•Package programs as self-describing OSGi Bundles•Allows Dynamic Resolution and Assembly of runtimes•Can be semantically versioned
• Leverage the existing bundle/service lifecycle and API•Allow processes to be installed and uninstalled in a running system•Allow processes to be dynamically started and stopped
•Allow integration with other OSGi specification
Wednesday, 30 October 13
Page 40
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Aims and advantages
•Package programs as self-describing OSGi Bundles•Allows Dynamic Resolution and Assembly of runtimes•Can be semantically versioned
• Leverage the existing bundle/service lifecycle and API•Allow processes to be installed and uninstalled in a running system•Allow processes to be dynamically started and stopped
•Allow integration with other OSGi specification •Dynamic Configuration using Config Admin,
Wednesday, 30 October 13
Page 41
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Aims and advantages
•Package programs as self-describing OSGi Bundles•Allows Dynamic Resolution and Assembly of runtimes•Can be semantically versioned
• Leverage the existing bundle/service lifecycle and API•Allow processes to be installed and uninstalled in a running system•Allow processes to be dynamically started and stopped
•Allow integration with other OSGi specification •Dynamic Configuration using Config Admin, •Use and provide Local and Remote Services
Wednesday, 30 October 13
Page 42
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Aims and advantages
•Package programs as self-describing OSGi Bundles•Allows Dynamic Resolution and Assembly of runtimes•Can be semantically versioned
• Leverage the existing bundle/service lifecycle and API•Allow processes to be installed and uninstalled in a running system•Allow processes to be dynamically started and stopped
•Allow integration with other OSGi specification •Dynamic Configuration using Config Admin, •Use and provide Local and Remote Services
•Allow existing code to be packaged without change
Wednesday, 30 October 13
Page 43
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Approach
Wednesday, 30 October 13
Page 44
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Approach
•Wrap Native Artifacts in OSGi Bundles
Wednesday, 30 October 13
Page 45
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Approach
•Wrap Native Artifacts in OSGi Bundles
• Link the Artifact Lifecycle to OSGi.
Wednesday, 30 October 13
Page 46
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Approach
•Wrap Native Artifacts in OSGi Bundles
• Link the Artifact Lifecycle to OSGi. • Bundle Install/Resolve/Start => Artifact “install”
Wednesday, 30 October 13
Page 47
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Approach
•Wrap Native Artifacts in OSGi Bundles
• Link the Artifact Lifecycle to OSGi. • Bundle Install/Resolve/Start => Artifact “install”
• Service registration/unregistration => Artifact “run/stop”
Wednesday, 30 October 13
Page 48
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Approach
•Wrap Native Artifacts in OSGi Bundles
• Link the Artifact Lifecycle to OSGi. • Bundle Install/Resolve/Start => Artifact “install”
• Service registration/unregistration => Artifact “run/stop”
• Bundle Uninstall => Artifact “uninstall”
Wednesday, 30 October 13
Page 49
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Approach
•Wrap Native Artifacts in OSGi Bundles
• Link the Artifact Lifecycle to OSGi. • Bundle Install/Resolve/Start => Artifact “install”
• Service registration/unregistration => Artifact “run/stop”
• Bundle Uninstall => Artifact “uninstall”
• Link to Standard OSGi Services: Configuration Admin, Metatype, Log Service...
Wednesday, 30 October 13
Page 50
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Approach
<system name="BackEnd:MongoDB" boundary="fibre"> <!-- MongoDB package --> <system.part category="msf" name="com.paremus.packager.demos.mongo.guard"> <property name="port" value="27017" /> </system.part> </system>
•Wrap Native Artifacts in OSGi Bundles
• Link the Artifact Lifecycle to OSGi. • Bundle Install/Resolve/Start => Artifact “install”
• Service registration/unregistration => Artifact “run/stop”
• Bundle Uninstall => Artifact “uninstall”
• Link to Standard OSGi Services: Configuration Admin, Metatype, Log Service...
Wednesday, 30 October 13
Page 51
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Separation of Concerns
Wednesday, 30 October 13
Page 52
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Separation of Concerns
•What are we running, and how do we configure/run it?
Wednesday, 30 October 13
Page 53
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Separation of Concerns
•What are we running, and how do we configure/run it?
•Package Type Service
Wednesday, 30 October 13
Page 54
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Separation of Concerns
•What are we running, and how do we configure/run it?
•Package Type Service
•When should we start it, and what configuration properties should we use?
Wednesday, 30 October 13
Page 55
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Separation of Concerns
•What are we running, and how do we configure/run it?
•Package Type Service
•When should we start it, and what configuration properties should we use?
•Process Guard Service
Wednesday, 30 October 13
Page 56
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Separation of Concerns
•What are we running, and how do we configure/run it?
•Package Type Service
•When should we start it, and what configuration properties should we use?
•Process Guard Service
•Actually invoke the start/stop scripts, and monitor the state of the external process
Wednesday, 30 October 13
Page 57
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Separation of Concerns
•What are we running, and how do we configure/run it?
•Package Type Service
•When should we start it, and what configuration properties should we use?
•Process Guard Service
•Actually invoke the start/stop scripts, and monitor the state of the external process
•Packager Manager/Watchdog Process
Wednesday, 30 October 13
Page 58
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Package Types
Wednesday, 30 October 13
Page 59
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Package Type
Wednesday, 30 October 13
Page 60
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Package Type
•Usually contains the native parts
Wednesday, 30 October 13
Page 61
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Package Type
•Usually contains the native parts• Installs the Native Program
Wednesday, 30 October 13
Page 62
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Package Type
•Usually contains the native parts• Installs the Native Program•Configures the program based on the supplied config
Wednesday, 30 October 13
Page 63
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Package Type
•Usually contains the native parts• Installs the Native Program•Configures the program based on the supplied config•Returns scripts to the Packager for: start, stop, ping...
Wednesday, 30 October 13
Page 64
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Package Type
•Usually contains the native parts• Installs the Native Program•Configures the program based on the supplied config•Returns scripts to the Packager for: start, stop, ping...• Is (usually) platform specific
Wednesday, 30 October 13
Page 65
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Package Type
•Usually contains the native parts• Installs the Native Program•Configures the program based on the supplied config•Returns scripts to the Packager for: start, stop, ping...• Is (usually) platform specific
Provide-Capability: packager.type; packager.type=mongodb; version:Version=2.2.0
Require-Capability: osgi.native; filter:=”(& (osgi.native.osname=Linux) (osgi.native.processor=x86-64) )”
Wednesday, 30 October 13
Page 66
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Package Type works
Wednesday, 30 October 13
Page 67
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Package Type works
• Installing an external process can take a long time
Wednesday, 30 October 13
Page 68
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Package Type works
• Installing an external process can take a long time
•Not suitable for running in a bundle’s Activator!
Wednesday, 30 October 13
Page 69
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Package Type works
• Installing an external process can take a long time
•Not suitable for running in a bundle’s Activator!
• Installation should be asynchronous with respect to bundle start
Wednesday, 30 October 13
Page 70
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Package Type works
• Installing an external process can take a long time
•Not suitable for running in a bundle’s Activator!
• Installation should be asynchronous with respect to bundle start
•Run on a separate thread?
Wednesday, 30 October 13
Page 71
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Package Type works
• Installing an external process can take a long time
•Not suitable for running in a bundle’s Activator!
• Installation should be asynchronous with respect to bundle start
•Run on a separate thread?
• Install on demand?
Wednesday, 30 October 13
Page 72
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Package Type works
• Installing an external process can take a long time
•Not suitable for running in a bundle’s Activator!
• Installation should be asynchronous with respect to bundle start
•Run on a separate thread?
• Install on demand?
•Notify possible clients when a type is “ready” using the whiteboard pattern
Wednesday, 30 October 13
Page 73
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Package Type works
• Installing an external process can take a long time
•Not suitable for running in a bundle’s Activator!
• Installation should be asynchronous with respect to bundle start
•Run on a separate thread?
• Install on demand?
•Notify possible clients when a type is “ready” using the whiteboard pattern
•Service properties advertise what the external process is
Package Type
Wednesday, 30 October 13
Page 74
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Package Type works
• Installing an external process can take a long time
•Not suitable for running in a bundle’s Activator!
• Installation should be asynchronous with respect to bundle start
•Run on a separate thread?
• Install on demand?
•Notify possible clients when a type is “ready” using the whiteboard pattern
•Service properties advertise what the external process is
•Service unregisters to “uninstall”Package Type
Wednesday, 30 October 13
Page 75
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Process Guards
Wednesday, 30 October 13
Page 76
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Process Guard Service
Wednesday, 30 October 13
Page 77
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Process Guard Service
•Gathers Process Config Properties
Wednesday, 30 October 13
Page 78
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Process Guard Service
•Gathers Process Config Properties
• Existence signals When to Start/Stop
Wednesday, 30 October 13
Page 79
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Process Guard Service
•Gathers Process Config Properties
• Existence signals When to Start/Stop
•Receives State Change Events (started, crashed...)
Wednesday, 30 October 13
Page 80
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Process Guard Service
•Gathers Process Config Properties
• Existence signals When to Start/Stop
•Receives State Change Events (started, crashed...)
•Advertises the Running Package (Optional)
Wednesday, 30 October 13
Page 81
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Process Guard Service
•Gathers Process Config Properties
• Existence signals When to Start/Stop
•Receives State Change Events (started, crashed...)
•Advertises the Running Package (Optional)
•Usually platform independent
Wednesday, 30 October 13
Page 82
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Process Guard works
Wednesday, 30 October 13
Page 83
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Process Guard works
•Most external processes require some level of configuration to run
Wednesday, 30 October 13
Page 84
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Process Guard works
•Most external processes require some level of configuration to run
• This configuration is often platform independent
Wednesday, 30 October 13
Page 85
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Process Guard works
•Most external processes require some level of configuration to run
• This configuration is often platform independent
•When a process should be started the process guard registers a service
Wednesday, 30 October 13
Page 86
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Process Guard works
•Most external processes require some level of configuration to run
• This configuration is often platform independent
•When a process should be started the process guard registers a service
•Another example of using the whiteboard pattern
Wednesday, 30 October 13
Page 87
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Process Guard works
•Most external processes require some level of configuration to run
• This configuration is often platform independent
•When a process should be started the process guard registers a service
•Another example of using the whiteboard pattern
• It uses the same service properties as the package type
Wednesday, 30 October 13
Page 88
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Process Guard works
•Most external processes require some level of configuration to run
• This configuration is often platform independent
•When a process should be started the process guard registers a service
•Another example of using the whiteboard pattern
• It uses the same service properties as the package type
•Often implemented as a ManagedService or ManagedServiceFactory
Wednesday, 30 October 13
Page 89
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Process Guard works
•Most external processes require some level of configuration to run
• This configuration is often platform independent
•When a process should be started the process guard registers a service
•Another example of using the whiteboard pattern
• It uses the same service properties as the package type
•Often implemented as a ManagedService or ManagedServiceFactory
•Automatically Inject/Delete the configuration for the process
Process Guard
Wednesday, 30 October 13
Page 90
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Process Guard works
•Most external processes require some level of configuration to run
• This configuration is often platform independent
•When a process should be started the process guard registers a service
•Another example of using the whiteboard pattern
• It uses the same service properties as the package type
•Often implemented as a ManagedService or ManagedServiceFactory
•Automatically Inject/Delete the configuration for the process
Process GuardConfig Admin
Wednesday, 30 October 13
Page 91
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
How the Process Guard works
•Most external processes require some level of configuration to run
• This configuration is often platform independent
•When a process should be started the process guard registers a service
•Another example of using the whiteboard pattern
• It uses the same service properties as the package type
•Often implemented as a ManagedService or ManagedServiceFactory
•Automatically Inject/Delete the configuration for the process
Process GuardConfig Admin
Wednesday, 30 October 13
Page 92
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
The Packager Manager
Wednesday, 30 October 13
Page 93
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
The Packager Manager
Wednesday, 30 October 13
Page 94
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
The Packager Manager
• Listens for matching Package Type and Process Guard Services
Wednesday, 30 October 13
Page 95
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
The Packager Manager
• Listens for matching Package Type and Process Guard Services
•One Package Type may match many Process Guards
Wednesday, 30 October 13
Page 96
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
The Packager Manager
• Listens for matching Package Type and Process Guard Services
•One Package Type may match many Process Guards
• For every pair the packager manager starts an instance of the process
Wednesday, 30 October 13
Page 97
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
The Packager Manager
• Listens for matching Package Type and Process Guard Services
•One Package Type may match many Process Guards
• For every pair the packager manager starts an instance of the process
•Configured by the Package Type with properties from the Process Guard
Wednesday, 30 October 13
Page 98
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
The Packager Manager
• Listens for matching Package Type and Process Guard Services
•One Package Type may match many Process Guards
• For every pair the packager manager starts an instance of the process
•Configured by the Package Type with properties from the Process Guard
•A ‘Watchdog’ monitors the process (using scripts from the package type)
Wednesday, 30 October 13
Page 99
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
The Packager Manager
• Listens for matching Package Type and Process Guard Services
•One Package Type may match many Process Guards
• For every pair the packager manager starts an instance of the process
•Configured by the Package Type with properties from the Process Guard
•A ‘Watchdog’ monitors the process (using scripts from the package type)
•Sends notifications to the Process Guard about the state of the process
Wednesday, 30 October 13
Page 100
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
The Packager Manager
• Listens for matching Package Type and Process Guard Services
•One Package Type may match many Process Guards
• For every pair the packager manager starts an instance of the process
•Configured by the Package Type with properties from the Process Guard
•A ‘Watchdog’ monitors the process (using scripts from the package type)
•Sends notifications to the Process Guard about the state of the process
• If either service is unregistered then the process is shut down
Wednesday, 30 October 13
Page 101
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Interactions
Process Guard
Package Type
Packager Manager
Wednesday, 30 October 13
Page 102
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Interactions
Process Guard
Package Type
Packager Manager
Register services
Wednesday, 30 October 13
Page 103
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Interactions
Process Guard
Package Type
Packager Manager
Get Configuration
Wednesday, 30 October 13
Page 104
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Interactions
Process Guard
Package Type
Packager ManagerCreate Scripts and start!
Wednesday, 30 October 13
Page 105
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Interactions
Process Guard
Package Type
Packager Manager Monitor and notify
Wednesday, 30 October 13
Page 106
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Packager Interactions
Process Guard
Package Type
Packager ManagerShutdown on unregistration
Wednesday, 30 October 13
Page 107
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Building dynamically wired systems with Remote Services and Packager
Wednesday, 30 October 13
Page 108
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Publishing an Endpoint
Wednesday, 30 October 13
Page 109
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Publishing an Endpoint
•How do you tell the rest of the framework that your external process has started, or where it is?
Wednesday, 30 October 13
Page 110
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Publishing an Endpoint
•How do you tell the rest of the framework that your external process has started, or where it is?
• The whiteboard pattern to the rescue again!
Wednesday, 30 October 13
Page 111
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Publishing an Endpoint
•How do you tell the rest of the framework that your external process has started, or where it is?
• The whiteboard pattern to the rescue again!
• The Process Guard can register an “Endpoint” with a marker interface and a service property with a URI to the process
Wednesday, 30 October 13
Page 112
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Publishing an Endpoint
•How do you tell the rest of the framework that your external process has started, or where it is?
• The whiteboard pattern to the rescue again!
• The Process Guard can register an “Endpoint” with a marker interface and a service property with a URI to the process
• It can also make this remotely available...
Wednesday, 30 October 13
Page 113
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Publishing an Endpoint
•How do you tell the rest of the framework that your external process has started, or where it is?
• The whiteboard pattern to the rescue again!
• The Process Guard can register an “Endpoint” with a marker interface and a service property with a URI to the process
• It can also make this remotely available...
•Suddenly the process is discoverable in every framework
Wednesday, 30 October 13
Page 114
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations
Wednesday, 30 October 13
Page 115
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations
•Process Guard services can be very simple
Wednesday, 30 October 13
Page 116
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations
•Process Guard services can be very simple
•Static properties
Wednesday, 30 October 13
Page 117
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations
•Process Guard services can be very simple
•Static properties
• Injection from Config Admin
Wednesday, 30 October 13
Page 118
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations
•Process Guard services can be very simple
•Static properties
• Injection from Config Admin
• They can also wait and listen for Endpoints (local and remote!)
Wednesday, 30 October 13
Page 119
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations
•Process Guard services can be very simple
•Static properties
• Injection from Config Admin
• They can also wait and listen for Endpoints (local and remote!)
• Trigger a ManagedServiceFactory with part of the configuration
Wednesday, 30 October 13
Page 120
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations
•Process Guard services can be very simple
•Static properties
• Injection from Config Admin
• They can also wait and listen for Endpoints (local and remote!)
• Trigger a ManagedServiceFactory with part of the configuration
• Listen for the Endpoint, complete the configuration
Wednesday, 30 October 13
Page 121
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations
•Process Guard services can be very simple
•Static properties
• Injection from Config Admin
• They can also wait and listen for Endpoints (local and remote!)
• Trigger a ManagedServiceFactory with part of the configuration
• Listen for the Endpoint, complete the configuration
•Register the Process Guard!
Wednesday, 30 October 13
Page 122
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations (2)
Wednesday, 30 October 13
Page 123
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations (2)
•Replicating this out over multiple nodes lets you dynamically assemble large systems with little to no manual configuration input
Wednesday, 30 October 13
Page 124
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations (2)
•Replicating this out over multiple nodes lets you dynamically assemble large systems with little to no manual configuration input
• Java EE servers
Wednesday, 30 October 13
Page 125
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations (2)
•Replicating this out over multiple nodes lets you dynamically assemble large systems with little to no manual configuration input
• Java EE servers
•Messaging infrastructure
Wednesday, 30 October 13
Page 126
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations (2)
•Replicating this out over multiple nodes lets you dynamically assemble large systems with little to no manual configuration input
• Java EE servers
•Messaging infrastructure
•NoSQL stores
Wednesday, 30 October 13
Page 127
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations (2)
•Replicating this out over multiple nodes lets you dynamically assemble large systems with little to no manual configuration input
• Java EE servers
•Messaging infrastructure
•NoSQL stores
•Because OSGi services are dynamic we can track the service to see if the endpoint moves!
Wednesday, 30 October 13
Page 128
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Dynamically building configurations (2)
•Replicating this out over multiple nodes lets you dynamically assemble large systems with little to no manual configuration input
• Java EE servers
•Messaging infrastructure
•NoSQL stores
•Because OSGi services are dynamic we can track the service to see if the endpoint moves!
•Automatic reconfiguration can rewire the system if a node fails!
Wednesday, 30 October 13
Page 129
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Putting Packager to the test with Redis
Wednesday, 30 October 13
Page 130
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
What is Redis?
Wednesday, 30 October 13
Page 131
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
What is Redis?
•Redis is an open source key-value store (http://redis.io)
Wednesday, 30 October 13
Page 132
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
What is Redis?
•Redis is an open source key-value store (http://redis.io)
•Redis supports queries based on key or value data
Wednesday, 30 October 13
Page 133
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
What is Redis?
•Redis is an open source key-value store (http://redis.io)
•Redis supports queries based on key or value data
• Values can be rich objects like hashes, lists sets or sorted sets
Wednesday, 30 October 13
Page 134
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
What is Redis?
•Redis is an open source key-value store (http://redis.io)
•Redis supports queries based on key or value data
• Values can be rich objects like hashes, lists sets or sorted sets
•Redis supports replication to read-only “slave” nodes
Wednesday, 30 October 13
Page 135
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
What is Redis?
•Redis is an open source key-value store (http://redis.io)
•Redis supports queries based on key or value data
• Values can be rich objects like hashes, lists sets or sorted sets
•Redis supports replication to read-only “slave” nodes
•Wouldn’t it be nice to automatically configure the slaves?
Wednesday, 30 October 13
Page 136
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
Demo
Wednesday, 30 October 13
Page 137
Copyright © 2005 - 2013 Paremus Ltd.May not be reproduced by any means without express permission. All rights reserved.
Dynamic Distributed Data Stores in OSGi Oct 2013
• For more about OSGi...
•Specifications at http://www.osgi.org
• Enterprise OSGi in Action
• http://www.manning.com/cummins
• For more about Packager...
• http://www.bundlerepo.org:8090/display/SF110/Packager
Questions?
Thanks!
http://[email protected]
Wednesday, 30 October 13