Modularity, Microservices and Containerisation - Neil Bartlett, Derek Baum

681 views

Published on

OSGi Community Event 2015

This talk will review the current trends of Microservices and Containerisation and explain how, for the Java ecosystem, OSGi has already delivered this vision and addressed the manageability issues that Docker-based systems still face.</p>
The importance of self-describing artifacts and dependency management will reviewed along with an explanation of how this is addressed in OSGi and Docker centric ecosystems.

The talk will conclude with a demonstration showing how OSGi standards can be leveraged to build a compelling Container Orchestration and Runtime environment.

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

No Downloads
Views
Total views
681
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
22
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Modularity, Microservices and Containerisation - Neil Bartlett, Derek Baum

  1. 1. www.paremus.com Transforming the Way the World Runs Applications Copyright © 2012 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. www.paremus.comParemus July 2012 Modularity, Microservices and Containerisation info@paremus.com
  2. 2. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • Docker reigns supreme… • Also: • Rocket (CoreOS) • Solaris Zones • FreeBSD Jails • etc Containers
  3. 3. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • Reduce the pain of shipping apps to production. • Kill off “It Works for Me” syndrome. • Increased security. What Containers are Claimed to Solve
  4. 4. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • Reduce the pain of shipping apps to production. • Consistent way to ship and run applications. • You already know how to run any image. • Increased security. • Hugely powerful for opaque, 3rd Party parts of your app: • MySQL, ZooKeeper, Hadoop, … What Containers Actually Solve
  5. 5. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • Configuration approaches vary widely. • Dependencies still exist! • OS kernel version, CPU, GPU • Network • Dependent Services • Orchestration (solutions are nascent). What Containers Don’t Solve
  6. 6. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • Modularity! • Application code is untouched by containerisation. • Greatest strength and greatest weakness. • All too easy to build containerised monoliths. • Just as hard to maintain, evolve. What Containers Don’t Solve
  7. 7. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • “… an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.” • From the Gospel of Martin Fowler ;-) Microservices
  8. 8. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • Small services • Own process • Lightweight communications • Independently deployable • Automated deployment • May be written in different languages Microservices
  9. 9. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • Separate processes add overhead. • Security risks: every service adds to attack surface. • Sometimes worth it, sometimes not. • This is an implementation choice. • Should not be required by the architectural definition. Microservices
  10. 10. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • OSGi is a great implementation tech for both of these patterns. • First: Microservices An OSGi Approach
  11. 11. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • OSGi Services == Microservices • Lightweight communications, independently deployable, yada yada. • Defer the decision to go remote. • Service boundaries are hard to anticipate • (From 11+ years OSGi development experience!) OSGi Microservices
  12. 12. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 Scale Out… Consumer Provider Consumer Provider
  13. 13. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 Consumer Provider … and Scale In Consumer Provider
  14. 14. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • OSGi Remote Services Admin. • Transparent discovery and distribution for OSGi Services. • Better (but not limited to) OSGi at both ends. Options Provider
  15. 15. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • OSGi Remote Services Admin. • Transparent discovery and distribution for OSGi Services. • Better (but not limited to) OSGi at both ends. Options ProviderConsumer
  16. 16. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • REST. • Layered over OSGi Services (whiteboard). • RFP-173: JAX-RS Services — OSGi Enterprise R7 (hopefully). • Interim: hstaudacher/osgi-jax-rs-connector works well*. Options * But careful of CDDL/GPL on Jersey.
  17. 17. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • Begin your microservices application in OSGi. • Just write interfaces and components! • As the need arises, separate into processes. Summary
  18. 18. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • Second: Containers An OSGi Approach
  19. 19. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • Containers are implementation agnostic. • OSGi gives us internal modularity. • Turtles all the way down. • Reuse APIs and component from your Repository. • Use the Resolver to assemble container content, minimise image size. • Bndtools 3.1+ may support “export as Docker image”. • Easy deployment for Ops people familiar with Docker. OSGi Inside
  20. 20. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • Paremus Packager — announced at EclipseCon, Boston 2013. • Integrates lifecycle of external apps into OSGi. • Originally used custom process launcher. • Rewritten early this year to support Docker. • (non-Dockerised processes still supported). • Bundles can depend on containerised services. • Resolver can solve and provision these dependencies. OSGi Outside
  21. 21. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 OSGi Outside Consumer Require-Capability: com.paremus.packager.pkg.MySQL Endpoint resolve Paremus Service Fabric
  22. 22. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 Consumer Require-Capability: com.paremus.packager.pkg.MySQL MySQL Package Wrapper Provide-Capability: com.paremus.packager.pkg.MySQL resolve provision Paremus Service Fabric Endpoint Start or Attach Container OSGi Outside
  23. 23. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 Consumer Require-Capability: com.paremus.packager.pkg.MySQL MySQL Package Wrapper Provide-Capability: com.paremus.packager.pkg.MySQL resolve provision Paremus Service Fabric Endpoint; uri=jdbc:mysql://192.168.0.1:3306 Start or Attach Container OSGi Outside
  24. 24. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 • Temporal Dependencies • Packager knows when the container is running and available. • Publishes the URL of that service to the distributed app: • e.g.: jdbc:mysql://192.168.0.20:3306 • Using OSGi Remote Services (yay standards) • Injectable by any OSGi component. • Including other Packager wrappers! OSGi Outside
  25. 25. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 WordPress Require-Capability: com.paremus.packager.pkg.MySQL MySQL Package Wrapper Provide-Capability: com.paremus.packager.pkg.MySQL resolve provision Paremus Service Fabric Endpoint; uri=jdbc:mysql://192.168.0.1:3306 Endpoint; uri=http://192.168.0.20:80; app=WordPress 4.1 OSGi Outside
  26. 26. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 OSGi Outside DEMO
  27. 27. www.paremus.com Copyright © 2009 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. Paremus Service Fabric Overview November 2009 Packager Paremus Packager and Demos at docs.paremus.com

×