Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Like this? Share it with your network

Share

OSGi for Enterprises

  • 2,349 views
Uploaded on

OSGi for Enterprises by Holger Hoffstätte & Robert Dunne (Paremus) at OSGi Users Forum UK, 23rd Nov 2010.

OSGi for Enterprises by Holger Hoffstätte & Robert Dunne (Paremus) at OSGi Users Forum UK, 23rd Nov 2010.

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,349
On Slideshare
2,349
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
43
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Transforming the Way OSGi For Enterprises the World Runs Applications Video Podcast available - http://skillsmatter.com/podcast/java-jee/osgi-for-enterprises/rl-311 Holger Hoffstätte The new Nimble Distribution with RSA holger.hoffstatte@paremus.com Available in December Robert Dunne 








http://nimble.paremus.com/distribution robert.dunne@paremus.comParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 2. Agenda Transforming the Way • Demo Technology OverviewRuns Applications the World • Local Demo Walkthrough • OSGi Remote Services (Holger)Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 3. Technologies Transforming the Way • OSGi the World Runs Applications • Scala + Lift • HTML + CSS + Javascript (JQuery)Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 4. Build Tools • Bnd Transforming the Way • the World Runs Applications Eclipse PDE • Apache Sigil • Tycho • BndtoolsParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 5. Nimble Transforming the Way • OSGi Distribution the World Runs Applications • Posh: Bash like shell for OSGi based on Apache Gogo • Nimble Resolver: APT like installation system for OSGiParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 6. Declarative Services Transforming the Way • Dynamicthe World Runs Applications Dependency Injection & Service Publication • Reduce Accidental Temporal Dependencies • Increase ResilienceParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 7. Configuration Admin Transforming the Way • Modular,the World Runs Applications Dynamic Configuration & Reconfiguration • PIDs: Named Property lists • Integrates with Declarative ServicesParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 8. Transforming the Way OSGi Remote Services the World Runs Applications A Flexible Foundation for Composite ApplicationsParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 9. Who am I? • Transforming the Way Holger Hoffstätte (aka @asynchronaut) Living & working in Germany, near Cologne the World Runs Applications • Consulting Engineer for Paremus Ltd. Working on next-generation Service Fabric product line • >20 years experience with concurrent/distributed systems, incl. Agile/ Process coaching, AOP, B2B, Enterprise Integration etc.Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 10. Whats this about? • Transforming the Way OSGi & Remote Services: Motivation & History the World Runs Applications • Overview of Remote Services/RSA Specifications • Applicability & Use Cases little to no code!Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 11. OSGi = SOA! • Transforming the Way Physical and logical isolation of Bundles • the World Runs Applications Bundle Wiring with dynamic behaviour • Service registration, discovery & matching • Lifecycle control • In R4.2: scoped visibility of services & eventsParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 12. Systems Hygiene: simply a good idea Transforming the Way “The ability of OSGi to handle complexthe World Runs Applications systems as a set of interdependent modules is kind of like toilet paper: Sooner or later, youre going to want to use it.” – Hal HildebrandParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 13. ..but what about Distributed Systems? Transforming the Way the World Runs ApplicationsParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 14. ..hmm..why not.. Transforming the Way “Just use RMI or EJB! Its built-in and Standard!” Runs Applications the World – your local Architecture Astronaut ...ooomphhParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 15. /** * Implementation of ICustomRemote Interface. */ public class CustomRemoteImpl extends UnicastRemoteObject implements ICustomRemote { /** * Necessary because Super-Class constructor throws RemoteException. Transforming the Way * @throws java.rmi.RemoteException Will be thrown if there are some network * errors. */ public CustomRemoteImpl() throws RemoteException { the World Runs Applications } /** * Returns a string which say Hello World with RMI. * @return the string which holds the value. * @throws java.rmi.RemoteException Will be thrown if there are some network * problems. */ public String sayHello() throws RemoteException { :-( return "Hello World with RMI."; } }Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 16. ..hmm..why not.. Transforming the Way “We should just use JMS or our Enterprisey Service Bus for Runs Applications the World everything!” – probably someone on your team ..alrighty then..Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 17. ..hmm..why not.. Transforming the Way “I know! We can simply write our own RPCthe World Its library over sockets! Runs Applications so easy! I did that back in Uni!” – your “Rock Star” intern ..oh noes!Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 18. Sad Reality • Any kind of distribution often still hardwired into “stuff” Transforming the Way (and nobody really understands how it works..or wants to) • System evolutionWorld Runs Applications the often burdened with architectural decisions at the wrong time of the development cycle: • Distribution features added either “too early” or “too late” • Negatively impacts time-to-feature & subsystem/integration testing • Iterations increasingly resemble wading through mud that keeps getting deeperParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 19. Silver Lining? • Transforming the Way Previous attempts: Tuscany SCA, R-OSGi, Newton.. the or less similarRuns Applications • All have more World ideas: composite applications, distributed wiring.. • All more or less incompatible with each other and/or “standard” OSGiParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 20. Key Realizations Transforming ALL aspects: the Way • Distributed systems need adaptability for the World Runs Applications development, testing, deployment, runtime, maintenance • No Silver Bullet/Golden Hammer possible: too many contradicting requirements like availability, cost, licensing, interop, latency, knowledge, security..Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 21. Standardize interaction, not features! Transforming the Way • Allow multiple implementations using different technologies side-by-side World Runs Applications the • Prevent “Golden Hammer Syndrome”: dont force choice of one technology for every kind of interaction, even when inappropriateParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 22. Consequences Transforming the Way • Almost-transparent extension of the OSGi service model: the World Runs Applications no explicit infrastructure API in “user code”! • No mandated use of SOAP/RMI/HTTP/JMS/etc.: choice of technology can be driven by requirements • anything that moves bytes from A to B should be usable as transport!Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 23. OSGi EEG to the Rescue! Transforming the Way • Definition of Remote Services in OSGi R4.2 the World Runs Applications • Two minimalistic specs that accommodate each other: • Remote Services: the “mechanics” of transports • Remote Service Admin: standardized discovery & import/export visibility controlParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 24. Remote Services Transforming the Way the World Runs ApplicationsParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 25. Remote Services Transforming the Way • Standardized Service Properties define the interaction between participants World Runs Applications the • Abstract “Intents” specify context-dependent “required vs. provided” capabilities; matched by standard OSGi filters • Flexible configuration: properties, code, vendor-specific..Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 26. Remote Services Transforming the Way Easier cross-platform integration for OSGi! the World Runs Applications ProtocolBuffers, Thrift, JSON-RPC, Avro..Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 27. Remote Service Admin Transforming the Way the World Runs ApplicationsParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 28. Remote Service Admin Transforming the Way • RSA itself merely an abstract control interface for implementors, the World Runs Applications usually the vendor of a distribution provider • Discovery providers discover/announce services on the network • “Topology Manager” controls import/export visibility; specifics left to implementation innovation!Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 29. Discovery Transforming the Way • Discovery providers are simply “EndpointListeners” the World Runs Applications that map a specific service announcement to & from a standardized “EndpointDescription” • Can use any mechanism that can store & update service state/visibility • Obvious candidates: SLP, DNS-SD, Data Distribution Service, Apache Zookeeper, RDBMS, Data Grids, P2P Systems, DHTs..Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 30. Sounds awesome! Transforming the Way the World Runs ApplicationsParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 31. ..but not so fast! Transforming the Way • Service interactions defined by Java interface the World Runs Applications – well-understood :-) – not very flexible :-( • Fundamental limits to what can be expressed with a synchronous RPC model • Fallacies of Distributed Computing etc.Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 32. Problems with RPC Transforming the Way • Lack of reliability necessitates Fault Detection (active & passive) the World Runs Applications • Call-by-reference vs. Call-by-value: impact on interaction semantics that cannot be ignored • Latency spikes will introduce strong variance in perceived behaviour • Variance adds up if remote services are chainedParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 33. OSGi helps! Transforming the Way faults: • Cant fix the network, but does help with „unexpected“ the World Runs Applications org.osgi.framework.ServiceException extends RuntimeException • Service are expected to be dynamic – no change! :-) • What changes is the scope of a disappearing service - ...but does that really matter? Gone is gone!Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 34. Actual Benefits (1) Transforming thekeeps crashing Way • Isolate that special third-party native code that the World Runs Applications your entire JVM • Operational isolation through service visibility policies smaller/faster test cycles faster time-to-feature no accidental crosstalk between development teams runtime: security, confidentiality..Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 35. Actual Benefits (2) Transforming the Way services in • Ops teams usually more open to dynamic updates of isolated separate processes – much Runs Applications the World easier now • Service Migration on host downtime switching services much faster than host recovery/reboot • Service selection based on cost/performance/latency.. finally a good reason to do proper end-to-end system design :)Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 36. Implementations Transforming the Way the World Runs on Eclipse Communication FrameworkRSA Reference Implementation using ApacheCXF and Zookeeper Built Applications Based on RI but rewritten for correctness, extensibility, RSA Built with Tuscany/SCA? compliance. Basis for commercial product.Paremus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.
  • 37. Transforming the Way Thank You the World Runs Applications Holger Hoffstätte The new Nimble Distribution with RSA holger.hoffstatte@paremus.com Available in December 








http://nimble.paremus.com/distribution Robert Dunne robert.dunne@paremus.comParemus www.paremus.com Nov 2010 Copyright © 2010 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved.