Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
http://robert.muntea.nu @rombert
Apache Sling as a Microservices Gateway
Apache Sling as a Microservices Gateway
Robert Mu...
http://robert.muntea.nu @rombert
Who I am

$DAYJOB

Adobe Experience
Manager
 Apache Sling
 Apache Jackrabbit
 Apache...
http://robert.muntea.nu @rombert
Agenda
●
Of microservices and monoliths
●
Advantages of microservices
●
Advantages of mon...
http://robert.muntea.nu @rombert
Agenda
●
Of microservices and monoliths
●
Advantages of microservices
●
Advantages of mon...
http://robert.muntea.nu @rombert
Advantages of microservices
http://robert.muntea.nu @rombert
Advantages of microservices – best tool for the job
http://robert.muntea.nu @rombert
Advantages of microservices – always think of failures
http://robert.muntea.nu @rombert
Advantages of microservices – simpler scaling
http://robert.muntea.nu @rombert
Advantages of microservices – faster deployment
http://robert.muntea.nu @rombert
Advantages of microservices – different level of reusability
http://robert.muntea.nu @rombert
Agenda
●
Of microservices and monoliths
●
Advantages of microservices
●
Advantages of mon...
http://robert.muntea.nu @rombert
Advantages of monoliths – crowdsourced wisdom
http://robert.muntea.nu @rombert
Advantages of monoliths – less distributed computing
1. The network is reliable
2. Latenc...
http://robert.muntea.nu @rombert
Advantages of monoliths – Latency/Bandwidth
http://robert.muntea.nu @rombert
Advantages of monoliths – Security
http://robert.muntea.nu @rombert
Advantages of monoliths – less operations overhead
http://robert.muntea.nu @rombert
Advantages of monoliths – less operations overhead
http://robert.muntea.nu @rombert
Advantages of monoliths – better code reuse
http://robert.muntea.nu @rombert
Advantages of monoliths – simpler availabilty
http://robert.muntea.nu @rombert
Advantages of monoliths – easier service discovery
http://robert.muntea.nu @rombert
Advantages of monoliths – easier troubleshooting
http://robert.muntea.nu @rombert
Agenda
●
Of microservices and monoliths
●
Advantages of microservices
●
Advantages of mon...
http://robert.muntea.nu @rombert
A middle ground – value proposition
●
What are you trying to solve with microservices?
●
...
http://robert.muntea.nu @rombert
A middle ground – using an API gateway
Provides:
●
Authentication
●
Authorization
●
KPIs
...
http://robert.muntea.nu @rombert
Agenda
●
Of microservices and monoliths
●
Advantages of microservices
●
Advantages of mon...
http://robert.muntea.nu @rombert
Apache Sling – Brief History
2007
Incubation
2009
TLP
2015
Version 8
200x
Pre-Apache
http://robert.muntea.nu @rombert
Apache Sling – Code Statistics
http://robert.muntea.nu @rombert
Apache Sling – Contributor activity
http://robert.muntea.nu @rombert
Apache Sling – Value proposition
●
Content-oriented
●
RESTful
●
Lightweight
●
OSGi-powere...
http://robert.muntea.nu @rombert
Apache Sling – Repository view of the world
[sling/redirect]
[sling/redirect]
[blog/welco...
http://robert.muntea.nu @rombert
Apache Sling – gateway through ResourceProviders
http://robert.muntea.nu @rombert
Apache Sling – gateway through ResourceProviders
/
/customers
/inventory
/orders
Customer...
http://robert.muntea.nu @rombert
Agenda
●
Of microservices and monoliths
●
Advantages of microservices
●
Advantages of mon...
http://robert.muntea.nu @rombert
Meeting Barry
http://robert.muntea.nu @rombert
Agenda
●
Of microservices and monoliths
●
Advantages of microservices
●
Advantages of mon...
http://robert.muntea.nu @rombert
Demo application - overview
http://robert.muntea.nu @rombert
Demo Application - authentication
http://robert.muntea.nu @rombert
Demo Application - JWT
http://robert.muntea.nu @rombert
Demo Application – Actual demo!!!!1oneone
http://robert.muntea.nu @rombert
Agenda
●
Of microservices and monoliths
●
Advantages of microservices
●
Advantages of mon...
http://robert.muntea.nu @rombert
Conclusions – Apache Sling
●
Eventing, Thread Pooling, Job Management,
Caching
●
Scriptin...
http://robert.muntea.nu @rombert
Conclusions – Microservices
●
Microservices are a useful tool, but make sure you
understa...
http://robert.muntea.nu @rombert
Resources
●
Apache Sling – https://sling.apache.org
●
Apache Jackrabbit
●
https://jackrab...
Upcoming SlideShare
Loading in …5
×

Apache Sling as a Microservices Gateway

Apache Sling as a Microservices Gateway
---

Microservices are definitely the hot topic _du jour_ . Everyone ( and their dog ) is using microservices or migrating towards them. However, there is a gap between the enthusiam for microservices and the ability to create and maintain the infrastructure and culture to effectively use microservices.

Apache Sling is 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. And, as we will see, it is also perfect match for a microservices gateway.

In this talk we will review the pros and cons of microservices and monoliths, and look for middle road that smaller organisations that follow to use services productively. One of the approaches we will outline and demo is an API gateway built on top of Apache Sling, used to adress the cross-cutting concerns that would otherwise be reimplemented by all microservices.

Apache Sling as a Microservices Gateway

  1. 1. http://robert.muntea.nu @rombert Apache Sling as a Microservices Gateway Apache Sling as a Microservices Gateway Robert Munteanu, Adobe Systems Voxxed Days Bucharest 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 ● Of microservices and monoliths ● Advantages of microservices ● Advantages of monoliths ● A middle ground? ● Apache Sling primer ● Meeting Barry ● Demo Application ● Conclusion
  4. 4. http://robert.muntea.nu @rombert Agenda ● Of microservices and monoliths ● Advantages of microservices ● Advantages of monoliths ● A middle ground? ● Apache Sling primer ● Meeting Barry ● 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 – faster deployment
  10. 10. http://robert.muntea.nu @rombert Advantages of microservices – different level of reusability
  11. 11. http://robert.muntea.nu @rombert Agenda ● Of microservices and monoliths ● Advantages of microservices ● Advantages of monoliths ● A middle ground? ● Apache Sling primer ● Meeting Barry ● Demo Application ● Conclusion
  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 availabilty
  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 ● Of microservices and monoliths ● Advantages of microservices ● Advantages of monoliths ● A middle ground? ● Apache Sling primer ● Meeting Barry ● Demo Application ● Conclusion
  23. 23. http://robert.muntea.nu @rombert A middle ground – value proposition ● What are you trying to solve with microservices? ● What level of technical diversity does your organisation have? ● Are you confortable with partially embracing microservices?
  24. 24. 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
  25. 25. http://robert.muntea.nu @rombert Agenda ● Of microservices and monoliths ● Advantages of microservices ● Advantages of monoliths ● A middle ground? ● Apache Sling primer ● Meeting Barry ● Demo Application ● Conclusion
  26. 26. http://robert.muntea.nu @rombert Apache Sling – Brief History 2007 Incubation 2009 TLP 2015 Version 8 200x Pre-Apache
  27. 27. http://robert.muntea.nu @rombert Apache Sling – Code Statistics
  28. 28. http://robert.muntea.nu @rombert Apache Sling – Contributor activity
  29. 29. http://robert.muntea.nu @rombert Apache Sling – Value proposition ● Content-oriented ● RESTful ● Lightweight ● OSGi-powered ● Easily deployable
  30. 30. 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
  31. 31. http://robert.muntea.nu @rombert Apache Sling – gateway through ResourceProviders
  32. 32. http://robert.muntea.nu @rombert Apache Sling – gateway through ResourceProviders / /customers /inventory /orders Customer µService Inventory µService Orders µService Logging KIPMeasurement CircuitBreakers Authentication Authorization
  33. 33. http://robert.muntea.nu @rombert Agenda ● Of microservices and monoliths ● Advantages of microservices ● Advantages of monoliths ● A middle ground? ● Apache Sling primer ● Meeting Barry ● Demo Application ● Conclusion
  34. 34. http://robert.muntea.nu @rombert Meeting Barry
  35. 35. http://robert.muntea.nu @rombert Agenda ● Of microservices and monoliths ● Advantages of microservices ● Advantages of monoliths ● A middle ground? ● Apache Sling primer ● Meeting Barry ● 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 ● Of microservices and monoliths ● Advantages of microservices ● Advantages of monoliths ● A middle ground? ● Apache Sling primer ● Meeting Barry ● 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

×