microservices with msf4j - wso2 meetup
TRANSCRIPT
![Page 1: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/1.jpg)
Microservice Framework for Java (MSF4J)
Afkham Azeez,Director, Architecture, WSO2 Inc.
![Page 2: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/2.jpg)
What is MSF4J?
A lightweight, high performance framework for building microservices in Java
![Page 3: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/3.jpg)
Vision for MSF4J Lightweight & fast runtime
Use Java annotations as a way of defining microservices APIs as well as metrics
Support well known & widely used methods such as JAXRS annotations
Provide simple ways to develop & deploy microservices
![Page 4: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/4.jpg)
Vision for MSF4J Built-in Metrics & Analytics APIs with out of the box
integration with WSO2 Data Analytics Server (DAS)
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
![Page 5: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/5.jpg)
MSF4J- Performance Comparison
![Page 6: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/6.jpg)
MSF4J- Memory Consumption Comparison
![Page 7: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/7.jpg)
MSF4J ImplementationTransport is based on Netty 4.0
Supports streaming
High performance
Low memory footprint
5MB pack size
Starts within 300ms
![Page 8: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/8.jpg)
DownloadMSS 1.0.0 release is available at
https://github.com/wso2/msf4j/releases/tag/v1.0.0Refer to the getting started guide in GitHubA good place to start is the samples
https://github.com/wso2/msf4j/tree/v1.0.0/samples
![Page 9: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/9.jpg)
Core Features Quick & simple development model using simple annotations Lightweight & high performance Custom interceptors JWT & OAuth based security Metrics gathering & publishing Tracing of requests using a unique message ID Streaming input & streaming output support WSO2 DevStudio based tooling for generating microservices projects
starting from a Swagger API definition Comprehensive samples demonstrating how to develop microservices
application
![Page 10: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/10.jpg)
MSF4J– Flow & Thread Model
![Page 11: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/11.jpg)
![Page 12: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/12.jpg)
Runner
![Page 13: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/13.jpg)
Request Streaming
![Page 14: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/14.jpg)
SecuritySecurity is done via a central server
issuing JWT tokens Security interceptors verifies the
signature, expiry & claims in the token
![Page 15: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/15.jpg)
Analytics & Monitoring
Supports annotationsTimed – measures execution timeMetered – measures rate of eventsCounted – Counts the total invocationsHTTPMonitoring – monitors HTTP
requests
![Page 16: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/16.jpg)
Analytics & Monitoring
![Page 17: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/17.jpg)
Metrics Output to Console
![Page 18: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/18.jpg)
JMX Metrics
![Page 19: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/19.jpg)
Analytics & Monitoring
![Page 20: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/20.jpg)
Tooling (Swagger -> Code)Swagger API Definition
MSS Code
1
2
3
![Page 21: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/21.jpg)
MSF4J in Action!
https://github.com/afkham/wso2conasia2016
https://github.com/sagara-gunathunga/msf4j-intro-webinar-samples
![Page 22: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/22.jpg)
MSF4J Pet store sample
![Page 23: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/23.jpg)
MSF4J Pet store sample
![Page 24: Microservices with MSF4J - WSO2 Meetup](https://reader036.vdocuments.net/reader036/viewer/2022062306/588a57941a28ab7a768b4ca1/html5/thumbnails/24.jpg)
Thank You!