Microservices with MSF4J - WSO2 Meetup

24
Microservice Framework for Java (MSF4J) Afkham Azeez, Director, Architecture, WSO2 Inc.

Transcript of Microservices with MSF4J - WSO2 Meetup

Page 1: Microservices with MSF4J - WSO2 Meetup

Microservice Framework for Java (MSF4J)

Afkham Azeez,Director, Architecture, WSO2 Inc.

Page 2: Microservices with MSF4J - WSO2 Meetup

What is MSF4J?

A lightweight, high performance framework for building microservices in Java

Page 3: Microservices with MSF4J - WSO2 Meetup

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

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

MSF4J- Performance Comparison

Page 6: Microservices with MSF4J - WSO2 Meetup

MSF4J- Memory Consumption Comparison

Page 7: Microservices with MSF4J - WSO2 Meetup

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

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

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

MSF4J– Flow & Thread Model

Page 11: Microservices with MSF4J - WSO2 Meetup
Page 12: Microservices with MSF4J - WSO2 Meetup

Runner

Page 13: Microservices with MSF4J - WSO2 Meetup

Request Streaming

Page 14: Microservices with MSF4J - WSO2 Meetup

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

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

Analytics & Monitoring

Page 17: Microservices with MSF4J - WSO2 Meetup

Metrics Output to Console

Page 18: Microservices with MSF4J - WSO2 Meetup

JMX Metrics

Page 19: Microservices with MSF4J - WSO2 Meetup

Analytics & Monitoring

Page 20: Microservices with MSF4J - WSO2 Meetup

Tooling (Swagger -> Code)Swagger API Definition

MSS Code

1

2

3

Page 22: Microservices with MSF4J - WSO2 Meetup

MSF4J Pet store sample

Page 23: Microservices with MSF4J - WSO2 Meetup

MSF4J Pet store sample

Page 24: Microservices with MSF4J - WSO2 Meetup

Thank You!