MODERN APPLICATION ARCHITECTURE DEMO Wanja Pernath EMEA Partner Enablement Manager, Middleware & OpenShift
COOLSTORE APPLICATION
COOLSTORE APPLICATION Online shop for selling products Web-based polyglot application using AngularJS Node Java with multiple frameworks (Spring, Java EE, etc) Microservices architecture Deployed using containers
COOLSTORE SERVICES
COOLSTORE SERVICES Web UI Coolstore Gateway Inventory Catalog Database Database Cart
MICROSERVICES ARCHITECTURE OVERVIEW
VALUES OF MICROSERVICES 7 FAST TIME TO MARKET EFFICIENCY SCALABILITY Small autonomous services can be developed and delivered faster Automating delivery and monitoring of small services is easier Fine grained scalability is easier and uses less resources
MICROSERVICES ARCHITECTURE Principles of microservices architecture: Model around Business Domain Culture of Automation (DevOps) Deploy Independently Scale Independently Release Independently Combined to form a system or application Antifragile - increased robustness and resilience under pressure Polyglot (language and framework independence) API / contract focused Decentralized data management CLIENT REST API SERVICE DATASTORE 8
MICROSERVICES ARCHITECTURE CLIENT REST API CLIENT REST API CLIENT REST API CLIENT REST API REST API CLIENT SERVICE NodeJS Spring Boot JBoss EAP Tomcat DATASTORE JBoss DG Datastore MySQL Datastore PostgreSQL Datastore MongoDB Datastore
MICROSERVICES ARCHITECTURE CLIENT REST API CLIENT REST API CLIENT REST API REST API CLIENT OpenShift Container Platform NodeJS Spring Boot JBoss EAP Tomcat JBoss DG Datastore MySQL Datastore PostgreSQL Datastore MongoDB Datastore
DEPLOYMENT & MANAGEMENT OpenShift Container Platform provides features like: Deploy Independently Scale Independently Release Independently CI/CD (DevOps) Antifragile Polyglot
POLYGLOT
DEMO APPLICATION Web UI NodeJS Coolstore Gateway JBoss FIS Inventory JBoss EAP Catalog JWS (Tomcat) PSQL MongoDB Cart Spring Boot
AGILE INTEGRATION FOR MICROSERVICES
Agile Integration Lightweight Pattern Based Reusable Connectors Community Sourced Flexibility Cloud native solutions Lean artifacts, Cloud native individually deployable solutions Container based scaling and high availability Lean artifacts, individually deployable Container based scaling and high availability Scalability Well defined, re-usable, and well managed end-points Ecosystem leverage Re-Usability
AGILE INTEGRATION API Microservices DEVOPS SOA Event-Base Container
BUILDING MICROSERVICES RED HAT JBOSS FUSE Twitter FB Salesforce XML JSON HL7... Database REST API microservice Resource Connector Msg Broker SaaS. HTTP Kafka Netty. FTP. 160+ Smart Endpoints
COMPOSING MICROSERVICES RED HAT JBOSS FUSE microservice microservice microservice Enterprise Integration Patterns microservice microservice
API FIRST Swagger API Doc microservice by RED HAT JBOSS FUSE External clients Community, Partners, Customers 3Scale API management API Exposes REST DSL API Data Format Transform Consume microservice by RED HAT JBOSS FUSE microservice by RED HAT JBOSS FUSE
Fuse and Spring Boot Auto-detects routes Camel route Camel Spring Boot Starter Configurations Application Container Auto-configure Camelcontext, register Camel utilities Auto-wires components Tomcat, Undertow JDBC Messaging (application.properties/yml)
FAILURE RECOVERY Rebalance traffics Redirect request to available Pods ROUTE SERVICE POD SERVICE POD POD Health Checks periodically performs diagnostics on a running container. POD POD Replace failing pod Starts another pod and bind to service
VCS (Git) Run JBDS Build Jenkins Nexus (Library Management) Deployment Pipeline CDK Test Automatic Testing Release management Developer s Local Env (laptop, desktop) Failu re fe edb ack
DEMO APPLICATION Web UI NodeJS Coolstore Gateway JBoss FIS Inventory JBoss EAP Catalog JWS PSQL MongoDB Cart JBoss EAP
SERVICE RESILIENCE AND FAULT TOLERANCE
Client SERVICE RESILIENCE microservice API microservice API JBoss Fuse JBoss Fuse microservice API microservice API JBoss Fuse microservice microservice API microservice SLOW!! Chain reaction
FAULT TOLERANCE Rebalance traffics Redirect request to available Pods ROUTE SERVICE POD SERVICE POD POD POD Health Checks periodically performs diagnostics on a running container. POD Replace failing pod Starts another pod and bind to service
Hystrix EIP Fallback Timeout microservice API JBoss Fuse Slow! API No response! <camelcontext xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="direct:start"/> <hystrix> <to uri="http://fooservice.com/slow"/> <onfallback> <transform> <constant>fallback message</constant> </transform> </onfallback> </hystrix> <to uri="mock:result"/> </route> </camelcontext> SaaS
COOLSTORE APPLICATION Web UI NodeJS Coolstore Gateway JBoss FIS Turbine Server Inventory JBoss EAP Catalog JWS Cart JBoss EAP PSQL MongoDB Hystrix Dashboard
CREATING ON-DEMAND ENVIRONMENTS
FORKING A GIT REPOSITORY 2 clone 1 fork Developer Git Repository Developer 3 commit Project Git Repository 4 pull request
BUILDING IMAGES WITH SOURCE-TO-IMAGE BUILD code DEV CODE Git Repository Source-to-Image (S2I) Image Registry OPS Container Image DEPLOY Application Container deploy
DEVELOPER PRODUCTIVITY WITH S
DEPLOY CODE WITHOUT BUILD DELAYS OpenShift rsync HotSwap write code JBoss Developer Studio rsync Developer HotSwap Shell Spring Boot JBoss EAP
BUILDING QUALITY INTO THE DEVELOPMENT PROCESS
BUILDING QUALITY INTO THE PROCESS 2 clone 1 fork Developer Git Repository Developer 3 commit Project Git Repository 4 pull request 5 review pull request 6 merge pull request Code Reviewer
INCREASING DELIVERY SPEED WITH CONTINUOUS INTEGRATION AND CONTINUOUS DELIVERY
COOLSTORE MICROSERVICES APPLICATION Web UI Angular NodeJS Coolstore Gateway JBoss FIS Inventory JBoss EAP Catalog JWS PSQL MongoDB Cart Spring Boot
CONTINUOUS DELIVERY PIPELINE Inventory TEST git push Team Git Repo Build JAR Build docker Image Deploy to INV TEST CoolStore TEST Deploy to TEST Run Tests in in TEST Run Tests in INV TEST CoolStore PROD Deploy to PROD (no traffic) Go Live Approve? Switch Production Traffic
ZERO DOWNTIME WITH BLUE/GREEN DEPLOYMENT CI/CD PIPELINE Approve? Deploy PROD (no traffic) Go Live deploy new version Inventory Green Router Inventory Blue Switch Traffic On
ZERO DOWNTIME WITH BLUE/GREEN DEPLOYMENT CI/CD PIPELINE Approve? Deploy PROD (no traffic) Go Live Switch Traffic On switch production traffic Inventory Green Router Inventory Blue
THANK YOU plus.google.com/+redhat facebook.com/redhatinc linkedin.com/company/red-hat twitter.com/redhatnews youtube.com/user/redhatvideos