SlideShare a Scribd company logo
Associate Director / Solutions Architect
22nd June 2016 | Sydney, Australia.
dassanaATwso2.com
Dassana Wijesekara
WSO2 Workshop 2016 | Sydney . Australia.
Microservices
Agenda
• Introduction to Microservices Architecture
• Introduction to WSO2 MSF4J
• Introduction to Kubernetes/Docker
• Demonstrating MSF4J deployment with Kubernetes
• Introduction to WSO2 Application Server
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
WSO2 Workshop Sydney 2016 - Microservices
Security
• Security is done via a central server issuing JWT or OAuth
tokens.
• The OAuth2SecurityInterceptor verifies the token before
accessing the resources.
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
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
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?
CONTACT US !

More Related Content

PPTX
Building Services with WSO2 Application Server and WSO2 Microservices Framewo...
PDF
An Introduction to WSO2 Microservices Framework for Java
PDF
Building Services with WSO2 Microservices Framework for Java
PPTX
Adjusting carbon topology to match high availability scenario requirements
PPTX
Introduction to WSO2 Microservices Framework for Java (MSF4J) 2.0
PDF
WSO2Con ASIA 2016: Creating Microservices with WSO2 Microservices Framework f...
PPTX
WSO2Con 2015-us-introduction-to-mss-v2
PDF
WSO2Con USA 2015: End-to-end Microservice Architecture with WSO2 Identity Ser...
Building Services with WSO2 Application Server and WSO2 Microservices Framewo...
An Introduction to WSO2 Microservices Framework for Java
Building Services with WSO2 Microservices Framework for Java
Adjusting carbon topology to match high availability scenario requirements
Introduction to WSO2 Microservices Framework for Java (MSF4J) 2.0
WSO2Con ASIA 2016: Creating Microservices with WSO2 Microservices Framework f...
WSO2Con 2015-us-introduction-to-mss-v2
WSO2Con USA 2015: End-to-end Microservice Architecture with WSO2 Identity Ser...

What's hot (20)

PPTX
[WSO2Con Asia 2014] Accelerating Mobile App Development with MBaaS
PPTX
WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)
PDF
Introduction to microservices Jornada Microservices
PPTX
Microservices with MSF4J - WSO2 Meetup
PDF
Microservices
PDF
Microservices with Spring
PDF
Survey of Container Build Tools
PDF
JavaOne 2016 - Reactive Microservices with Java and Java EE
PDF
Developing Micro-Services for Cloud using Java
PDF
Microservices with WildFly Swarm - JavaSI 2016
PDF
Monoliths, Myths, and Microservices - CfgMgmtCamp
PDF
Microservices with Spring Boot
PDF
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
PDF
Lagom : Reactive microservice framework
PDF
Microservices with Spring Cloud
PDF
Kubernautes meetup II
PDF
APIs for API Management: Consume and Develop Apps
PPTX
Web application I have always dreamt of
PPTX
Monoliths vs microservices
PDF
Monoliths, Myths, and Microservices
[WSO2Con Asia 2014] Accelerating Mobile App Development with MBaaS
WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)
Introduction to microservices Jornada Microservices
Microservices with MSF4J - WSO2 Meetup
Microservices
Microservices with Spring
Survey of Container Build Tools
JavaOne 2016 - Reactive Microservices with Java and Java EE
Developing Micro-Services for Cloud using Java
Microservices with WildFly Swarm - JavaSI 2016
Monoliths, Myths, and Microservices - CfgMgmtCamp
Microservices with Spring Boot
Voxxed Athens 2018 - Java EE is dead Long live jakarta EE!
Lagom : Reactive microservice framework
Microservices with Spring Cloud
Kubernautes meetup II
APIs for API Management: Consume and Develop Apps
Web application I have always dreamt of
Monoliths vs microservices
Monoliths, Myths, and Microservices
Ad

Similar to WSO2 Workshop Sydney 2016 - Microservices (20)

PDF
Building Services with WSO2 Microservices framework for Java and WSO2 AS
PDF
WSO2Con 2015 USA: Introducing Microservices Server
PPTX
Evolution of Application Development
PDF
Evolution of Application Development
PPTX
Introduction to WSO2 Microservices Framework for Java - MSF4J - WSO2Con Asia ...
PPTX
An Introduction to WSO2 Microservices Framework for Java
PDF
Microservices for java architects it-symposium-2015-09-15
PDF
WSO2 Microservices Framework for Java - Product Overview
PDF
20141210 - Microservice Container
PPTX
Net core microservice development made easy with azure dev spaces
PDF
Micro services
PPT
TransitioningToMicroServonDocker_MS
PDF
Java Microservices HJUG
PPTX
Workshop MSF4J - Getting Started with Microservices and Java
PPTX
MicroserviceArchitecture in detail over Monolith.
PPTX
Understanding Microservices
PDF
Microservices on a budget meetup
PDF
WSO2Con ASIA 2016: Building Apps Using WSO2 App Dev Platform
PPTX
Microservices Server - MSS Workshop
PPTX
Overview of azure microservices and the impact on integration
Building Services with WSO2 Microservices framework for Java and WSO2 AS
WSO2Con 2015 USA: Introducing Microservices Server
Evolution of Application Development
Evolution of Application Development
Introduction to WSO2 Microservices Framework for Java - MSF4J - WSO2Con Asia ...
An Introduction to WSO2 Microservices Framework for Java
Microservices for java architects it-symposium-2015-09-15
WSO2 Microservices Framework for Java - Product Overview
20141210 - Microservice Container
Net core microservice development made easy with azure dev spaces
Micro services
TransitioningToMicroServonDocker_MS
Java Microservices HJUG
Workshop MSF4J - Getting Started with Microservices and Java
MicroserviceArchitecture in detail over Monolith.
Understanding Microservices
Microservices on a budget meetup
WSO2Con ASIA 2016: Building Apps Using WSO2 App Dev Platform
Microservices Server - MSS Workshop
Overview of azure microservices and the impact on integration
Ad

More from Dassana Wijesekara (15)

PPTX
Apidays 2021 Australia - Building a sustainable ecosystem with Open APIs
PPTX
Wso2 apac summit 2021 dassana wijesekara
PPTX
The Banking Experience Canvas - API Days NYC 2020 - Dassana Wijesekara
PPTX
WSO2 Workshop Sydney 2016 - Analytics
PPTX
WSO2 Workshop Sydney 2016 - APIs
PPTX
WSO2 Auckland Workshop 2017
PPTX
WSO2 Sydney Workshop 2018
PPTX
IoT and Robotic Process Automation in Future Logistics - Asia Logistics Forum...
PPTX
Pragmatic Approach to Microservices and Cell based Architecture - Architectin...
PPTX
IoT and Big Data an Enabler in Climate Smart Agriculture
PPTX
The Integration Landscape - Depth & Breadth : Agile Simple & Scalable Integra...
PPTX
WSO2 Workshop , Sydney Australia.
PPTX
Event Driven Architecture -Managing Business Dynamics for an Adaptive Enterp...
PPTX
Event Driven Architecture : Managing Business Dynamics for Adaptive Enterprise
PPTX
Event Driven Architecture : Managing Business Dynamics for an Adaptive Enterp...
Apidays 2021 Australia - Building a sustainable ecosystem with Open APIs
Wso2 apac summit 2021 dassana wijesekara
The Banking Experience Canvas - API Days NYC 2020 - Dassana Wijesekara
WSO2 Workshop Sydney 2016 - Analytics
WSO2 Workshop Sydney 2016 - APIs
WSO2 Auckland Workshop 2017
WSO2 Sydney Workshop 2018
IoT and Robotic Process Automation in Future Logistics - Asia Logistics Forum...
Pragmatic Approach to Microservices and Cell based Architecture - Architectin...
IoT and Big Data an Enabler in Climate Smart Agriculture
The Integration Landscape - Depth & Breadth : Agile Simple & Scalable Integra...
WSO2 Workshop , Sydney Australia.
Event Driven Architecture -Managing Business Dynamics for an Adaptive Enterp...
Event Driven Architecture : Managing Business Dynamics for Adaptive Enterprise
Event Driven Architecture : Managing Business Dynamics for an Adaptive Enterp...

Recently uploaded (20)

PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
AI in Product Development-omnex systems
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
top salesforce developer skills in 2025.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPT
Introduction Database Management System for Course Database
PPTX
ai tools demonstartion for schools and inter college
PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
PPTX
Transform Your Business with a Software ERP System
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Digital Strategies for Manufacturing Companies
PDF
PTS Company Brochure 2025 (1).pdf.......
DOCX
The Five Best AI Cover Tools in 2025.docx
PDF
medical staffing services at VALiNTRY
PPTX
Materi_Pemrograman_Komputer-Looping.pptx
ManageIQ - Sprint 268 Review - Slide Deck
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
AI in Product Development-omnex systems
How Creative Agencies Leverage Project Management Software.pdf
L1 - Introduction to python Backend.pptx
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Operating system designcfffgfgggggggvggggggggg
top salesforce developer skills in 2025.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Introduction Database Management System for Course Database
ai tools demonstartion for schools and inter college
Materi-Enum-and-Record-Data-Type (1).pptx
Transform Your Business with a Software ERP System
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Understanding Forklifts - TECH EHS Solution
Digital Strategies for Manufacturing Companies
PTS Company Brochure 2025 (1).pdf.......
The Five Best AI Cover Tools in 2025.docx
medical staffing services at VALiNTRY
Materi_Pemrograman_Komputer-Looping.pptx

WSO2 Workshop Sydney 2016 - Microservices

  • 1. Associate Director / Solutions Architect 22nd June 2016 | Sydney, Australia. dassanaATwso2.com Dassana Wijesekara WSO2 Workshop 2016 | Sydney . Australia. Microservices
  • 2. Agenda • Introduction to Microservices Architecture • Introduction to WSO2 MSF4J • Introduction to Kubernetes/Docker • Demonstrating MSF4J deployment with Kubernetes • Introduction to WSO2 Application Server
  • 3. 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.
  • 5. Inner & Outer Architecture http://blogs.gartner.com/gary-olliffe/2015/01/30/microservices-guts-on-the-outside/
  • 6. 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
  • 7. 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
  • 10. 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
  • 11. MSF4J Flow & Thread Model
  • 12. Developer Experience & Programming Model
  • 13. Development Model • Maven Archetype • IDE/Build Classpath (msf4j-all.jar) • Tooling (Swagger -> Code)
  • 16. Example - StockQuote Microservice
  • 19. Build and Run !!! mvn clean install java -jar stockquote-1.0.0.jar
  • 20. Tooling - WSO2 Developer Studio
  • 21. Tooling - WSO2 Developer Studio
  • 22. Types of Deployment • Standalone, Self contained jar files • OS / Container images
  • 23. Analytics & Monitoring Supports annotations • Timed – measures execution • Metered – measures rate of events • Counted – counts the total invocations • HTTPMonitored – monitors HTTP requests
  • 25. Service Metrics - Console Output
  • 27. Security • Security is done via a central server issuing JWT or OAuth tokens. • The OAuth2SecurityInterceptor verifies the token before accessing the resources.
  • 28. 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
  • 29. Generate a sample with Maven archetype mvn archetype:generate - DarchetypeGroupId=org.wso2.msf4j - DarchetypeArtifactId=msf4j-microservice - DarchetypeVersion=1.0.0
  • 31. 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!!!
  • 32. The Essence of Micro-Services • No shared DBs • Transactions • Forward Compatibility • Micro service security • Composition with other micro services • Service Discovery • Routing • Monitoring • Automation
  • 33. Inner & Outer Architecture http://blogs.gartner.com/gary-olliffe/2015/01/30/microservices-guts-on-the-outside/
  • 34. Virtual Machines vs Containers
  • 35. What is Docker • Container Virtualization • Build, pack, ship and run applications as containers • Build once, run in many places • Lightweight, Isolated
  • 38. 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.”
  • 39. Kubernetes in a Nutshell
  • 40. 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.
  • 42. Petstore sample - deployment view
  • 43. Building Services with WSO2 Application Server
  • 44. 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
  • 45. Future plan for Application Server • Upcoming release - AS 6.0 • NOT based on WSO2 Carbon or OSGi! • Built on top of Apache Tomcat
  • 46. AS 6.0 • HTTP Request Monitoring for Tomcat • Seamless integration with WSO2 Identity Server for SAML SSO Authentication • Classloading improvements