OSGi Community Event 2010 - SOA Flexibility with OSGi remote services and the service component architecture

908 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
908
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
18
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

OSGi Community Event 2010 - SOA Flexibility with OSGi remote services and the service component architecture

  1. 1. © IBM Corp, 2010. Graham Charters | IBM SOA Flexibility with OSGi Remote Services and the Service Component Architecture
  2. 2. © IBM Corp, 2010. SOA Flexibility with OSGi Remote Services and the Service Component Architecture ...including a demo...or two
  3. 3. © IBM Corp, 2010. SOA Design Principles • Service-based for simple interaction patterns • Loose Coupling so components need not know implementation details and can be bound late • Separation of Concerns so developers can focus on immediate task • Composition and re-composition of assets • Heterogeneity to re-use what we already have
  4. 4. © IBM Corp, 2010. Flexibility • What might we want to be flexible? • Choice of Service Provider? • Choice of Binding? • Qualities of Service? • All of the above
  5. 5. © IBM Corp, 2010. Framework Framework Remote Services Service Provider Bundle Service Provider Bundle Service Consumer Bundle Service Consumer Bundle Pass-by-value Latency Unreliable Pass-by-value Latency Unreliable NetworkNetwork
  6. 6. © IBM Corp, 2010. Framework Framework Distribution Provider Service Provider Bundle Service Provider Bundle Service Consumer Bundle Service Consumer Bundle Distribution Provider Distribution Provider Distribution Provider Distribution Provider Remote Services Provider Configuration Remote Services Provider Configuration endpoint Remote Services Client Configuration Remote Services Client Configuration NetworkNetwork to endpoint Pass-by-value Latency Unreliable Pass-by-value Latency Unreliable
  7. 7. © IBM Corp, 2010. Services Properties Framework Framework Service Provider Bundle Service Provider Bundle Service Consumer Bundle Service Consumer Bundle service.exported.interfaces service.intents service.exported.intents service.exported.intents.extra service.exported.configs <other service properties> service.exported.interfaces service.intents service.exported.intents service.exported.intents.extra service.exported.configs <other service properties> objectClass service.intents service.imported.configs service.imported <other service properties> objectClass service.intents service.imported.configs service.imported <other service properties> endpoint NetworkNetwork to endpoint
  8. 8. © IBM Corp, 2010. Intents • Describe an abstract requirement or capability – Separation of concerns – requirement/capability independent of implementation – Implementation is a deployment choice • Three properties service.intents – provided by the service (local and remote) service.exported.intents – statically configured for remote service.exported.intents.extra – admin configured for remote • Inspired by SCA intents, examples include – confidentiality, integrity, atLeastOnce, atMostOnce, SOAP.v1_1, etc.
  9. 9. © IBM Corp, 2010. Configuration Types • Identifies a type of Distribution Provider specific configuration • Use reverse domain name scheme to avoid conflict • Property naming convention used for extra config service.exported.configs = com.acme.config com.acme.config.host = … com.acme.config.port = ...
  10. 10. © IBM Corp, 2010. OSGi Remote Service Summary • Standardizes basic metadata for distribution – Remote interfaces – Default invocation semantics – Place to hang QoS requirements (intents) – Place to hang distribution provider configuration • However... – Distribution configuration details left to distribution provider • Encryption, signing, protocols, ... – Full configuration not portable – No standard way to configure for interoperability
  11. 11. © IBM Corp, 2010. …enter the SCA Configuration Type • Standardizes detailed distribution provider configuration – Leveraging SCA Bindings, Policy specifications • Fully Portable • Interoperable through interoperable bindings and policy (e.g. WS-*)
  12. 12. © IBM Corp, 2010. Service Configuration • Remote Service properties unchanged service.exported.interfaces = ... service.exported.intents = … etc... • Defines a configuration type following Remote Services spec service.exported.configs = org.osgi.sca org.osgi.sca.bindings = <bindings to use>
  13. 13. © IBM Corp, 2010. SCA Bindings • Configuration for protocols and technologies • Standard bindings (OASIS) – Web services, JMS, JCA • Extensible (e.g. Apache Tuscany) – JSON, JSON-RPC, Atom, RMI, EJB, ... <binding.ws name="OrderServiceBinding" uri="http://localhost:8086/OrderService" /> <binding.ws name="OrderServiceBinding" uri="http://localhost:8086/OrderService" />
  14. 14. © IBM Corp, 2010. SCA Policy • Intents: an abstract requirement or capability (sound familiar?) • PolicySet: an implementation of an intent (using a policy language e.g. WS-Policy) • Ideally the distribution provider is pre-configured so you never need to specify the details PolicySetPolicySet IntentIntent <sca:policySet name="Encrypted" provides="acme:protection" appliesTo="sca:binding.ws" xmlns:wsp="..." xmlns:sp="..."> <wsp:Policy> <wsp:ExactlyOne> <sp:Basic256Rsa15 /> <sp:TripleDesRsa15 /> </wsp:ExactlyOne> </wsp:Policy> </sca:policySet> <sca:policySet name="Encrypted" provides="acme:protection" appliesTo="sca:binding.ws" xmlns:wsp="..." xmlns:sp="..."> <wsp:Policy> <wsp:ExactlyOne> <sp:Basic256Rsa15 /> <sp:TripleDesRsa15 /> </wsp:ExactlyOne> </wsp:Policy> </sca:policySet>
  15. 15. © IBM Corp, 2010. <sca-config ...> <binding.ws name="OrderServiceBinding" uri="http://localhost:8086/OrderService" /> ... </sca-config> <sca-config ...> <binding.ws name="OrderServiceBinding" uri="http://localhost:8086/OrderService" /> ... </sca-config> Configuration Bundle Framework Service Provider Bundle Service Provider Bundle service.exported.configs = org.osgi.sca org.osgi.sca.bindings = OrderServiceBinding service.exported.configs = org.osgi.sca org.osgi.sca.bindings = OrderServiceBinding Configuration BundleConfiguration Bundle Distribution Provider Distribution Provider Extends Bindings, Policy, Intents endpoint SCA-Configuration: ...
  16. 16. © IBM Corp, 2010. Demo (Application Bundles) OSGi Framework FGDBank.webFGDBank.web FGDBank.bizFGDBank.biz FGCBank.apiFGCBank.api FGDBank. chequingAccount FGDBank. chequingAccount FGDBank. lineOfCreditAccount FGDBank. lineOfCreditAccount OSGi Framework FGDBank.creditCheckFGDBank.creditCheck
  17. 17. © IBM Corp, 2010. Demo (adding Config Bundles) OSGi Framework FGDBank.webFGDBank.web FGDBank.bizFGDBank.biz FGCBank.apiFGCBank.api FGDBank. chequingAccount FGDBank. chequingAccount FGDBank. lineOfCreditAccount FGDBank. lineOfCreditAccount OSGi Framework FGDBank.creditCheckFGDBank.creditCheck FGDBank.chequing AccountBindings FGDBank.chequing AccountBindings FGDBank.IineOfCredit AccountBindings FGDBank.IineOfCredit AccountBindings FGDBank.creditCheck Bindings FGDBank.creditCheck Bindings
  18. 18. © IBM Corp, 2010. Demo runtime – EquiTuscAries • Head of Apache Aries + Head of Apache Tuscany on Eclipse Equinox • Fingers cross this will work...
  19. 19. © IBM Corp, 2010. SCA Configuration Type Summary • Standardizes fully-portable distribution provider configuration • Based on SCA Bindings and SCA Policy • Configuration for interoperability through interoperable binding
  20. 20. © IBM Corp, 2010. So where's the Flexibility? • Configuration Bundle lifecycle determines – Endpoint availability – Protocol/technology choice – Quality of Service configuration • Service properties determine – Quality of Service choice – Binding choice • All configurable without changing the service client or provider code
  21. 21. © IBM Corp, 2010. But there's more to SCA than bindings and policy...
  22. 22. © IBM Corp, 2010. What is SCA? • Heterogeneous component assembly • Synchronous, asynchronous, event processing • Pluggable communications protocols • Think Blueprint Service or Spring Framework only with bigger components implemented using different stuff and able to talk to other different stuff...
  23. 23. © IBM Corp, 2010. SCA Overview Composite A Component AService Binding Web Service SCA JCA JMS EJB … Binding Web Service SCA JCA JMS EJB … Component B Service - Java interface - WSDL PortType Reference - Java interface - WSDL PortType Wire PromotePromote Reference Implementation - Java - BPEL - JEE - Spring - Composite …
  24. 24. © IBM Corp, 2010. Where does OSGi fit? • Apache Aries and WebSphere Application Server define an OSGi Application Concept • OSGi Applications fit well as an SCA Component implementation • Re-use OSGi Remote Services metadata or have SCA provide configuration externally for even greater flexibility – SCA looks like a Distribution Provider to OSGi BundleBundle BundleBundle BundleBundle Component Application Customer Component (Widget) Warehouse Component (JEE)
  25. 25. © IBM Corp, 2010. Demo (OSGi Application View) FGDBankApp FGDBank.webFGDBank.web FGDBank.bizFGDBank.biz FGCBank.apiFGCBank.api FGDBank. chequingAccountApp FGDBank. chequingAccount FGDBank. chequingAccount FGDBank. lineOfCreditAccountApp FGDBank. lineOfCreditAccount FGDBank. lineOfCreditAccount “shared” bundle FGDBank. creditCheckApp FGDBank.creditCheckFGDBank.creditCheck
  26. 26. © IBM Corp, 2010. Demo (SCA Assembly View) FGDBankAppSCA FGDBankApp FGDBank.chequingAccoutAppSCA FGDBank. chequingAccountApp FGDBank.creditCheckAppSCA FGDBank.creditCheckApp FGDBank.lineOfCreditAccountAppSCA FGDBank. lineOfCreditAccountApp
  27. 27. © IBM Corp, 2010. Summary • OSGi Remote Services provides basic metadata for Distributing OSGi services • SCA Configuration Type provides detailed portable distribution configuration • SCA leverages OSGi Remote Service metadata to integrate OSGi applications – SCA acts as an OSGi Distribution Provider • Distribution is non-invasive to client and service provider code and therefore enables flexible assembly and re-use
  28. 28. © IBM Corp, 2010. Useful Links • Enterprise OSGi R4 V4.2 Specification – http://www.osgi.org/Download/Release4V42 • Apache Aries – http://incubator.apache.org/aries/ • Apache Tuscany – http://tuscany.apache.org/ • WebSphere Application Server OSGi Applications – http://www-01.ibm.com/software/webservers/appserv/was/featurepacks/osgi/

×