introduction to wso2 microservices framework for java - msf4j - wso2con asia 2016

25
Creating Microservices with WSO2 Microservices Framework for Java (MSF4J) Afkham Azeez, Director, Architecture WSO2 Inc.

Upload: afkhamazeez

Post on 13-Apr-2017

1.757 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: 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.

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

What is MSF4J?

A lightweight, high performance framework for building microservices in Java

Page 3: Introduction to WSO2 Microservices Framework for Java - MSF4J - WSO2Con Asia 2016
Page 4: Introduction to WSO2 Microservices Framework for Java - MSF4J - WSO2Con Asia 2016

Recap: Inner & Outer Architectures

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

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

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

MSF4J- Performance Comparison

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

MSF4J- Memory Consumption Comparison

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

MSF4J Implementation• Transport is based on Netty 4.0

• Supports streaming

• High performance

• Low memory footprint

• 5MB pack size

• Starts within 300ms

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

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

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

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

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

MSF4J– Flow & Thread Model

Page 12: Introduction to WSO2 Microservices Framework for Java - MSF4J - WSO2Con Asia 2016
Page 13: Introduction to WSO2 Microservices Framework for Java - MSF4J - WSO2Con Asia 2016

Runner

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

Request Streaming

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

Security

• Security is done via a central server issuing JWT tokens

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

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

Analytics & Monitoring

• Supports annotations– Timed – measures execution time

–Metered – measures rate of events

–Counted – Counts the total invocations

–HTTPMonitoring – monitors HTTP requests

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

Analytics & Monitoring

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

Metrics Output to Console

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

JMX Metrics

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

Analytics & Monitoring

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

Tooling (Swagger -> Code)

Swagger API Definition

MSS Code

1

2

3

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

MSF4J Pet store sample

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

MSF4J Pet store sample

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

Thank You