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.
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
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?
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. 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