SkyeCORE Rev Up Your OSGi Services!
Jun 20, 2015
SkyeCORE
Rev Up Your OSGi Services!
What is SkyeCORE?
• A distributed applications platform.
• Automates the discovery and publishing of services.
• Built on top of the Eclipse Platform.
• Fully supports and exposes OSGi (Equinox).
Demo Presentation
• Hello World Service Example
• Demonstrates the dynamic discovery and invocation of a remote service.
• Entire example source code available: http://www.skyecore.net/downloads/Hello
World Example.zip.
P2P Network Model
• Based on JXTA.
• SkyeCORE Instance ≈ Peer
• Peers identified via UUID.
• Publish/Discover Advertisements.
• Support for Peer Groups (Scoped and Secure Environments).
Discovery
• LAN: Multicasting is used.
• WAN: Controlled propagated search via Rendezvous Peers.
LAN 1
Peer A
Netw
ork Boun
dary
LAN 2
Peer B
RDV 1 RDV
2
Peer C
Peer D
Security
• Encrypted data transfer.
• Peer Credentials: Used in the authentication of peers and access control.
• Support for digests and signatures on messages to ensure integrity.
• Works with firewalls and NAT devices.
• May require a Relay Peer to relay messages for peers behind Firewall/NAT.
Firewalls and NAT
Relay Z
Peer A Peer
B
Firewall
Service Interfaces
• Developed as Java interfaces.
• Provide a contractual API for service implementations.
• Declared through Service Interfaces extension point.
Services
• Developed as Java objects.
• Implement 1 or more service interfaces.
• Abide by a lifecycle (init, destroy).
• Declared through Services extension point.
Service Sessions
• Used to identify a peer across service requests.
• Store/persist peer information using any type of Java object.
• Access session ID, creation and last accessed time.
How’s It Work?
• Proxies (local and remote) generated from service interfaces.
• Service Registration (Local):– Generation of local proxy– Local proxy registered in OSGi
service registry.– Service Advertisement published.
How’s It Work? (continued)
• Service Discovery (Remote):– Service Advertisement discovered.– Generation of remote proxy– Remote proxy registered in OSGi
service registry.
How’s It Work? (continued)
• Remote Method Invocation:– Establish connection via bi-directional pipe.
– Create and send Service Request (service name, method, serialized args) over pipe.
– Process request (Service Engine); perform invocation through reflection.
– Create and send Service Response (return value/exception) over pipe.
How’s It Work? (continued)
• What happens when a service becomes unavailable?
• Remote proxy is unregistered if:– Connection fails– Service Unavailable Exception– Service Advertisement indicates
unavailable status.
How’s It Work? (continued)
Tracking Services
• Accomplished via OSGi Service Tracker.
• Specify 1 or more service interfaces to track with optional filtering.
• Added, modified, and removed notifications.
Events
• Supports notification of several events:– Discoveries– Published– Searches– Service Interface and Service
Registrations.
• Register listeners in OSGi Service Registry (“Whiteboard” Pattern)
Creating an App
• Based on Eclipse plug-in model.
• Deploy as plug-ins or features.
• System bootstrap allows for complete application control and launching of a custom UI.
Console
• Provides a text-based command UI.
• Core commands used to list services, interfaces, discoveries, etc.
• Extended with custom commands via Commands extension point.
Road Map
• SkyeCORE 2.0 slated for October 2009 release.– Streaming capability.– Enhanced security.– Subscriber model (propagation of
custom events).– SIE (SkyeCORE Interface
Environment) graphical UI based on Eclipse workbench.
– User desired features!
Distributed OSGi
• RFC 119
• Built around the OSGi service model.
• Distribution software and Discovery service components.
• Interoperability with other technologies.
• Enable a service to be remote via setting of property.
Resources
• SkyeCORE - http://www.skyecore.net Developer’s Guide, API JavaDocs, Downloads, Hello World Example Source, SDK, Forum, Feedback
• JXTA - https://jxta.dev.java.net
• OSGi 4.2 Early Draft: http://www.osgi.org/download/osgi-4.2-early-draft.pdf