wso2conus 2015 - introduction to wso2 microservices server (mss)
TRANSCRIPT
![Page 1: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/1.jpg)
Introduction to WSO2 Microservices Server
Afkham AzeezDirector, ArchitectureWSO2 Inc.
![Page 2: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/2.jpg)
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.
![Page 3: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/3.jpg)
Microservices
Source: http://martinfowler.com/articles/microservices.html
![Page 4: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/4.jpg)
The Scale Cube
Source: http://microservices.io/articles/scalecube.html
![Page 5: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/5.jpg)
Inner & Outer Architecture
http://blogs.gartner.com/gary-olliffe/2015/01/30/microservices-guts-on-the-outside/
![Page 6: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/6.jpg)
Polyglot Persistence
Source: http://martinfowler.com/articles/microservices.html
![Page 7: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/7.jpg)
Vision for Microservices Server (MSS) • 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 8: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/8.jpg)
Microservices Server Implementation• Based on the new Carbon 5.0 kernel
• Transport is based on Netty 4.0
• Supports streaming
• Close to 10x faster than CXF based JAXRS implementation used in
WSO2 AppServer
• 5MB pack size
• Starts within 300ms
• ~25MB memory consumption for the MSS framework
![Page 9: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/9.jpg)
Download
• MSS 1.0.0-alpha release is available at https://github.com/wso2/product-mss/releases
• Refer to the getting started guide in GitHub• A good place to start is the samples
– https://github.com/wso2/product-mss/tree/v1.0.0-alpha/samples
![Page 10: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/10.jpg)
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: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/11.jpg)
MSS – Flow & Thread Model
![Page 12: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/12.jpg)
MSS - Performance ComparisonThroughput
![Page 13: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/13.jpg)
MSS - Memory Consumption ComparisonMemory Consumption (MB)
![Page 14: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/14.jpg)
Developer Experience & Programming Model
![Page 15: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/15.jpg)
Maven pom.xml
![Page 16: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/16.jpg)
StockQuote Microservice
![Page 17: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/17.jpg)
Main Class
![Page 18: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/18.jpg)
Build it!
mvn clean install
![Page 19: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/19.jpg)
Run it!
java –jar stockquote-*.jar
![Page 20: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/20.jpg)
Tooling (Swagger -> Code)Swagger API Definition
MSS Code
1
2
3
![Page 21: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/21.jpg)
Request Streaming
![Page 22: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/22.jpg)
Analytics & Monitoring
• Supports annotations– Timed – measures execution time
–Metered – measures rate of events
–Counted – Counts the total invocations
–HTTPMonitoring – monitors HTTP requests
![Page 23: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/23.jpg)
Analytics & Monitoring
![Page 24: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/24.jpg)
Analytics & Monitoring
![Page 25: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/25.jpg)
Metrics Output to Console
![Page 26: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/26.jpg)
JMX Metrics
![Page 27: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/27.jpg)
Analytics & Monitoring
![Page 28: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/28.jpg)
Security
• Security is done via a central server issuing JWT tokens
• The JWTSecurityInterceptor verifies the signature, expiry & claims in the tokens
![Page 29: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/29.jpg)
Security
![Page 30: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/30.jpg)
• java -jar /opt/stockquote-1.0.0.jar
• Drop microservice jar file into MSS_HOME/repository/deployment/server/mss
• Very convenient to use Docker containers managed by Kubernetes
Microservices Runtime
![Page 31: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/31.jpg)
Deployment Options
![Page 32: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/32.jpg)
*
Docker Filesystem
![Page 33: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/33.jpg)
StockQuote Service - Dockefile
![Page 34: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/34.jpg)
Kubernetes – Replication Controller
![Page 35: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/35.jpg)
Kubernetes - Service
![Page 36: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/36.jpg)
Kubernetes UI
![Page 37: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/37.jpg)
Pet Store Sample - admin
![Page 38: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/38.jpg)
Pet Store Sample - store
![Page 39: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/39.jpg)
Pet Store Sample
Pet
Transaction
Redis
Security
File server
Admin FE
Store FE DAS
Service calls
Data Publishing
![Page 40: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/40.jpg)
Pet Store Sample – deployment view
Store FEStore
FE
Store FE
Admin FE
Kubernetes Node 1 Kubernetes Node 2
Security Security
File server File server
Redis Sentinel
Redis Sentinel
Redis Master
Redis Slave
PetPet
TransactionTransaction
Transaction
podspods
pods
pods
pods
pods
pods
pods
pods
pods
pods pods
pods
pods
pods
S A S T R P F
Kubernetes Services
![Page 41: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/41.jpg)
Pricing
• For MSS product (full server) & MSS lite (executable jar), pricing is same as WSO2 AS based on the number of JVMs.
• For container based deployments, it will be the same as for any container based deployment of WSO2 products (to be announced)
![Page 42: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/42.jpg)
Code• Netty based transport https://github.com/wso2/carbon-
transports
• MSS https://github.com/wso2/product-mss
![Page 43: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/43.jpg)
Recap
• A brief look at Microservices Architecture (MSA)• WSO2 Microservices Server
– Development model & programming model– Deployment model– Tooling– Comparison with other frameworks out there
![Page 44: WSO2ConUS 2015 - Introduction to WSO2 Microservices Server (MSS)](https://reader031.vdocuments.us/reader031/viewer/2022022411/58ec9bbd1a28ab5c788b46af/html5/thumbnails/44.jpg)
Thank You