OSGi	
  Remote	
  Services
Alexander	
  Broekhuis	
  	
  

alexander.broekhuis@luminis.eu	
  

Bram	
  de	
  Kruijff	
  

b...
Agenda
• OSGi	
  specificaCon	
  
• Remote	
  Service	
  Admin	
  SpecificaCon	
  
• In	
  a	
  Java	
  world...	
  
• ...	
...
OSGi	
  SpecificaCons
• SpecificaCons	
  
• Core	
  
• Compendium	
  
• Enterprise	
  
!

• NaCve-­‐OSGi	
  
• RFP-­‐156
OSGi

Bundle
install

Bundle

Life%cycle

installed

start

start

star/ng

resolved
end

uninstall

ac/ve
stopping

stop
...
OSGi
Service'Registry
Store

Bundle

Bundle

store
Store.class
public'class'Ac+vator'implements'BundleAc+vator'{
Key.class...
• Endpoint Listener – A listener service that receives updates of Endpoints that match its scope
Endpoint Listener is used...
Remote	
  Service	
  Admin
• Topology	
  Manager	
  
• Detect	
  exported	
  /	
  imported	
  services	
  
• Detect	
  ser...
122.6

Discovery

Discovery

The topology of the distributed system is decided by the Topology Manager. However, in a dist...
Remote	
  Services
«service»
Server
imported = "true"

Server

«service»
Server
remote = "true"

ServerStub

Client

Serve...
Use	
  cases

• Research	
  Projects	
  
• STARS/INAETICS	
  
• (Re)Configurable	
  dynamic	
  systems	
  

• Machine	
  2	...
Java	
  ImplementaCons
• Apache	
  CXF	
  DOSGi	
  
• Transport:	
  JAX-­‐WS	
  and	
  JAX-­‐RS	
  
• Discovery:	
  Zookee...
NaCve	
  ImplementaCons

• Apache	
  Celix	
  
• Transport:	
  HTTP	
  +	
  JSON	
  
• Discovery:	
  MulCcastDNS,	
  SLP	
...
Amdatu/Celix	
  Remote	
  Services
• HTTP/JSON	
  
• HTTP	
  is	
  well	
  known	
  and	
  supported	
  in	
  all	
  langu...
Demo	
  -­‐	
  Calculator
• Calculator	
  shell	
  commands	
  
• add	
  /	
  sub	
  /	
  sqrt
public interface
	 public d...
Thank	
  you
• OSGi	
  
• hfp://www.osgi.org	
  

• Amdatu	
  Remote	
  Services	
  
• hfps://bitbucket.org/amdatu/
amdatu...
Upcoming SlideShare
Loading in...5
×

OSGi Remote Services - Alexander Broekhuis, Bram de Kruijff

821

Published on

OSGi Community Event 2013 (http://www.osgi.org/CommunityEvent2013/Schedule)

ABSTRACT



Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
821
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
36
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

OSGi Remote Services - Alexander Broekhuis, Bram de Kruijff

  1. 1. OSGi  Remote  Services Alexander  Broekhuis     alexander.broekhuis@luminis.eu   Bram  de  Kruijff   bram.dekruijff@luminis.eu
  2. 2. Agenda • OSGi  specificaCon   • Remote  Service  Admin  SpecificaCon   • In  a  Java  world...   • ...  and  in  a  NaCve  world   • ImplementaCon   • Amdatu   • Celix   • Interoperability
  3. 3. OSGi  SpecificaCons • SpecificaCons   • Core   • Compendium   • Enterprise   ! • NaCve-­‐OSGi   • RFP-­‐156
  4. 4. OSGi Bundle install Bundle Life%cycle installed start start star/ng resolved end uninstall ac/ve stopping stop store Store.class Key.class store.fs StoreImpl.class FileSystem.class StreamU3l.class uninstalled store.fs.osgi Ac,vator.class OSGi%framework
  5. 5. OSGi Service'Registry Store Bundle Bundle store Store.class public'class'Ac+vator'implements'BundleAc+vator'{ Key.class ''''public'void'start(BundleContext'context)'{ ''''''''context.registerService(Store.class.getName(),'null,' store.fs ''''''''''''new'StoreImpl()); StoreImpl.class ''''} ''''public'void'stop(BundleContext'context)'{ FileSystem.class ''''} StreamU3l.class } store.fs.osgi Ac,vator.class OSGi%framework
  6. 6. • Endpoint Listener – A listener service that receives updates of Endpoints that match its scope Endpoint Listener is used symmetrically to implement a federated registry. The Topology Manager can use it to notify interested parties about created and removed Endpoints, as we receive notifications from other parties, potentially remote, about their available Endpoint • Remote Service Admin Listener – A listener service that is informed of all the primitive action the Remote Service Admin performs like importing and exporting as well as errors. • Endpoint Configuration Extender – A bundle that can detect configuration data describing an point Description in a bundle resource, using the extender pattern. • Discovery – An Endpoint Listener that detects the Endpoint Descriptions through some dis protocol. • Cluster – A group of computing systems that closely work together, usually in a fast netwo Remote  Service  Admin • Remote  Service  (Admin)   • Enterprise  SpecificaCon  -­‐  chapter  100   • Enterprise  SpecificaCon  -­‐  chapter  122   Remote Service Admin Entities Figure 122.1 ! Client impl discovered by XML ! ! ! ! ! Imported & Exported Services Endpoint Listener discovers Topology Manager Impl Remote Service Admin Listener Remote Service Admin Impl Discovery Impl announces Remote Service Admin Endpoint Listener 1 0..n 1 0..n to an Endpoint discovers/ announces network/ cluster configured Endpoint
  7. 7. Remote  Service  Admin • Topology  Manager   • Detect  exported  /  imported  services   • Detect  service  interests   ! • Remote  Service  Admin   • Export  /  import  services   • Endpoint  creaCon  through  the  use  of  Endpoint  properCes
  8. 8. 122.6 Discovery Discovery The topology of the distributed system is decided by the Topology Manager. However, in a distrib uted environment, the Topology Manager needs to discover Endpoints in other frameworks. There very large number of ways how a Topology Manager could learn about other Endpoints, ranging from static configuration, a centralized administration, all the way to fully dynamic discovery pro cols like the Service Location Protocol (SLP) or JGroups. To support the required flexibility, this sp ification defines an Endpoint Listener service that allows the dissemination of Endpoint informatio This service provides a symmetric solution because the problem is symmetric: it is used by a Topo ogy Manager to announce changes in its local topology as well as find out about other Endpoint Descriptions. Where those other Endpoint Descriptions come from can vary widely. This design i depicted in Figure 122.5 on page 315. • Publish  endpoints   • Discover  endpoints   • Scoping   Figure 122.5 Topology Information Dissemination Examples ! Static Configuration Managed Service Factory ! ! ! ! Endpoint Listener Topology Manager Configuration Extender extends Network Discovery discovers/ announces discovers announces Endpoint Listener Topology Map displays networks display
  9. 9. Remote  Services «service» Server imported = "true" Server «service» Server remote = "true" ServerStub Client ServerProxy Registry «track» Proxy Publisher Remote Publisher Stubs «service» Discovery Service «service» Discovery Service Proxies
  10. 10. Use  cases • Research  Projects   • STARS/INAETICS   • (Re)Configurable  dynamic  systems   • Machine  2  Machine   • Heterogeneous  systems   • Home  automaCon
  11. 11. Java  ImplementaCons • Apache  CXF  DOSGi   • Transport:  JAX-­‐WS  and  JAX-­‐RS   • Discovery:  Zookeeper   • Eclipse  CF   • Modular  soluCon   • Amdatu  Remote  Services   • Transport:  HTTP  +  JSON,  HTTP  +  Java  SerialisaCon   • Discovery:  SLP,  MulCcastDNS,  Hazelcast   • Growing  project:  open  for  more  protocols
  12. 12. NaCve  ImplementaCons • Apache  Celix   • Transport:  HTTP  +  JSON   • Discovery:  MulCcastDNS,  SLP   • Service  Oriented  Framework  (SOF)   • Corba  based  Remote  Registry
  13. 13. Amdatu/Celix  Remote  Services • HTTP/JSON   • HTTP  is  well  known  and  supported  in  all  languages   • JSON  is  simple  and  lightweight   • MulCcastDNS   • Supported  on  many  pladorms/languages   • Interoperability   • From  C  to  Java  and  vice  versa   • Todo   • Generate  C  code  for  endpoints
  14. 14. Demo  -­‐  Calculator • Calculator  shell  commands   • add  /  sub  /  sqrt public interface public double public double public double } Calculator { add(double a, double b); sub(double a, double b); sqrt(double a); struct calculator_service { calculator_pt example; celix_status_t (*add)(calculator_pt example, double a, double b, double *result); celix_status_t (*sub)(calculator_pt example, double a, double b, double *result); celix_status_t (*sqrt)(calculator_pt example, double a, double *result); };
  15. 15. Thank  you • OSGi   • hfp://www.osgi.org   • Amdatu  Remote  Services   • hfps://bitbucket.org/amdatu/ amdatu-­‐remoteservices   • Apache  Celix   • hfp://incubator.apache.org/ celix/   ! ! ! • Dynamic  Hybrid  Cloud  ApplicaCons   • Wednesday:  14:30  -­‐  15:05   • Schubartsaal   • ConCnuous  Automated  Deployment   with  Apache  ACE   • Thursday:  11:15  -­‐  11.50   • Schubartsaal   ! ! ! !
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×