Successfully reported this slideshow.
Your SlideShare is downloading. ×

Of microservices and microservices

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 43 Ad

Of microservices and microservices

Download to read offline



Microservices are definitely the hot topic du jour . Everyone ( and their dog ) is using microservices or migrating towards them. To make things more interesting, the OSGi community has been talking about microservices for 6 years now, so now we have two clashing definitions of the term.

Besides the dreaded monolith and the famed microservices-based architecture there is plenty of room for a middle ground, where an API gateway mediates between a host of microservices and their consumers. Such a gateway solves multiple cross-cutting concerns, such as authentication, API standardisation, logging and decoupling the API evolution. As it turns out, OSGi is an ideal setting for building such an application.

The API gateway implementation demoed is based on Apache Sling - an innovative web framework built on top of the Java Content Repository (JCR), that uses OSGi for its component model and fosters RESTful application design. Although we will use Apache Sling for examples, previous knowledge of Sling or its components is not required.



Microservices are definitely the hot topic du jour . Everyone ( and their dog ) is using microservices or migrating towards them. To make things more interesting, the OSGi community has been talking about microservices for 6 years now, so now we have two clashing definitions of the term.

Besides the dreaded monolith and the famed microservices-based architecture there is plenty of room for a middle ground, where an API gateway mediates between a host of microservices and their consumers. Such a gateway solves multiple cross-cutting concerns, such as authentication, API standardisation, logging and decoupling the API evolution. As it turns out, OSGi is an ideal setting for building such an application.

The API gateway implementation demoed is based on Apache Sling - an innovative web framework built on top of the Java Content Repository (JCR), that uses OSGi for its component model and fosters RESTful application design. Although we will use Apache Sling for examples, previous knowledge of Sling or its components is not required.

Advertisement
Advertisement

More Related Content

Advertisement

More from Robert Munteanu (19)

Advertisement

Recently uploaded (20)

Of microservices and microservices

  1. 1. http://robert.muntea.nu @rombert Of Microservices and Microservices Of Microservices and Microservices Robert Munteanu, Adobe Systems OSGi Community Event 2016
  2. 2. http://robert.muntea.nu @rombert Who I am  $DAYJOB  Adobe Experience Manager  Apache Sling  Apache Jackrabbit  Apache Felix  Open Source  Apache Sling  MantisBT  Mylyn Connector for MantisBT  Mylyn Connector for Review Board
  3. 3. http://robert.muntea.nu @rombert Agenda ● Microservices and monoliths ● Microservices and microservices ● A middle ground? ● Apache Sling primer ● Demo Application ● Conclusion
  4. 4. http://robert.muntea.nu @rombert Agenda ● Microservices and monoliths ● Microservices and microservices ● A middle ground? ● Apache Sling primer ● Demo Application ● Conclusion
  5. 5. http://robert.muntea.nu @rombert Advantages of microservices
  6. 6. http://robert.muntea.nu @rombert Advantages of microservices – best tool for the job
  7. 7. http://robert.muntea.nu @rombert Advantages of microservices – always think of failures
  8. 8. http://robert.muntea.nu @rombert Advantages of microservices – simpler scaling
  9. 9. http://robert.muntea.nu @rombert Advantages of microservices – different level of reusability
  10. 10. http://robert.muntea.nu @rombert Advantages of microservices – faster deployment
  11. 11. http://robert.muntea.nu @rombert Advantages of microservices – faster delivery Week 1 Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8 Release Release Release Week 1h Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8 Search Catalogue Payment Payment Search Payment Catalogue Payment Search Payment Payment Search Catalogue Payment Payment
  12. 12. http://robert.muntea.nu @rombert Advantages of monoliths – crowdsourced wisdom
  13. 13. http://robert.muntea.nu @rombert Advantages of monoliths – less distributed computing 1. The network is reliable 2. Latency is zero 3. Bandwidth is infinite 4. The network is secure 5. Topology doesn't change 6. There is one administrator 7. Transport cost is zero 8. The network is homogeneous The Eight Fallacies of Distributed Computing, Peter Deutsch, 1994
  14. 14. http://robert.muntea.nu @rombert Advantages of monoliths – Latency/Bandwidth
  15. 15. http://robert.muntea.nu @rombert Advantages of monoliths – Security
  16. 16. http://robert.muntea.nu @rombert Advantages of monoliths – less operations overhead
  17. 17. http://robert.muntea.nu @rombert Advantages of monoliths – less operations overhead
  18. 18. http://robert.muntea.nu @rombert Advantages of monoliths – better code reuse
  19. 19. http://robert.muntea.nu @rombert Advantages of monoliths – simpler availability Ordering Search Catalogue User Preferences
  20. 20. http://robert.muntea.nu @rombert Advantages of monoliths – easier service discovery
  21. 21. http://robert.muntea.nu @rombert Advantages of monoliths – easier troubleshooting
  22. 22. http://robert.muntea.nu @rombert Agenda ● Microservices and monoliths ● Microservices and microservices ● A middle ground? ● Apache Sling primer ● Demo Application ● Conclusion
  23. 23. http://robert.muntea.nu @rombert Microservices and microservices
  24. 24. http://robert.muntea.nu @rombert How to choose? ● What are you trying to solve with microservices? ● What level of technical diversity does your organisation have? ● Are you confortable with partially embracing microservices?
  25. 25. http://robert.muntea.nu @rombert Agenda ● Microservices and monoliths ● Microservices and microservices ● A middle ground? ● Apache Sling primer ● Demo Application ● Conclusion
  26. 26. http://robert.muntea.nu @rombert A middle ground – using an API gateway Provides: ● Authentication ● Authorization ● KPIs ● Circuit breakers ● API adaptions Must be: ● Lightweight ● Stateless ● Extensible
  27. 27. http://robert.muntea.nu @rombert Agenda ● Microservices and monoliths ● Microservices and microservices ● A middle ground? ● Apache Sling primer ● Demo Application ● Conclusion
  28. 28. http://robert.muntea.nu @rombert Apache Sling – Brief History 2007 Incubation 2009 TLP 2015 Version 8 200x Pre-Apache
  29. 29. http://robert.muntea.nu @rombert Apache Sling – Code Statistics
  30. 30. http://robert.muntea.nu @rombert Apache Sling – Contributor activity
  31. 31. http://robert.muntea.nu @rombert Apache Sling – Value proposition ● Content-oriented ● RESTful ● Lightweight ● OSGi-powered ● Easily deployable
  32. 32. http://robert.muntea.nu @rombert Apache Sling – Repository view of the world [sling/redirect] [sling/redirect] [blog/welcome] [blog/page] / /content /content/blog /content/blog/hello-world
  33. 33. http://robert.muntea.nu @rombert Apache Sling – gateway through ResourceProviders
  34. 34. http://robert.muntea.nu @rombert Apache Sling – gateway through ResourceProviders / /customers /inventory /orders Customer µService Inventory µService Orders µService Logging KIPMeasurement CircuitBreakers Authentication Authorization
  35. 35. http://robert.muntea.nu @rombert Agenda ● Microservices and monoliths ● Microservices and microservices ● A middle ground? ● Apache Sling primer ● Demo Application ● Conclusion
  36. 36. http://robert.muntea.nu @rombert Demo application - overview
  37. 37. http://robert.muntea.nu @rombert Demo Application - authentication
  38. 38. http://robert.muntea.nu @rombert Demo Application - JWT
  39. 39. http://robert.muntea.nu @rombert Demo Application – Actual demo!!!!1oneone
  40. 40. http://robert.muntea.nu @rombert Agenda ● Microservices and monoliths ● Microservices and microservices ● A middle ground? ● Apache Sling primer ● Demo Application ● Conclusion
  41. 41. http://robert.muntea.nu @rombert Conclusions – Apache Sling ● Eventing, Thread Pooling, Job Management, Caching ● Scripting: Groovy, Scala, JSP, Sightly, Java, Ruby, Thymeleaf ● Flexible resource rendering with resource types ● Very extensible due to being internally powered by OSGi – most extension points available to clients
  42. 42. http://robert.muntea.nu @rombert Conclusions – Microservices ● Microservices are a useful tool, but make sure you understand the tradeoffs ● Microservices are not an all-or-nothing proposition, pick what is best for your organisation ● An API gateway can bring a lot of value to a microservices deployment ● Try Apache Sling today
  43. 43. http://robert.muntea.nu @rombert Resources ● Apache Sling – https://sling.apache.org ● Apache Jackrabbit ● https://jackrabbit.apache.org ● http://jackrabbit.apache.org/oak/ ● JWT – https://jwt.io ● Netflix Hystrix - https://github.com/Netflix/Hystrix

×