Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Introduction to WSO2
Microservices Framework for Java
Sagara Gunathunga
Software Architect
WSO2
sagara@wso2.com | @sagaras
• Test
• Test
2
Previous webinars
• http://wso2.com/library/webinars/2016/01/a-pragmatic-approach-to-
microservice-architecture-the-role-o...
4
What is WSO2 MSF4J?
A lightweight, high performance framework for
building Microservices in Java
Vision for MSF4J
• Lightweight & fast runtime
• Use Java annotations as a way of defining Microservices APIs as well
as me...
MSF4J- Performance Comparison
MSF4J- Memory Consumption Comparison
MSF4J Implementation
• Transport is based on Netty 4.0
• Supports streaming
• High performance
• Low memory footprint
• St...
Download
o MSS 1.0.0 release is available at
https://github.com/wso2/msf4j/releases/tag/v1.0.0
o Refer to the getting star...
Core Features
• Quick & simple development model using simple annotations
• Interceptor API for message interception
• JWT...
Security
• Security is done via a central server issuing JWT tokens
• The JWTSecurityInterceptor verifies the signature, e...
Analytics & Monitoring
• Supports annotations
• Timed – measures execution time
• Metered – measures rate of events
• Coun...
Analytics & Monitoring
Analytics & Monitoring
Tooling (Swagger -> Code)
Swagger API
Definition
MSS
Code
1
2
3
MSF4J in Action!
https://github.com/sagara-gunathunga/msf4j-intro-webinar-samples
1. Helloworld MSF4J
mvn archetype:generate -Dfilter=org.wso2.msf4j:msf4j-microservice
OR
mvn archetype:generate -Darchetyp...
1. Helloworld MSF4J
@Path("/hello")
public class HelloWorld {
@GET
@Path("/{user}")
public String hello(@PathParam("user")...
1. Helloworld MSF4J
public class Application {
public static void main(String[] args) {
new MicroservicesRunner()
.deploy(...
2. MSF4J Interceptors
public class BasicAuthInterceptor implements Interceptor {
@Override
public boolean preCall(HttpRequ...
2. MSF4J Interceptors
public class Application {
public static void main(String[] args) {
new MicroservicesRunner()
.deplo...
3. MSF4J Metrics
@Path("/hello")
public class HelloWorld {
@GET
@Path("/{user}")
@Metered
public String hello(@PathParam("...
3. MSF4J Metrics
public class Application {
public static void main(String[] args) {
new MicroservicesRunner()
.deploy(new...
4. MSF4J JPA Sample
Database
Hibernate persistence
JPA API
User DAO
User Resource
CONTACT US !
Upcoming SlideShare
Loading in …5
×

An Introduction to WSO2 Microservices Framework for Java

314 views

Published on

any organizations today are leveraging microservices architecture (MSA) which is becoming increasingly popular because of its many potential advantages. This webinar introduces WSO2 Microservices Framework for Java (MSF4J), which provides the necessary framework and tooling to build an MSA solution.

During this webinar, Sagara will

Introduce WSO2 MSF4J programming model and deployment options
Discuss the key strengths and performance measures of WSO2 MSF4J over other frameworks
Demonstrate security, analytics and service discovery
Highlight tooling, Swagger support and its seamless integration with rest of the platform

Published in: Software
  • Be the first to comment

  • Be the first to like this

An Introduction to WSO2 Microservices Framework for Java

  1. 1. Introduction to WSO2 Microservices Framework for Java Sagara Gunathunga Software Architect WSO2 sagara@wso2.com | @sagaras
  2. 2. • Test • Test 2
  3. 3. Previous webinars • http://wso2.com/library/webinars/2016/01/a-pragmatic-approach-to- microservice-architecture-the-role-of-middleware/ • http://wso2.com/library/webinars/2016/02/deep-dive-into-microservice-inner- architecture/ • http://wso2.com/library/webinars/2016/02/deep-dive-into-microservice-outer- architecture/ 3
  4. 4. 4 What is WSO2 MSF4J? A lightweight, high performance framework for building Microservices in Java
  5. 5. 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 subset of JAX- RS & JSR 250 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) • Built-in security with out of the box integration with WSO2 IS
  6. 6. MSF4J- Performance Comparison
  7. 7. MSF4J- Memory Consumption Comparison
  8. 8. MSF4J Implementation • Transport is based on Netty 4.0 • Supports streaming • High performance • Low memory footprint • Starts within 300ms
  9. 9. Download o MSS 1.0.0 release is available at https://github.com/wso2/msf4j/releases/tag/v1.0.0 o Refer to the getting started guide in GitHub o A good place to start is the samples o https://github.com/wso2/msf4j/tree/v1.0.0/samples
  10. 10. Core Features • Quick & simple development model using simple annotations • Interceptor API for message interception • JWT based security context propagation • • Metrics gathering & publishing – Console, JMX, WSO2 DAS • WSO2 DevStudio based tooling for generating microservices projects starting from a Swagger API definition • Comprehensive samples demonstrating how to develop Microservices application • Kubernetes and Docker based reference archeterure and reference application
  11. 11. Security • Security is done via a central server issuing JWT tokens • The JWTSecurityInterceptor verifies the signature, expiry & claims in the token
  12. 12. Analytics & Monitoring • Supports annotations • Timed – measures execution time • Metered – measures rate of events • Counted – Counts the total invocations
  13. 13. Analytics & Monitoring
  14. 14. Analytics & Monitoring
  15. 15. Tooling (Swagger -> Code) Swagger API Definition MSS Code 1 2 3
  16. 16. MSF4J in Action! https://github.com/sagara-gunathunga/msf4j-intro-webinar-samples
  17. 17. 1. Helloworld MSF4J mvn archetype:generate -Dfilter=org.wso2.msf4j:msf4j-microservice OR mvn archetype:generate -DarchetypeGroupId=org.wso2.msf4j -DarchetypeArtifactId=msf4j-microservice -DarchetypeVersion=1.0.0 -DgroupId=org.wso2.webinar.samples.msf4j -DartifactId=Hello -Dversion=1.0.0-SNAPSHOT -Dpackage=org.wso2.webinar.samples.msf4j -DserviceClass=Hello
  18. 18. 1. Helloworld MSF4J @Path("/hello") public class HelloWorld { @GET @Path("/{user}") public String hello(@PathParam("user") String user) { return "Hello " + user; } }
  19. 19. 1. Helloworld MSF4J public class Application { public static void main(String[] args) { new MicroservicesRunner() .deploy(new HelloWorld()) .start(); } }
  20. 20. 2. MSF4J Interceptors public class BasicAuthInterceptor implements Interceptor { @Override public boolean preCall(HttpRequest request, HttpResponder responder, ServiceMethodInfo serviceMethodInfo){ …........................................... ............................................... } @Override public void postCall(HttpRequest request, HttpResponseStatus status, ServiceMethodInfo serviceMethodInfo){ …........................................... ............................................... } }
  21. 21. 2. MSF4J Interceptors public class Application { public static void main(String[] args) { new MicroservicesRunner() .deploy(new HelloWorld()) .addInterceptor(new BasicAuthInterceptor ()) .start(); } }
  22. 22. 3. MSF4J Metrics @Path("/hello") public class HelloWorld { @GET @Path("/{user}") @Metered public String hello(@PathParam("user") String user) { return "Hello " + user; } }
  23. 23. 3. MSF4J Metrics public class Application { public static void main(String[] args) { new MicroservicesRunner() .deploy(new HelloWorld()) .addInterceptor(new MetricsInterceptor().init(MetricReporter.CONSOLE, MetricReporter.JMX)) .start(); } }
  24. 24. 4. MSF4J JPA Sample Database Hibernate persistence JPA API User DAO User Resource
  25. 25. CONTACT US !

×