Introduction to WSO2 Microservices Framework for Java - MSF4J - WSO2Con Asia 2016

Post on 13-Apr-2017

1.734 views 1 download

Transcript of Introduction to WSO2 Microservices Framework for Java - MSF4J - WSO2Con Asia 2016

Creating Microservices with

WSO2 Microservices Framework for Java (MSF4J)

Afkham Azeez,Director, ArchitectureWSO2 Inc.

What is MSF4J?

A lightweight, high performance framework for building microservices in Java

Recap: Inner & Outer Architectures

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

• 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

MSF4J- Performance Comparison

MSF4J- Memory Consumption Comparison

MSF4J Implementation• Transport is based on Netty 4.0

• Supports streaming

• High performance

• Low memory footprint

• 5MB pack size

• Starts within 300ms

Download

• MSS 1.0.0 release is available at https://github.com/wso2/msf4j/releases/tag/v1.0.0

• Refer to the getting started guide in GitHub• A good place to start is the samples

– https://github.com/wso2/msf4j/tree/v1.0.0/samples

Core Features in MSS

• Quick & simple development model using simple annotations• Lightweight & high performance• Custom interceptors • JWT 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

MSF4J– Flow & Thread Model

Runner

Request Streaming

Security

• Security is done via a central server issuing JWT tokens

• The JWTSecurityInterceptor verifies the signature, expiry & claims in the token

Analytics & Monitoring

• Supports annotations– Timed – measures execution time

–Metered – measures rate of events

–Counted – Counts the total invocations

–HTTPMonitoring – monitors HTTP requests

Analytics & Monitoring

Metrics Output to Console

JMX Metrics

Analytics & Monitoring

Tooling (Swagger -> Code)

Swagger API Definition

MSS Code

1

2

3

MSF4J Pet store sample

MSF4J Pet store sample

Thank You