+ All Categories
Home > Technology > WSO2 Microservices Framework for Java - Product Overview

WSO2 Microservices Framework for Java - Product Overview

Date post: 13-Feb-2017
Category:
Upload: wso2-inc
View: 199 times
Download: 8 times
Share this document with a friend
34
WSO2 Microservices Framework for Java 2.0.0 Overview
Transcript
Page 1: WSO2 Microservices Framework for Java - Product Overview

WSO2 Microservices Framework for Java 2.0.0

Overview

Page 2: WSO2 Microservices Framework for Java - Product Overview

Agenda

•  Introduction

•  Core Features

•  Performance

•  Deployment

2  

Page 3: WSO2 Microservices Framework for Java - Product Overview

Introduction

3  

Page 4: WSO2 Microservices Framework for Java - Product Overview

Microservices

•  Small independent processes achieving small tasks, which work together to ultimately compose a complex application

4  

Ref: http://martinfowler.com/articles/microservices/images/sketch.png

Page 5: WSO2 Microservices Framework for Java - Product Overview

Microservices Architecture

•  Modular and composable

•  Easy to maintain - Components can be easily replaced and bugs in one component can be fixed without affecting others

•  Highly scalable

•  Easy deployment

5  

Page 6: WSO2 Microservices Framework for Java - Product Overview

WSO2 Microservices Framework for Java

•  A lightweight, high performance framework for building microservices in Java

•  Simple Java based programming model with JAX-RS and Swagger based annotations

•  Fast boot up - microservices can be booted in a few milliseconds in a Docker container and can be easily added to a Docker image

•  Secures microservices leveraging JWT, BasicAuth and OAuth2 and has the capability to integrate with third-party authentication servers

•  Monitors microservices service behavior with analytics dashboards

6  

Page 7: WSO2 Microservices Framework for Java - Product Overview

Vision of WSO2 MSF4J

•  Lightweight and fast runtime

•  Use Java annotations as a way of defining microservices APIs as well as met

•  Provide simple ways to develop and deploy microservices

•  Built-in metrics and analytics APIs with OOB integration with WSO2 Data Analytics Server (WSO2 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

7  

Page 8: WSO2 Microservices Framework for Java - Product Overview

Implementation of WSO2 MSF4J

•  Based on the new WSO2 Carbon 5.0 Kernel

•  Transport is based on Netty 4.0

•  Supports streaming

•  High performance

•  9MB pack size

•  Starts within 300 ms

•  Less than 25 MB memory consumption for the framework

8  

Page 9: WSO2 Microservices Framework for Java - Product Overview

Core Features

9  

Page 10: WSO2 Microservices Framework for Java - Product Overview

Annotation-based Programming Model

•  Supports JAX-RS based annotations •  Class-level annotations

•  Method-level annotations

•  Parameter-level annotations

•  Lifecycle callback method annotations

•  Supports Swagger based annotations •  Enables generating Swagger API definition from a single API call

•  Humans and computers can discover and understand the capabilities of each service

10  

Page 11: WSO2 Microservices Framework for Java - Product Overview

Spring-based Microservices

•  WSO2 MSF4J Supports a Spring-native development model with •  Dependency Injection (DI)

•  Standard configuration annotations (e.g. @Configuration, @Component, @AutoWired)

•  Makes it easy to bring in other 3rd party libraries & wire them in at runtime

•  For example those who are familiar with Spring-JPA can use the Spring-JPA library to integrate the Hibernate ORM framework with an WSO2 MSF4J service

11  

Page 12: WSO2 Microservices Framework for Java - Product Overview

Server-less Execution

•  Supports server-less execution with fat JAR

•  Fat JAR is a JAR file with all dependencies in one fat (uber) JAR

•  Creating a fat JAR and running it in a Java process is referred to as server-less execution

•  Server-less execution does not involve unzipping a file and helps to start an app without a shell script

•  Supports service lifecycle methods

•  Easy to run within a container-friendly model

12  

Page 13: WSO2 Microservices Framework for Java - Product Overview

Streaming

•  WSO2 MSF4J adopts an efficient model to handle Streaming Input (request messages) and Streaming Output (response messages)

•  Streaming Input - HTTP chunked requests can be handled in two ways:

•  Zero-copy method – Each chunk of a request is treated separately •  chunk() method is called when requests arrive •  finished () method is called after the last chunk arrives •  error () method called if an error occurs while processing the request

•  Chunk aggregation – Aggregates all chunks of the request and presents it as a full http request to the resource method

•  Streaming Output – Useful when handling large data volumes – no need to load into memory

13  

Page 14: WSO2 Microservices Framework for Java - Product Overview

Custom Interceptors

•  Custom interceptors can be used to perform certain actions before or after a request arrives to resource methods

•  Custom interceptors should implement theorg.wso2.msf4j.Interceptor interface

14  

Page 15: WSO2 Microservices Framework for Java - Product Overview

File Handling

•  Serve files from the resource methods by returning either of the following •  java.io.File •  java.io.InputStream •  javax.ws.rs.core.Response object with a java.io.File •  java.io.InputStream entity

•  Streaming is supported by default for java.io.File and java.io.InputStream entities

•  javax.ws.rs.core.StreamingOutput is also supported by WSO2 MSF4J - provides the service author more control over the chunk size

15  

Page 16: WSO2 Microservices Framework for Java - Product Overview

Templates

•  Enables dynamic Web pages to be easily developed as microservices

•  Any data model can be easily rendered with a template and exposed as a REST service using this concept

16  

Page 17: WSO2 Microservices Framework for Java - Product Overview

Exception Mapper

•  Supports JAXRS ExceptionMapper, which allows the creation of custom responses when exceptions are thrown from MSF4J services

•  The following code segment shows how ExceptionMappers are registered with the WSO2 MSF4J runtime:

17  

Page 18: WSO2 Microservices Framework for Java - Product Overview

Circuit Breaker

•  Nygard's circuit breaker pattern is supported in

WSO2 MSF4J using the Netflix Hystrix library

18  

Page 19: WSO2 Microservices Framework for Java - Product Overview

Thread Model

19  

Page 20: WSO2 Microservices Framework for Java - Product Overview

Security

•  Security is done via a central server issuing JWT tokens

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

20  

Page 21: WSO2 Microservices Framework for Java - Product Overview

Analytics and Monitoring

•  Supports annotations •  Timed – measures execution time •  Metered – measures rate of events •  Counted – counts the total number of invocations •  HTTPMonitored – monitors HTTP requests

21  

Page 22: WSO2 Microservices Framework for Java - Product Overview

Metrics Output to Console

22  

Page 23: WSO2 Microservices Framework for Java - Product Overview

JMX Metrics

23  

Page 24: WSO2 Microservices Framework for Java - Product Overview

Dashboards

24  

Page 25: WSO2 Microservices Framework for Java - Product Overview

Performance

25  

Page 26: WSO2 Microservices Framework for Java - Product Overview

26  

Page 27: WSO2 Microservices Framework for Java - Product Overview

27  

Page 28: WSO2 Microservices Framework for Java - Product Overview

28  

Page 29: WSO2 Microservices Framework for Java - Product Overview

29  

Page 30: WSO2 Microservices Framework for Java - Product Overview

30  

Page 31: WSO2 Microservices Framework for Java - Product Overview

31  

Page 32: WSO2 Microservices Framework for Java - Product Overview

Deployment

32  

Page 33: WSO2 Microservices Framework for Java - Product Overview

33  

WSO2 Platform Deployment Options

o  Stand-­‐alone  servers  o  Private  clouds:    

e.g.  Stratos,  Kubernetes  o  Public  Clouds:    

e.g.  AWS  o  Hybrid  deployments    

o  Dedicated  hosKng  of  any  WSO2-­‐based  soluKons  

o  WSO2  operaKons  team  is  managing  the  deployment  and  keeps  it  running  

o  99.99%  upKme  SLA  o  Any  AWS  region  of  choice  o  Can  be  VPNed  to  local  network  o  Includes  monitoring,  backups,  

patching,  updates  

o  Shared  public  cloud,  o  Currently  available  for  applicaKon  and  

API  hosKng  (hosted  API  Manager  and  App  Factory),  

o  Preset  mulKtenant  deployment  in  AWS  US  East  run  by  WSO2,  

o  Month-­‐to-­‐month  credit  card  payment    

Page 34: WSO2 Microservices Framework for Java - Product Overview

CONTACT US !


Recommended