SlideShare a Scribd company logo
Building Services with WSO2
Microservices Framework for Java and
WSO2 Application Server
Sagara Gunathunga & Sameera Jayasoma
Agenda
• Introduction to Microservices Architecture
• Introduction to WSO2 MSF4J
– Hands-on Sessions
• Introduction to Kubernetes/Docker
• Demonstrating MSF4J deployment with Kubernetes
• Introduction to WSO2 Application Server
– Hands-on Session
Microservices Architecture
A method of developing software applications as a suite of
independently deployable, small, modular services in
which each service runs a unique process and
communicates through a well-defined, lightweight
mechanism to serve a business goal.
Microservices
http://martinfowler.com/articles/microservices.html
Inner & Outer Architecture
http://blogs.gartner.com/gary-olliffe/2015/01/30/microservices-guts-on-the-outside/
WSO2 Microservices Framework for Java (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 JAX-RS
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 Implementation
• Based on the new WSO2 Carbon 5.0 kernel
• Transport is based on Netty 4.0
• Supports streaming
• High performance
• 5MB pack size
• Starts within 300ms
• ~25MB memory consumption for the framework
MSF4J Performance Comparison
MSF4J Memory Consumption Comparison
Core Features of MSF4J
• Quick & simple development model using simple annotations
• Lightweight & high performance
• Custom interceptors
• OAuth based security
• Metrics gathering & publishing
• 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
Developer Experience & Programming
Model
Development Model
• Maven Archetype
• IDE/Build Classpath (msf4j-all.jar)
• Tooling (Swagger -> Code)
Maven pom.xml
Maven Archetype
mvn archetype:generate
-DarchetypeGroupId=org.wso2.msf4j
-DarchetypeArtifactId=msf4j-microservice
-DarchetypeVersion=1.0.0
-DgroupId=org.example
-DartifactId=myservice
-Dversion=1.0.0-SNAPSHOT
-Dpackage=org.example.service
Example - StockQuote Microservice
Application - Main Class
Application - Main Class
Build and Run !!!
mvn clean install
java -jar stockquote-1.0.0.jar
Tooling - WSO2 Developer Studio
Tooling - WSO2 Developer Studio
Types of Deployment
• Standalone, Self contained jar files
• OS / Container images
Analytics & Monitoring
Supports annotations
• Timed – measures execution
• Metered – measures rate of events
• Counted – counts the total invocations
• HTTPMonitored – monitors HTTP requests
Analytics & Monitoring
Service Metrics - Console Output
Building Services with WSO2 Application Server and WSO2 Microservices Framework for Java
Security
• Security is done via a central server issuing JWT or OAuth
tokens.
• The OAuth2SecurityInterceptor verifies the token before
accessing the resources.
MSF4J Hands-on Sessions
Hello World!
1.Build the sample - wso2msf4j-dist-
1.0.0/samples/helloworld
mvn clean install
1.Run the sample
java -jar helloworld-*.jar
1.Test the sample
curl
http://localhost:8080/hello/wso2
Demo samples - https://github.com/sagara-gunathunga/msf4j-intro-webinar-samples
Generate a sample with Maven archetype
mvn archetype:generate -
DarchetypeGroupId=org.wso2.msf4j -
DarchetypeArtifactId=msf4j-microservice -
DarchetypeVersion=1.0.0
Production Deployment with
Kubernetes and Docker
The Essence of Micro-Services
• Micro-Services are all about…
– Proper granularity of components
– Independent deployment
• They are not a counter-proposal to SOA
• They do not prove that SOA failed
– In the opposite: they require loose coupling,...
• They require a methodology to determine “proper granules”
for components
– Something like the holy grail of software engineering for
decades!
– So, don’t expect your middleware vendors to solve this problem
for you! It’s all about YOU solving an very difficult
architecture/design problem!!!
The Essence of Micro-Services
• No shared DBs
• Transactions
• Forward Compatibility
• Micro service security
• Composition with other micro services
• Service Discovery
• Routing
• Monitoring
• Automation
Inner & Outer Architecture
http://blogs.gartner.com/gary-olliffe/2015/01/30/microservices-guts-on-the-outside/
Virtual Machines vs Containers
What is Docker
• Container Virtualization
• Build, pack, ship and run applications as containers
• Build once, run in many places
• Lightweight, Isolated
Docker File System
StockQuote Service Dockerfile
Petstore sample
Petstore sample
PetStore sample
Kubernetes
• Kubernetes is an open source orchestration system for
Docker containers
• Docker -> Container lifecycle management
• Kubernetes -> Orchestration and container cluster
management
“Kubernetes, I need 5 Tomcat and one
MySQL server running at all times.”
Kubernetes in a Nutshell
Kubernetes Work Units
• Pods - Generally represents one or more containers that
should be controlled as a single “application".
• Services - A unit that act as a basic load balancer for
other containers.
• Replication Controllers - Concept of a replicated pod.
Handles horizontal scaling of containers / pods. Maintain
the desired number of containers.
Kubernetes UI
Petstore sample - deployment view
Demo - Petstore
Building Services with
WSO2 Application Server
Current status of Application Server
• Latest release - AS 5.3.0
• Built on top of WSO2 Carbon
• Embedded Apache Tomcat 7 and Apache TomEE 7
• First class support for
– JAX-WS and JAX-RS services
– JavaEE 6 Web Profile applications
Future plan for Application Server
• Upcoming release - AS 6.0
• NOT based on WSO2 Carbon or OSGi!
• Built on top of Apache Tomcat
AS 6.0
• HTTP Request Monitoring for Tomcat
• Seamless integration with WSO2 Identity Server for
SAML SSO Authentication
• Classloading improvements
Questions?
Thank You!
#WSO2ConEU
Share your feedback for this session
wso2con.com/app

More Related Content

What's hot (20)

PDF
An Introduction to WSO2 Microservices Framework for Java
WSO2
 
PPTX
WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)
Afkham Azeez
 
PDF
Microservices architecture overview v3
Dmitry Skaredov
 
PDF
Microservices with Spring
Software Infrastructure
 
PDF
SRE & Kubernetes
Afkham Azeez
 
PPTX
Adjusting carbon topology to match high availability scenario requirements
Afkham Azeez
 
PDF
GUJavaSC - Criando Micro-serviços Reativos com Java
Rodrigo Cândido da Silva
 
PDF
Understanding MicroSERVICE Architecture with Java & Spring Boot
Kashif Ali Siddiqui
 
PPTX
WSO2Con 2015-us-introduction-to-mss-v2
Afkham Azeez
 
PDF
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Toni Jara
 
PPTX
Microservices architecture overview v2
Dmitry Skaredov
 
ODP
Spring cloud for microservices architecture
Igor Khotin
 
PDF
Microservices with Spring Cloud
Daniel Eichten
 
PDF
API Microservices with Node.js and Docker
Apigee | Google Cloud
 
PDF
Microservices architecture examples
Channy Yun
 
PPTX
Intro to spring cloud &microservices by Eugene Hanikblum
Eugene Hanikblum
 
PDF
Developing Micro-Services for Cloud using Java
WSO2
 
PPTX
From Monolithic to Microservices in 45 Minutes
MongoDB
 
PDF
Microservices with WildFly Swarm - JavaSI 2016
Charles Moulliard
 
PDF
Microservices Architecture
Izzet Mustafaiev
 
An Introduction to WSO2 Microservices Framework for Java
WSO2
 
WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)
Afkham Azeez
 
Microservices architecture overview v3
Dmitry Skaredov
 
Microservices with Spring
Software Infrastructure
 
SRE & Kubernetes
Afkham Azeez
 
Adjusting carbon topology to match high availability scenario requirements
Afkham Azeez
 
GUJavaSC - Criando Micro-serviços Reativos com Java
Rodrigo Cândido da Silva
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Kashif Ali Siddiqui
 
WSO2Con 2015-us-introduction-to-mss-v2
Afkham Azeez
 
Spring IO 2016 - Spring Cloud Microservices, a journey inside a financial entity
Toni Jara
 
Microservices architecture overview v2
Dmitry Skaredov
 
Spring cloud for microservices architecture
Igor Khotin
 
Microservices with Spring Cloud
Daniel Eichten
 
API Microservices with Node.js and Docker
Apigee | Google Cloud
 
Microservices architecture examples
Channy Yun
 
Intro to spring cloud &microservices by Eugene Hanikblum
Eugene Hanikblum
 
Developing Micro-Services for Cloud using Java
WSO2
 
From Monolithic to Microservices in 45 Minutes
MongoDB
 
Microservices with WildFly Swarm - JavaSI 2016
Charles Moulliard
 
Microservices Architecture
Izzet Mustafaiev
 

Viewers also liked (16)

PPTX
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2
 
PDF
Pivotal Cloud Foundry: A Technical Overview
VMware Tanzu
 
PDF
Cloud Native Runtime Platform
VMware Tanzu
 
PDF
Spring Cloud Into Production
Todd Miller
 
PDF
Devops Recto-Verso @ DevoxxMA
Arnaud Héritier
 
PDF
#GeodeSummit - Integration & Future Direction for Spring Cloud Data Flow & Geode
PivotalOpenSourceHub
 
PDF
QCon SP 2016 - Construindo Microservices Auto-curáveis com Spring Cloud e Net...
Rodrigo Cândido da Silva
 
PDF
Spring Cloud Servicesの紹介 #pcf_tokyo
Toshiaki Maki
 
PPTX
Pragmatic approach to Microservice Architecture: Role of Middleware
Asanka Abeysinghe
 
PDF
Testing applications with traffic control in containers / Alban Crequy (Kinvolk)
Ontico
 
PPTX
Transforming Organizations with CI/CD
Cprime
 
PDF
DevOps, Microservices and containers - a high level overview
Barton George
 
PDF
Microservice With Spring Boot and Spring Cloud
Eberhard Wolff
 
PDF
Better Software—Faster: Ten Best Practices from Sequoia's Microservices Summit
Sequoia Capital
 
PDF
Microservices with Spring and Cloud Foundry
mimacom
 
PPTX
Microservices Architecture for Content Management Systems using AWS Lambda an...
Mitoc Group
 
WSO2Con USA 2015: WSO2 Integration Platform Deep Dive
WSO2
 
Pivotal Cloud Foundry: A Technical Overview
VMware Tanzu
 
Cloud Native Runtime Platform
VMware Tanzu
 
Spring Cloud Into Production
Todd Miller
 
Devops Recto-Verso @ DevoxxMA
Arnaud Héritier
 
#GeodeSummit - Integration & Future Direction for Spring Cloud Data Flow & Geode
PivotalOpenSourceHub
 
QCon SP 2016 - Construindo Microservices Auto-curáveis com Spring Cloud e Net...
Rodrigo Cândido da Silva
 
Spring Cloud Servicesの紹介 #pcf_tokyo
Toshiaki Maki
 
Pragmatic approach to Microservice Architecture: Role of Middleware
Asanka Abeysinghe
 
Testing applications with traffic control in containers / Alban Crequy (Kinvolk)
Ontico
 
Transforming Organizations with CI/CD
Cprime
 
DevOps, Microservices and containers - a high level overview
Barton George
 
Microservice With Spring Boot and Spring Cloud
Eberhard Wolff
 
Better Software—Faster: Ten Best Practices from Sequoia's Microservices Summit
Sequoia Capital
 
Microservices with Spring and Cloud Foundry
mimacom
 
Microservices Architecture for Content Management Systems using AWS Lambda an...
Mitoc Group
 
Ad

Similar to Building Services with WSO2 Application Server and WSO2 Microservices Framework for Java (20)

PDF
Building Services with WSO2 Microservices framework for Java and WSO2 AS
Kasun Gajasinghe
 
PPTX
Introduction to WSO2 Microservices Framework for Java - MSF4J - WSO2Con Asia ...
Afkham Azeez
 
PPTX
An Introduction to WSO2 Microservices Framework for Java
Sagara Gunathunga
 
PPTX
Evolution of Application Development
WSO2
 
PDF
Evolution of Application Development
kshanth2101
 
PDF
WSO2 Microservices Framework for Java - Product Overview
WSO2
 
PDF
Microservices for java architects it-symposium-2015-09-15
Derek Ashmore
 
PPTX
Microservices with MSF4J - WSO2 Meetup
Afkham Azeez
 
PPTX
Workshop MSF4J - Getting Started with Microservices and Java
Edgar Silva
 
PDF
20141210 - Microservice Container
Jamie (Taka) Wang
 
PDF
Micro services
Mateusz Bukowicz
 
PPT
TransitioningToMicroServonDocker_MS
Lana Kalashnyk
 
PDF
[WSO2Con EU 2017] Writing Microservices Using MSF4J
WSO2
 
PPTX
Understanding Microservices
vguhesan
 
PDF
WSO2Con ASIA 2016: Building Apps Using WSO2 App Dev Platform
WSO2
 
PDF
Docker for Java Developers
Imesh Gunaratne
 
PPTX
Net core microservice development made easy with azure dev spaces
Alon Fliess
 
PDF
Microservices on a budget meetup
Matthew Reynolds
 
PPTX
MicroserviceArchitecture in detail over Monolith.
PLovababu
 
PDF
WSO2 Cloud Platform: Vision and Roadmap
WSO2
 
Building Services with WSO2 Microservices framework for Java and WSO2 AS
Kasun Gajasinghe
 
Introduction to WSO2 Microservices Framework for Java - MSF4J - WSO2Con Asia ...
Afkham Azeez
 
An Introduction to WSO2 Microservices Framework for Java
Sagara Gunathunga
 
Evolution of Application Development
WSO2
 
Evolution of Application Development
kshanth2101
 
WSO2 Microservices Framework for Java - Product Overview
WSO2
 
Microservices for java architects it-symposium-2015-09-15
Derek Ashmore
 
Microservices with MSF4J - WSO2 Meetup
Afkham Azeez
 
Workshop MSF4J - Getting Started with Microservices and Java
Edgar Silva
 
20141210 - Microservice Container
Jamie (Taka) Wang
 
Micro services
Mateusz Bukowicz
 
TransitioningToMicroServonDocker_MS
Lana Kalashnyk
 
[WSO2Con EU 2017] Writing Microservices Using MSF4J
WSO2
 
Understanding Microservices
vguhesan
 
WSO2Con ASIA 2016: Building Apps Using WSO2 App Dev Platform
WSO2
 
Docker for Java Developers
Imesh Gunaratne
 
Net core microservice development made easy with azure dev spaces
Alon Fliess
 
Microservices on a budget meetup
Matthew Reynolds
 
MicroserviceArchitecture in detail over Monolith.
PLovababu
 
WSO2 Cloud Platform: Vision and Roadmap
WSO2
 
Ad

More from Sagara Gunathunga (20)

PPTX
Microservices Security landscape
Sagara Gunathunga
 
PPTX
Privacy by Design as a system design strategy - EIC 2019
Sagara Gunathunga
 
PPTX
Consumer Identity World EU - Five pillars of consumer IAM
Sagara Gunathunga
 
PPTX
kicking your enterprise security up a notch with adaptive authentication sa...
Sagara Gunathunga
 
PPTX
Synergies across APIs and IAM
Sagara Gunathunga
 
PPTX
GDPR impact on Consumer Identity and Access Management (CIAM)
Sagara Gunathunga
 
PPTX
Introduction to the All New WSO2 Governance Centre
Sagara Gunathunga
 
PPTX
Understanding Microservice Architecture WSO2Con Asia 2016
Sagara Gunathunga
 
PDF
Introduction to the all new wso2 governance centre asia 16
Sagara Gunathunga
 
PDF
Building Your Own Store with WSO2 Enterprise Store: The WSO2 Store Case Study
Sagara Gunathunga
 
PDF
Introduction to the All New WSO2 Governance Centre
Sagara Gunathunga
 
PDF
Java colombo-deep-dive-into-jax-rs
Sagara Gunathunga
 
PDF
JavaEE and RESTful development - WSO2 Colombo Meetup
Sagara Gunathunga
 
POTX
Application Monitoring with WSO2 App Server
Sagara Gunathunga
 
PDF
WSO2 Application Server
Sagara Gunathunga
 
PDF
Creating APIs with the WSO2 Platform
Sagara Gunathunga
 
PDF
WSO2 AppDev platform
Sagara Gunathunga
 
PDF
Apache contribution-bar camp-colombo
Sagara Gunathunga
 
PDF
What is new in Axis2 1.7.0
Sagara Gunathunga
 
PPTX
Web service introduction 2
Sagara Gunathunga
 
Microservices Security landscape
Sagara Gunathunga
 
Privacy by Design as a system design strategy - EIC 2019
Sagara Gunathunga
 
Consumer Identity World EU - Five pillars of consumer IAM
Sagara Gunathunga
 
kicking your enterprise security up a notch with adaptive authentication sa...
Sagara Gunathunga
 
Synergies across APIs and IAM
Sagara Gunathunga
 
GDPR impact on Consumer Identity and Access Management (CIAM)
Sagara Gunathunga
 
Introduction to the All New WSO2 Governance Centre
Sagara Gunathunga
 
Understanding Microservice Architecture WSO2Con Asia 2016
Sagara Gunathunga
 
Introduction to the all new wso2 governance centre asia 16
Sagara Gunathunga
 
Building Your Own Store with WSO2 Enterprise Store: The WSO2 Store Case Study
Sagara Gunathunga
 
Introduction to the All New WSO2 Governance Centre
Sagara Gunathunga
 
Java colombo-deep-dive-into-jax-rs
Sagara Gunathunga
 
JavaEE and RESTful development - WSO2 Colombo Meetup
Sagara Gunathunga
 
Application Monitoring with WSO2 App Server
Sagara Gunathunga
 
WSO2 Application Server
Sagara Gunathunga
 
Creating APIs with the WSO2 Platform
Sagara Gunathunga
 
WSO2 AppDev platform
Sagara Gunathunga
 
Apache contribution-bar camp-colombo
Sagara Gunathunga
 
What is new in Axis2 1.7.0
Sagara Gunathunga
 
Web service introduction 2
Sagara Gunathunga
 

Recently uploaded (20)

PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
PPTX
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
PDF
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
Engineering the Java Web Application (MVC)
abhishekoza1981
 
PPTX
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
PPTX
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPT
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
Salesforce CRM Services.VALiNTRY360
VALiNTRY360
 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Import Data Form Excel to Tally Services
Tally xperts
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Engineering the Java Web Application (MVC)
abhishekoza1981
 
The Role of a PHP Development Company in Modern Web Development
SEO Company for School in Delhi NCR
 
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Executive Business Intelligence Dashboards
vandeslie24
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 

Building Services with WSO2 Application Server and WSO2 Microservices Framework for Java