Upload
ugo-landini
View
335
Download
9
Embed Size (px)
Citation preview
Cloudify your applications: microservices and beyond
IntroVittorio Colabella
TYPICAL CUSTOMER LANDSCAPE TODAYWhere the journey starts...
RUNBrownfield
TRANSFORMGreenfield
GROW
VIRTUALPHYSICAL PRIVATE & PUBLIC CLOUD
Complex & heterogeneous
Lack ofcommonstandards
Inconsistent automation& governance
Without adding more
complexity and inconsistencies?
TYPICAL CUSTOMER LANDSCAPE TODAYWhere the journey starts...
MODERNIZE EXISTING APPS
DEVELOP NEW APPLICATIONSTHE MODERN WAY
APPLICATION PORTFOLIO MODERNIZATIONOne platform to support you today and tomorrow
TRANSFORMGreenfield
GROWRUNModernized brownfield
COMMON HYBRID APPLICATION INFRASTRUCTURE
BETTERSOFTWARE
ARCHITECTURE
AGILEINTEGRATION
STREAMLINEAPPLICATION
LIFECYCLECONTINUOUSINNOVATION
MODERN APPLICATION CONCEPTS
APPLICATION SERVICES
FOUNDATION INTEGRATION AUTOMATION
IT’S ALL THERE! COMPLETE TECHNOLOGY STACK FOR HYBRID CLOUD
INFRASTRUCTURE SOFTWARE
CONTAINER PLATFORM
SECURITY & MANAGEMENT
DEVELOPER TOOLS
OTHER CLOUD PROVIDERS
+
PHYSICAL VIRTUAL PRIVATE CLOUD
Tools Available
Ready to use capabilities to facilitate innovation
Data Virtualization
Complex Event
Processing
IntelligentProcess
Integration Messaging Data Grid
Java EE Application
WebApplication
SingleSign-On
BusinessRules
APIManagement
Micro services
Talk 1A Microservices story
Talk 2-3-4 EAP and beyond: Red Hat Open Application Runtimes
Ready to use capabilities to facilitate innovation
Data Virtualization
Complex Event
Processing
IntelligentProcess
Integration Messaging Data Grid
Java EE Application
WebApplication
SingleSign-On
BusinessRules
APIManagement
Micro services
Talk 5Fuse Integration Services
Ready to use capabilities to facilitate innovationTalk 6 Openshift.io
Ready to use capabilities to facilitate innovation
Data Virtualization
Complex Event
Processing
IntelligentProcess
Integration Messaging Data Grid
Java EE Application
WebApplication
SingleSign-On
BusinessRules
APIManagement
Micro services
Talk 7MAAS, Messaging As A Service
Ready to use capabilities to facilitate innovation
Data Virtualization
Complex Event
Processing
IntelligentProcess
Integration Messaging Data Grid
Java EE Application
WebApplication
SingleSign-On
BusinessRules
APIManagement
Micro services
Talk 8 Model decisions, manage cases and make it optimal
MICROSERVICES 2.0 & RHOAR
Cloudify your applications: Microservices and beyond
Ugo LandiniSolution Architect
Samuele Dell’AngeloSolution Architect
“Most teams we work with favor bundling an embedded http server within your web application. There are plenty of options available: Jetty, SimpleWeb, Webbit and Owin Self-Host amongst others. Easier automation, easier deployment and a reduction in the amount of infrastructure you have to manage lead us to recommend embedded servers over application servers for future projects”
ThoughtWorks Technology Radar, May 2015
2015 AP Revenue (Gartner, Nov. 2016) :● Oracle -4.5%● IBM -9.5%● Red Hat +33.3%● Amazon +50.6%● Pivotal +22.7%
“Resist the temptation to simply lift and shift Java EE applications from closed-source to open-source application servers for modest license savings. If you are contemplating porting an application, consider rearchitecting it to be cloud-native and moving it to aPaaS - presuming that business drivers warrant the investment.”
Gartner (November 2016)
State of the Market
MICROSERVICES 101
“... is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies.”
Martin Fowlerhttp://martinfowler.com/articles/microservices.html
Microservices defined
● Small single-purpose services driven from DDD (Domain Driven Design) or practical decomposition of an existing application or existing SOA-style mini-services
● Combined to form a system or application● Independently deployable (replaceable)● Independently scalable● Antifragile - increased robustness and resilience under pressure● Fully automated software delivery● Polyglot (language and framework independence)● API / Contract Focused● Typically event-driven● Decentralized data management
Microservices 101
Microservices 101
MyService
Tracing
API
Discovery
Invocation
Resilience
Pipeline
Authentication
Logging Elasticity
Monitoring
PodContainer
JVM
Service A
PodContainer
JVM
Service B
PodContainer
JVM
Service C
Microservices == Distributed Computing
Wait, but weren’t we already doing this distributed stuff...
● … what about CORBA?● … and RMI?● … EJB?● … SOA?
What’s the difference?
Maturing the Application LifeCycle
Month0
Month3
Week1
Week2
Week3
Week4
Week5
Week6
Week7
Week8
Week9
Week10
Week11
Monolith Java EE Lifecycle
Maturing the Application LifeCycle
Month0
Month3
Week1
Week2
Week3
Week4
Week5
Week6
Week7
Week8
Week9
Week10
Week11
Monolith Java EE LifecycleFast Moving Java EE Monolith
Maturing the Application LifeCycle
Month0
Month3
Week1
Week2
Week3
Week4
Week5
Week6
Week7
Week8
Week9
Week10
Week11
Monolith Java EE LifecycleFast Moving Java EE MonolithJava EE Microservices
What’s the difference?
● Same ideas, new technologies (which will evolve in the future)
● But now, we should be able to bring a new feature in production in a few minutes
The Good
● Domain-Driven Design● Low coupling, high cohesion● APIs and contracts● Agile software development● Full lifecycle automation● Dev and Ops working together ● Common packaging / container format● Rethinking Data
Microservices: the Good, the Bad...
The Bad
● Too much Dogma / CS purity● Tradeoff between Agility & Operational
Complexity● Magnificent Monoliths and Stupendous SOA
are not necessarily bad● Microservices / Unicorn Envy ● Not all organizations can afford the skills and
talent required to be successful● Maintaining data consistency is hard in
distributed systems
Microservices: the Good, the Bad...
The Ugly● Building large scale distributed systems is really
hard● Monitoring / APM tools need to catch up● Heterogeneity (languages, frameworks, data
stores)● Event-based, asynchronous, reactive programming
is still in it’s infancy and skills are rare● CAP: Consistency, Availability, Partition Tolerance
? – choose two
Microservices: the Good, the Bad...
● Understand and state your goals● Understand the tradeoffs● Start with People, Process and Culture
○ Agile Dev / DevOps is a prerequisite● Invest in automation (provisioning, CI/CD, etc.)● Start small
○ Small non-mission-critical green-field○ Decomposition of existing monolith
● Get help - eg. Red Hat Innovation Labs
Microservices Recommendations
Config Server
NETFLIX Ribbon
Java Microservices Platform (2014)
Why these components?Eureka is the Service Registry where the clients lookup for service locations a.k.a Service Discovery
Config Server
Zuul is the smart proxy purely based on Java
Ribbon is the client side Load Balancer
Hystrix is the Circuit Breaker
Config Server externalized the Configuration
Zipkin is the Distributed Tracer
Why these components?Eureka is the Service Registry where the clients lookup for service locations a.k.a Service Discovery
Config Server
Zuul is the smart proxy purely based on Java
Ribbon is the client side Load Balancer
Hystrix is the Circuit Breaker
Config Server externalized the Configuration
Zipkin is the Distributed Tracer
Config Server
NETFLIX Ribbon
Better Microservices Platform (2016/2017)
Config Server
NETFLIX Ribbon
Even Better Microservices Platform (2018)
Istio - Sail(Kubernetes - Helmsman or ship’s pilot)
Istio
35
Sidecar?
PodContainer
JVM
Service A
Side-car Container
PodContainer
JVM
Service B
Side-car Container
PodContainer
JVM
Service C
Side-car Container
Pods with 2 containers!
Infrastructure cluttering your code?<dependency>
<groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-config</artifactId>
</dependency><dependency>
<groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-eureka</artifactId>
</dependency><dependency>
<groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-zuul</artifactId>
</dependency><dependency>
<groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency><dependency>
<groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
Istio
Resilience Across Languages and Platforms
Increase reliability by shielding applications from flaky networks and cascading failures in adverse conditions.
Policy Enforcement
Apply organizational policy to the interaction between services, ensure access policies are enforced and resources are fairly distributed among consumers.
Intelligent Routing and Load Balancing
Control traffic between services with dynamic route configuration.
Conduct A/B tests, release canaries, and gradually upgrade versions using red/black deployments.
Telemetry and Reporting
Understand the dependencies between services, the nature and flow of traffic between them, and quickly identify issues with distributed tracing.
Istio Service Mesh Currently upstream only
Envoy
istio-ingress
Envoy
App A
Envoy
App B
Envoy
App C
istio-pilot istio-mixer istio-auth
HTTP Req/Resp
Kubernetes Pods
Istio Components Config to Envoy Access Control and Telemetry
Istio Components
● Control Plane○ Istio-Pilot - istioctl, API, config○ Istio-Mixer - Quota, Telemetry, Rate Limiting, ACL○ Istio-Auth - TLS and Certificates
● Data Plane○ Envoy proxy deployed as “side-cars” with applications
Circuit Breakers
Before Istio After IstioBoiler plate code No code related to circuit breaking mixed with
business logic
Multiple libraries and dependencies e.g. Hystrix No libraries
Separate dashboard to collect circuit breaker e.g. Hystrix Turbine
All metrics can be collected and displayed in Grafana without extra bit of code
Define circuit breakers using Kubernetes Tags
Tracing
Before Istio After Istio
Boiler plate code No code related to tracing mixed with business logic
Multiple libraries and dependencies e.g. Zipkin No libraries
All in one place
How to use it
Routes and commands injected via CLI or API:
apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
name: reviews-test-v2
spec:
destination:
name: reviews
precedence: 2
match:
request:
headers:
cookie:
regex: "^(.*?;)?(user=jason)(;.*)?$"
route:
- labels:
version: v2
DEMO
Infrastructure
Circuit Breaker
ConfigurationService
Service Registry
Client-side LoadBalancing
Infrastructure Infrastructure
Supporting Services
Cache / DataGrid SSO Service
2014 2016 2018
Microservice Business Logic
Configuration(ConfigMap)
Service Registry
API Mgmt MessagingServer-Side
Load Balancing
Circuit Breaker
Istio+Cache / DataGrid SSO ServiceAPI Mgmt Messaging
Service Registry
Configuration(ConfigMap)
Server-SideLoad Balancing
Circuit Breaker
Cache / DataGrid SSO Service
API Mgmt Messaging
Smart RoutingDistributedTracing
Distributed Tracing
Distributed Tracing
Distrib.Tracing
Distributed Tracing
Microservice Business Logic Microservice Business Logic
Smart Routing
Smart Routing
Supporting Services
Supporting Services Service Registration
Container PlatformServices
Container PlatformServices
Comm
odificationSimplification
Evolution of Microservices
Ok, but that’s all about MSA infrastructure...
OpenShift is the best Container Platform, it will solve for you many of the problems at an infrastructure level without cluttering your code but...
… we still need to code our microservices!
50
Runtime
App
Cloud Platform
Data
Build | Deploy | Scheduling | Scaling | Elasticity | Metrics | Logging
Security IMDG Messaging
Runtime
Svc
Runtime
Svc
Cloud Provider
The App Server 2014/...
Funktion
50% OF THE ENTERPRISE APP MARKET
Where developers are going
“Almost all the successful microservice stories have started with a monolith that got too big and was broken up”
“Almost all the cases where I've heard of a system that was built as a microservice system from scratch, it has ended up in serious trouble.”
Martin Fowler: monolith first!
Modern, cloud-native application runtimes and an opinionated developer experience for organizations that are moving beyond 3-tier architectures and embracing cloud-native application development.
● Multiple runtime options○ JBoss EAP - existing Java EE / Spring apps.○ WildFly Swarm / MicroProfile - Java EE centric MSA○ Spring Boot / Cloud - Spring centric MSA○ Vert.x - greenfield reactive Java○ Node.js - greenfield reactive JavaScript
● OpenShift - Public, Dedicated Public & Enterprise● Tightly integrated with OpenShift & Kubernetes● Tightly Integrated with Red Hat Developer SaaS● 3rd-party Integrations - eg. Netflix Ribbon, Hystrix, etc.● Opinionated DevX starting with launch.openshift.io
RHOAR: OpenShift Application Runtimes
JBoss EAPExisting, Java EE,
Spring MVC
Fast Monoliths(Java EE, Spring)
TomcatSpring Boot /
MVC
GreenfieldReactive Java
Java EE - mono to micro. / greenfield
Vert.xReactive Java
/ Polyglot MSA 2.0
Node.jsReactive client /
server-side JavaScript
Greenfieldpolymorphic JavaScript
FaaS / Server-le
ss
Existing Applications New Applications
GreenfieldJava / Spring
MSA
JBoss WSTomcat,
Spring MVC, Spring Boot Spring
CloudJava
MSA 1.0WildFly SwarmMonolith
Decomposition, Enterprise Java
MSA 2.0
Ok, so it’s (also) about being lighter?
Don’t believe it? Try it out yourself http://bit.ly/modern-java-runtimes
Runtime(framework)
Boot time server only
Boot time including app deployment
Memory usage without load
Memory usage under load
Measured
throughput
JBoss EAP (Java EE) 2 - 3 sec 3 sec 40 MB 200 - 400 MB 23K req/sec
JBoss EAP (Spring) 2 - 3 sec 7 sec 40 MB 500 - 700 MB 9K req/sec
JBoss WS/Tomcat (Spring) 0 - 1 sec 8 sec 40 MB 0.5 - 1.5 GB 8K req/sec
Fat JAR (Spring Boot) N/A 3 sec 30 MB 0.5 - 2.0 GB 11K req/sec
Fat JAR (WF Swarm) 1-2 sec 5 sec 30 MB 250 - 350 MB 27K req/sec
Theoretically, yes. But, beware:● A simple ReST service deployed in EAP used ⅕ of the memory used
by Spring Boot under load and was 2x faster!
Ok, so it’s (also) about being lighter?
Don’t believe it? Try it out yourself http://bit.ly/modern-java-runtimes
Runtime(framework)
Boot time server only
Boot time including app deployment
Memory usage without load
Memory usage under load
Measured throughput
JBoss EAP (Java EE) 2 - 3 sec 3 sec 40 MB 200 - 400 MB 23K req/sec
JBoss EAP (Spring) 2 - 3 sec 7 sec 40 MB 500 - 700 MB 9K req/sec
JBoss WS/Tomcat (Spring) 0 - 1 sec 8 sec 40 MB 0.5 - 1.5 GB 8K req/sec
Fat JAR (Spring Boot) N/A 3 sec 30 MB 0.5 - 2.0 GB 11K req/sec
Fat JAR (WF Swarm) 1-2 sec 5 sec 30 MB 250 - 350 MB 27K req/sec
Theoretically, yes. But, beware:● A simple ReST service deployed in EAP used ⅕ of the memory used
by Spring Boot under load and was 2x faster!
Polyglot● Language agnostic platform● Initial focus on Java & JavaScript
Best in class OSS● Container, Kubernetes, Java, JavaScript, Spring
Poly-architecture● Fast monoliths (existing Java EE, Spring MVC)● Mini and microservices● Serverless (in the future)
Key Differentiators
● Resource efficiency
● Automation for microservices, but also support traditional applications
● Enable faster and more consistent deployments from Development to Production
● Enable application portability across 4 infrastructure footprints: Physical, Virtual, Private & Public Cloud
Key Differentiators
Multiple Runtimes supported in single SKUSupport 12-factor / cloud-native design-patterns :● Healthcheck / load-balancing / proxying● Registry / config.● Rolling upgrades / retries / failover● Separation of concerns
Cloud-scale design● Networking, storage, auto-scaling, logs, alerting
Key Differentiators
The books you’ll need to read
RUNTIMES(Container images and Maven Artifacts)
JAVA EE(JBoss EAP)
MICROPROFILE(WildFly Swarm)
OPENSHIFT SERVICES
REACTIVE(vert.x)
NODE.JS APACHETOMCAT
TESTED FRAMEWORKS(Maven Artifacts)
SPRING BOOT / CLOUD
NETFLIX OSS Ribbon
OpenShift.io
(DeveloperSaaS)
Generators
IDE
etc.
Management
APM
Metrics
ServiceDiscovery Config.
Logging
Health Check
Load Balancing
CI/CDSSOMessaging IMDG API Mgmt
NETFLIX OSSHystrix ...
RHOAR: OpenShift Application Runtimes
QUESTIONS?
WILDFLY SWARM:RED HAT’S MICROPROFILE
EAP and beyond: Red Hat Open Application RuntimesGiuseppe Bonocore
Solution Architect
RUNTIMES(Container images and Maven Artifacts)
JAVA EE(JBoss EAP)
MICROPROFILE(WildFly Swarm)
OPENSHIFT SERVICES
REACTIVE(vert.x)
NODE.JS APACHETOMCAT
TESTED FRAMEWORKS(Maven Artifacts)
SPRING BOOT / CLOUD
NETFLIX OSS Ribbon
OpenShift.io
(DeveloperSaaS)
Generators
IDE
etc.
Management
APM
Metrics
ServiceDiscovery Config.
Logging
Health Check
Load Balancing
CI/CDSSOMessaging IMDG API Mgmt
NETFLIX OSSHystrix ...
RHOAR: OpenShift Application Runtimes
● An innovative approach to package and run Java EE applications
● Just enough App server : package your app with required runtime dependencies (but nothing more)
● Focus on modern cloud applications○ No UI, no session replication
● Adds non-Java EE capabilities○ Netflix OSS, Swagger, etc.
● Implementation of the MicroProfile specification
Monoliths
Microservices
● Eclipse Foundation project● Open source Java microservices
specifications● WildFly Swarm is Red Hat’s
implementation
1:1 RelationshipLoose Relationship
● A maven artifact providing a specific piece of functionality
● Can be auto-detected or explicitly declared
● 184 fractions currently available○ 158 stable○ 26 experimental○ JAX-RS, CDI, Swagger…○ org.wildfly.swarm:microprofile:${version.wildfly-swarm}
Fractions
Supported SpecificationsJava EE 7 Web Profile* MicroProfile 1.0
CertificationsHystrix Ribbon MySQL Oracle DB
MetricsAdditional Supported Fractions
HealthConfiguration
TopologyMonitor
Keycloak
Upstream (Community)
FlywayLogstashFluentd
Swagger
JMSVert.x Integration
ConsulSpring
JolokiaInfinispanjGroups
● Uber Jar (packages your app + what’s needed to run it)
● Hollow Jar (excludes app) (Community)
Packaging
Uber Jar anatomy
Maven repo containing fraction dependencies
Manifest-Version: 1.0Main-Class: org.wildfly.swarm.bootstrap.Main
The app’s original WAR file (could be JAR)
Bootstrapping glue using JBoss modules system
Default main()
WildFly Swarm classes/resources
Hollow Jar anatomy
● Contains the bits needed to run the application, but not the application itself.
● Container based deployments: hollow jar as part of the base image○ Only the top image layer needs to be
updated.
Configuration
Define by:
● System properties● Project stages (yml)● XML● Command-line arguments
Access by:
● Java API● Annotation
Monitoring
● Provided through the monitor fraction● Exposes REST endpoints providing runtime status
{ "name": "swarm-server", "server-state": "running", "suspend-state": "RUNNING", "running-mode": "NORMAL", "uuid": "ea781a82-904d-4b4f-a7ad-68e99e0ce4fd", "swarm-version": "2017.8.1"}
/node
Monitoring
● Provided through the monitor fraction● Exposes REST endpoints providing runtime status
{ "heap-memory-usage": { "init": 325058560, "used": 315881232, "committed": 574095360, "max": 4610064384 }}
/heap
Monitoring
● Provided through the monitor fraction● Exposes REST endpoints providing runtime status
{ "thread-count": 51, "peak-thread-count": 76, "total-started-thread-count": 89, "current-thread-cpu-time": 18220976, "current-thread-user-time": 10000000}
/threads
Monitoring
{ "checks": [ { "id": "server-state", "result": "UP", "data": { "date": "Mon Sep 04 22:17:43 CEST 2017" } } ], "outcome": "UP"}
/health
@GET @Health @Path("/status") public HealthStatus check() { return HealthStatus.named("server-state").up().withAttribute("date", new Date().toString()); }
mvn package
Build
mvn wildly-swarm:run
OR
java -jar <my-app>-swarm.jar
ORIDE > Run …
org.wildfly.swarm.Swarm()
Run
Tooling● JBoss Forge add-on
○ Generate code/scaffolding
● SwarmTool○ Standalone jar that is used to wrap an existing JAR or
WAR file in a -swarm.jar without requiring any other tooling
forge$ project-new --named demo --stack JAVA_EE_7forge$ wildfly-swarm-setupforge$ wildfly-swarm-new-test --target-package org.example.rest --named HelloWorldEndpointTest
wildfly-swarm.io/generator
Ok, so it’s (also) about being lighter?
Don’t believe it? Try it out yourself http://bit.ly/modern-java-runtimes
Runtime(framework)
Boot time server only
Boot time including app deployment
Memory usage without load
Memory usage under load
Measured throughput
JBoss EAP (Java EE) 2 - 3 sec 3 sec 40 MB 200 - 400 MB 23K req/sec
JBoss EAP (Spring) 2 - 3 sec 7 sec 40 MB 500 - 700 MB 9K req/sec
JBoss WS/Tomcat (Spring) 0 - 1 sec 8 sec 40 MB 0.5 - 1.5 GB 8K req/sec
Fat JAR (Spring Boot) N/A 3 sec 30 MB 0.5 - 2.0 GB 11K req/sec
Fat JAR (WF Swarm) 1-2 sec 5 sec 30 MB 250 - 350 MB 27K req/sec
How to select the runtimes
Selection Consideration Project Type Framework Pref Learning Effort Deployment Pkg
RuntimesCloud Native (new)
Cloud Enable (existing) Java EE Non-Java EE No Little Invest Thin Fat Hollow
Lift & Shift
Connect &
Enhance
Refactor &
Rewrite
EAP + + + + + + +Swarm + + + + + + + + + +Vert.x + + + + + + +
Node.js + + + + + +Tomcat + Spring
Boot + + + + + Spring Boot
QUESTIONS?
VERTX.IO: REACTIVE MICROSERVICES
EAP and beyond: Red Hat Open Application RuntimesUgo Landini
Solution Architect
RUNTIMES(Container images and Maven Artifacts)
JAVA EE(JBoss EAP)
MICROPROFILE(WildFly Swarm)
OPENSHIFT SERVICES
REACTIVE(vert.x)
NODE.JS APACHETOMCAT
TESTED FRAMEWORKS(Maven Artifacts)
SPRING BOOT / CLOUD
NETFLIX OSS Ribbon
OpenShift.io
(DeveloperSaaS)
Generators
IDE
etc.
Management
APM
Metrics
ServiceDiscovery Config.
Logging
Health Check
Load Balancing
CI/CDSSOMessaging IMDG API Mgmt
NETFLIX OSSHystrix ...
RHOAR: OpenShift Application Runtimes
Free from : https://developers.redhat.com/
● Reactive Microservices Toolkit for the JVM
● Polyglot - Java, JavaScript, jRuby, Python, Groovy, Scala, Kotlin
● Distributed Event Bus for lightweight messaging
● Event Driven Non-Blocking I/O● Ideal for high concurrency, low
latency applications / services● 2014 JAX Innovation Awards Winner
How to select the runtimes
Selection Consideration Project Type Framework Pref Learning Effort Deployment Pkg
RuntimesCloud Native (new)
Cloud Enable (existing) Java EE Non-Java EE No Little Invest Thin Fat Hollow
Lift & Shift
Connect &
Enhance
Refactor &
Rewrite
EAP + + + + + + +Swarm + + + + + + + + + +Vert.x + + + + + + +
Node.js + + + + + +Tomcat + Spring
Boot + + + + + Spring Boot
Why Reactive?Apps In The Past Apps Today
Single/Few Machines
Clusters of Machines
Single/Few Core Machines
Multicore Machines
Expensive RAM Cheap RAM
Expensive Disk Cheap Disk
Slow N/W Fast N/W
Few Concurrent Users
Many Concurrent Users
Small Data Sets Large Data Sets
Latency in secs Latency in ms
The 2 faces of Reactive
ReactiveA software showing responses to stimuli
ReactiveSystems
ReactiveProgramming
Akka, Vert.x Reactor, RX, Vert.x
Actor, AgentAutonomic Systems
Data flow,Functional
programming
Reactive Manifestohttp://www.reactivemanifesto.org/
Reactive Systems are an architecture style focusing on responsiveness
Asynchronous message passing => ElasticityComponents interacts using messagesMessages allows elasticityResilience is not only about failures, it’s also about self-healing
Send to an address
Dispatch to components subscribed to the address
Pragmatic Reactive systemsAnd that’s what Vert.x offers to you
Development model => Embrace asynchronous
Simplified concurrency => Event-loop, not thread-based
I/O● Non-blocking I/O, if you can’t isolate● HTTP, TCP, RPC => Virtual address● Messaging
Asynchronous development models
Async programming● Exists since the early days of computing● Better usage of hardware resource, avoid blocking threads
Approaches● Callbacks● Future / Promise (single value, many read, single write)● Data streams - Reactive Programming● Data flow variables (cell)● Continuation● Co-Routines
Reactive Architecture / SoftwareApplication to software
A software showing responses to stimuli● Events, Messages, Requests, Failures, Measures, Availability… ● The end of the flow of control ?
Is it new?● Actors, Object-oriented programming… ● IOT, Streaming platform, complex event processing, event sourcing…
Building Reactive Systems
Message Driven
Microservices https://www.reactivemanifesto.org/
Tooling (OCP, Kubernetes)
Reactive Systems
Vert.x
Event Loop
Multi-Reactor
Vert
icle
Vert
icle
Vert
icle
Vert
icle
Vert
icle
JVMVert.x Instance
Vert
icle
Vert
icle
Vert
icle
Vert
icle
Vert
icle
JVMVert.x Instance
vertx.eventBus
All you need is (reactive) love
ReactiveSystems
ReactiveProgramming
QUESTIONS?
L’Integrazione nell’era dei Microservizi
Cloudify your applications: Microservices and beyond
Filippo CalàSolution Architect
Integration
Integration
ESB
Contract
Platform
Data
Application
UDDI Process Flow
MICROSERVICES ?
Integration
Integration
YOU WILL STILL NEED INTEGRATION, EVEN WITH MICROSERVICES!
Agile Integration
“L'integrazione agile e un approccio architetturale che combina metodi e pratiche agili con le tecnologie, allo scopo di integrare rapidamente applicazioni e dati tramite piattaforme specificamente idonee a soluzioni integrate flessibili e adattative.”
AGILE INTEGRATION
Cloud native solutions Lean artifacts, individually deployable Container based scaling and high availability
● Lightweight● Pattern Based● Reusable
Connectors● Microservice Based
● Cloud native solutions
● Lean artifacts, individually deployable
● Container based scaling and high availability
● Well defined, re-usable, and well managed end-points
● Ecosystem leverage
Flexibility Scalability Re-Usability
DistributedIntegration
Container API
AGILE INTEGRATION
Cloud native solutions Lean artifacts, individually deployable Container based scaling and high availability
Flexibility Scalability Re-Usability
DistributedIntegration
Container API
APACHE CAMEL APACHE CAMEL
3SCALE
OPENSHIFT
KUBERNETES
DOCKER
FABRIC8
APACHE KARAF
SPRING BOOT
AGILE INTEGRATION
Cloud native solutions Lean artifacts, individually deployable Container based scaling and high availability
Flexibility Scalability Re-Usability
DistributedIntegration
Container API
FUSE FUSE
3SCALE
OPENSHIFT
KUBERNETES
DOCKER
FABRIC8
APACHE KARAF
SPRING BOOT
Fuse iPaaS
Fuse Integration Services
Fuse Standalone
FUSEThree Fuse Product Initiatives
Fuse Integration Service
APACHE CAMEL
SPRING-BOOT APACHE KARAF
CONTAINER
OPENSHIFT
JBOSSDEVELOPER STUDIO
Writing, configure, test and debug integration/MSA route in JBDS
Camel define routing and mediation rules based on Enterprise Integration Pattern and with 160+ built-in components Choose between
OSGi standard or Spring-boot standalone framework
Deploy, run and manage integration application on enterprise-class cloud development Platform
Build and produces ready-to-run container image using s2i toolkit
CAMEL DSLJBOSSDEVELOPER STUDIO
Java DSL
Blueprint DSL (XML)
Spring DSL (XML)
Demo
microservice by Fuse
ClientAPI(Interface, Contracts)
Routing Protocol Endpoints
Transformation
Microservice
QUESTIONS?
Openshift.io: Portiamo l'IDE nel cloud
Giuseppe Bonocore
Solution Architect
RUNTIMES(Container images and Maven Artifacts)
JAVA EE(JBoss EAP)
MICROPROFILE(WildFly Swarm)
OPENSHIFT SERVICES
REACTIVE(vert.x)
NODE.JS APACHETOMCAT
TESTED FRAMEWORKS(Maven Artifacts)
SPRING BOOT / CLOUD
NETFLIX OSS Ribbon
OpenShift.io
(DeveloperSaaS)
Generators
IDE
etc.
Management
APM
Metrics
ServiceDiscovery Config.
Logging
Health Check
Load Balancing
CI/CDSSOMessaging IMDG API Mgmt
NETFLIX OSSHystrix ...
RHOAR: OpenShift Application Runtimes
Openshift.io - Eclipse CHE tooling
125
What is needed to make a contribution?
IDE Project Files Runtimes
What is needed to make a contribution?
Configuration
IDE RuntimesProject Files
WorkspaceToday
Che Workspaces
IDE RuntimesProject Files
Projects are mounted into the runtimes
Projects rely on workspace runtimes
Workspaces define commands
mvn clean install
start mysql
deploy project
Commands are executed as processes in workspace runtimes
Workspaces provide their own browser IDE
Desktop IDEs can connect over SSH
Workspaces are hosted in Che’s server
Plug-ins
Developer Workspace
Project Badging
Developer WorkspaceDeveloper Workspace
Openshift.io: Cloud Based IDE, SDLC and more...
OpenShift.ioUnified view across teams and projects
Plan and track
Analyze Plan
Assign Prioritize
Create and Build
CloudIDE
Desktop IDE
Developer Workspace
Artifact Management
Testing
Code Analysis
Git Repos
Openshift Pipelines
Runtime
Create new Space
Multiple, guided ways to Get Started
Wizards, powered by Forge project
Advanced Openshift Pipelines
Integrated planner
Kanban Boards
Browser based IDE
Fabric8 Analytics Suggestions
Insights and suggestions
QUESTIONS?
EnMasse : open sourcing the messaging & IoT
The messaging as a service platform
Paolo PatiernoSenior Software Engineer
Luca BigottaSolution Architect
9/11/2017
EnMasseMessaging-as-a-Service
● Open source cloud messaging running on Kubernetes and OpenShift● enmasse.io● github.com/enmasseproject/enmasse
EnMasseFeatures
● Multiple communication patterns: request/response, publish/subscribe and competing consumers
● Support for “store and forward” and direct messaging mechanisms● Scale and elasticity of message brokers● AMQP 1.0 and MQTT support● Simple setup, management and monitoring● Multitenancy: manage multiple independent instances● Deploy “on premise” or in the cloud
Basic ideaRouters and brokers
R
R
R
P C
B
B
Routing vs BrokeringBroker
Producer Broker Consumer
Send message
Accepted
Send message
Accepted
Routing vs BrokeringRouter
Producer Router Consumer
Send message
Accepted
Send message
Accepted
Address model
Address space● Type● Plan
Address● Type● Plan● Properties
1 N 1 M
● Address space : group of addresses accessible through a single connection (per protocol)
● Address : a destination used for sending and receiving messages
Spaces and Addresses
EnMasseArchitecture - “Standard” address space
Qpid Dispatch Routernetwork
ActiveMQ Artemisbrokers
Admin
MQTT gatewayMQTT clients
AMQP & JMS clients
EnMasse“Brokered” address space
ActiveMQ Artemisbrokers
Admin
AMQP & JMS clients
EnMasseSecurity
Qpid Dispatch Routernetwork
ActiveMQ Artemisbrokers
Admin
MQTT gatewayMQTT clients
AMQP & JMS clients
With AMQP SASL plugin
ScalingRouters
R
R
R
R
A
ScalingRouters
R
R
R
R
A
ScalingBrokers
a a b b
Router network
a
ScalingBrokers
a a b b
Router network
a
MQTT over AMQP
● MQTT gateway○ Handles connections with remote MQTT clients○ Bridges MQTT - AMQP protocols
● MQTT lwt○ Provides the “will testament” feature○ In charge to recover & send the “will” if client dies
● It brings MQTT features over AMQP so …○ … it’s not just about translating and bridging protocols … ○ … “will testament” works for AMQP clients as well
EnMasseFuture work
● HTTP(S) support● Bridging address spaces● Kafka integration
○ as part of the “standard” address space (i.e. one AMQP connection for multiple destinations, even a Kafka topic)
○ as “kafka” address space (accessible through native Kafka clients)● Improve Kubernetes support
○ RBAC○ CI (only for OpenShift at present)○ ingress (with better support for TLS SNI)
● Integrate better with Eclipse Hono○ provides interface and API (telemetry, event, …) for connecting IoT devices
QUESTIONS?
BUSINESS AUTOMATION
Process Driven Application, Decisions & Resource Planning
Donato MarrazzoSpecialist Solution Architect
Who cares? Let’s ask to Google Trends!
⬤ Business Process Management⬤ Business Rules⬤ Microservices
⬤ Artificial Intelligence⬤ Cloud Computing⬤ Microservices
Treatingbusiness processes as assets that can be adapted, automated and re-designedis key toinnovation and digital transformation.
Only about 37% of most typical business processes have been digitized.Source: McKinsey
BUSINESS PROCESSES
Process Driven Application
GOALReimagine processes for digital participationHOWShift from BPM to low code process appsMANIFESTATIONProcess applications
Tools for business experts
Tools for developers
RED HAT JBOSS BPM SUITE
PROCESS PARTICIPANTS
LEGACY SYSTEMS
CLOUD SERVICES
APPSAPPSAPPS
Process Services
Decision Services
Enables construction of apps that automate a business process - using a model to drive work through the process to completion…
Business Central Process Server
BPMS v7
● More convenient and pleasurable for citizen developer ● Extended Case Management support● Improving collaborative Team work● First class support for OpenShift
Major themes
CITIZEN DEVELOPER
CITIZEN DEVELOPER PROFILE
BPMN2 MODELERStunner
App Former
Dashbuilder AppFormer-based
EntandoPartnership
CASE MANAGEMENT
BPM Usage spectrumStraight Through
The BPM engine “choreographs” a sequence of automated activities, it involves humans by exception
● Trading processes (Capital Market, Banking, Energy ...)
● Automatic claims processing● Automatic reordering● Inventory reduction / rebalancing● Order to cash automation
Human Intensive
The BPM says to humans which is the next action in a quiet pre-ordered manner.
● Order fulfillment● Claims processing● Loan approvals● Mortgage origination● Travel requests● Purchase requests● Mobile workforce support
Case Management
BPM suggests possible next steps, Humans decides the next best action eventually overriding with and ad hoc activity. Users look at the BPM as a task and document organizer
● Investigation solution● Incident management solution● Next-Gen customer onboarding● Customer retention program● Personalized customer service● Omni-channel engagement
marketing
Engine Support
Runtime Strategy
PER_CASE provides a single KIE-Session for all process instances within a case.
Case Files
Live in session’s “WorkingMemory” (as opposed to process variables).
Case-scoped, so accessible to all process instances in a given case
Case Roles
Per-case mapping of users and groups to case-users and case-groups
People can have different roles in different case instances.
Mapping provided when case is created (and can be changed afterwards)
Case Management
Focus on Stages
At glance:
● Data● Task● Milestones● Roles● Activities● Documents
Case view
DEPLOYMENT
CONTROLLERWebsocket communication
KIE Server initiate the communication at startup and the controller reuse it.
Previously, for managed KIE Server configuration, both controller and kie server need to know how to communicate with each other
● This was particularly complex to manage in OpenShift environments, where pod can be created and destroyed frequently
Main goals:● Hide the complexity of many KIE Server
instances hosting different projects (kjars)● Aggregate information from different KIE
Servers regardless if they share the same DB or host the same projects (kjars)
KIE Server send notifications to Smarter Router when configuration is changed: container start / stop, instance start/ stop
SMARTER ROUTERHide configuration complexity
● Users interact with KIE Servers always via Smart Router● KIE Servers can come and go at anytime and register/unregister in
the Smart Router● Smart Router will dynamically update Controller with new
containers coming in● Admin Console knows existing KIE servers
CLOUD ARCHITECTUREImmutable Unmanaged KIE Servers with Smart Router and Admin Console
The Execution Errors view shows a list of errorsUser can acknowledge errorsQuick searchFilter by fields ● Process Instance Id
● Job Id
● Type
ERROR HANDLING
BUSINESS DECISIONS
Tools for business experts
Tools for developers
RULES
RED HAT JBOSS BRMS
APPSAPPSAPPS
Decision Services
Business Central Decision Server
Client App
Enables construction of apps that automate business decisions, guided by business rules...
Decision Tables
“DMN, which stands for Decision Model and Notation,is a relatively new standard managed by OMG, the organization behind BPMN. It is trying to do for Business Decision Management what BPMN did for Business Process Management a decade ago: empower the business to take charge of the logic that drives its operations, through a vendor-independent diagramming language.” (Bruce Silver)
● Version 1.1 released in June 2016● Defines among other things:
○ a graphical language for business decision modelling○ a standard notation for decision tables○ an expression language called FEEL (which stands for Friendly Enough
Expression Language)○ a metamodel and an interchange format (XML)○ 3 conformance levels for tool implementations
Basic concepts
a Decision is the actof determining an output value from a number of input values
A Business Knowledge Modelencapsulates business know-how in the form of business rules, analytic models, or other formalisms.
Input Data may be data structures, rather than just simple data items.
a decision requires one or more input data
a Decision requires one or more Business Knowledge
BUSINESS RESOURCE PLANNING
Optimize Goals
With limited Resources Under Constraints
BUSINESS RESOURCE PLANNING
EXAMPLES
Business Resource Planner is an “optimization engine” (or “constraint satisfaction solver”) platform that runs on JBoss BRMS
It enables regular Java developers to create solvers for complex planning problems using a variety of out-of-the-box provided algorithms
It adds unique value to a JBoss BRMS and/or JBoss BPM Suite subscription
BUSINESS RESOURCE PLANNER
QUESTIONS?