In this slides we discuss What is Microservice and why we should use it. Also discuss Microservices outer architecture,
WSO2 Microservice movement,
Introduction to WSO2 MSF4J and how we can
develop Microservices with MSF4J(security, metrics etc. )
Automate your Kamailio Test Calls - Kamailio World 2024
Building Services with WSO2 Microservices Framework for Java
1. Building Services with WSO2
Microservices Framework for
Java
Sanjeewa Malalgoda
Technical Lead and Product Lead ( WSO2 API Manager)
2. Agenda
o What is Microservice?
o Why Microservice?
o Microservices outer architecture.
o WSO2 Microservice movement.
o Introduction to WSO2 MSF4J
o Implementation of WSO2 MSF4J
o Develop Microservices with MSF4J(security, metrics etc. )
o Demo.
3. What is Microservice?
o Microservice architectural style is an approach to
developing a single application as a suite of small
services.
o Each running in its own process and communicating with
lightweight mechanisms.
o These services are built,
o Around business capabilities.
o Independently deployable by fully automated
deployment machinery.
Ref: http://martinfowler.com/microservices/
4. What is Microservice?
o There is a bare minimum of centralized management of
these services,
o which may be written in different programming
languages
o And use different data storage technologies.
Ref: http://martinfowler.com/microservices/
5. What is Microservice?
o Microservice is,
o Small.
o Running on its own process.
o Communicating often via http.
o Built around different business capabilities.
o Written in different languages.
o Use different data storage technologies.
o Independently deployable by fully automated process.
6. What is Microservice?
o Microservice is,
o Small.
o Running on its own process.
o Communicating often via http.
o Built around different business capabilities.
o Written in different languages.
o Use different data storage technologies.
o Independently deployable by fully automated
process.
7. Why Microservice?
o Problem with “big application” (a.k.a. “monolithic”)
o Let say you have bigger application and you need to
scale it.
Scale, High availability
9. Why Microservice?
o Solution
o Split your “bigger application” into smaller granules that
can be deployed independently
o Split into Microservices
10. Why Microservice?
o Solution
o Scale/ Replicate each component individually. Because
each smaller service is microservice now. And they can be
deploy independently.
11. Why Microservice?
o Replication can be restricted to those components that
turn out bottleneck(we can scale) , critical(we can go for
HA) without paying all components of “big application”
16. Introduction to WSO2 MSF4J
o Lightweight & fast runtime
o Use Java annotations as a way of defining microservices APIs
as well as metrics
o Support well known & widely used methods such as JAX-RS
annotations
o Provide simple ways to develop & deploy microservices
o Built-in Metrics & Analytics APIs with out-of-the-box
integration with WSO2 Data Analytics Server (DAS)
o To be used in the WSO2 platform as a way of replacing all
admin services as well as defining other microservices for
inter-component interactions
17. Implementation of WSO2 MSF4J
o Based on the new WSO2 Carbon 5.0 kernel
o Transport is based on Netty 4.0
o Supports streaming
o High performance
o 5MB pack size
o Starts within 300ms
o ~25MB memory consumption for the framework
20. Advantages of WSO2 MSF4J
o Quick & simple development model using simple annotations
o Lightweight & high performance
o Custom interceptors
o OAuth based security
o Metrics gathering & publishing
o Streaming input & streaming output support
o WSO2 DevStudio based tooling for generating microservices
projects starting from a Swagger API definition
o Comprehensive samples demonstrating how to develop
microservices application.
25. Security
o Security is done via a central server issuing JWT or OAuth
tokens.
o The OAuth2SecurityInterceptor verifies the token before
accessing the resources.