osd 2016 middleware track

181
MIDDLEWARE TRACK A cura del Middleware Solution Architect team di Red Hat #redhatosd

Upload: ugo-landini

Post on 16-Apr-2017

269 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: Osd 2016 Middleware Track

MIDDLEWARE TRACK

A cura del Middleware Solution Architect team di Red Hat

#redhatosd

Page 2: Osd 2016 Middleware Track
Page 3: Osd 2016 Middleware Track

Agenda Middleware Track part 1

● 14.00 MicroServices, le dimensioni non contano○ Ugo Landini, Samuele Dell’Angelo

● 14.30 Wildfly Swarm, Spring Boot & Vertx.io: il nuovo che avanza○ Ugo Landini, Samuele Dell’Angelo

● 15.00 Microservices con JBoss EAP 7: innovare in continuità○ Giuseppe Bonocore

● 15.30 Microregole per grandi progetti con il BRMS○ Andrea Leoncini

Page 4: Osd 2016 Middleware Track

Agenda Middleware Track part 2

● 16.00 Integrazione e microservizi: come un cammello può passare dalla cruna di un ago○ Filippo Calà, Giuseppe Bonocore

● 16.30 API Management con 3Scale nell’era dei microservizi○ Luca Bigotta

● 17.00 SALA PLENARIA

● 17.15 ESTRAZIONE FINALE PREMI

Page 5: Osd 2016 Middleware Track

#redhatosd

Page 6: Osd 2016 Middleware Track
Page 7: Osd 2016 Middleware Track

MicroServices: le dimensioni non contano

Ugo Landini & Samuele Dell’Angelo

#redhatosd

Page 8: Osd 2016 Middleware Track

389 project | aeolus-configure | anaconda | attr | Audrey | Augeas | AuthHub | Autofs | Avahi | Beaker | Boxes | Btrfs | CacheFS | Cairo | candlepin | certmonger | CIFS | Cluster 3 | cobbler | colord | Completely Fair Scheduler | Conductor Control Group Configuration Library | Corosync | CRaSH | Crypto API | Cumin | Cygwin | D-Bus | Dashbuilder | Data Grids for the Java Platform | device-mapper | DeviceKit | DistributionUtilities | dlm | Dogtag | DPDK | Dracut | Editline Library EDS | EJB 3 | elfutils | elfutils | Embedded Jopr | Evolution | Evolution-exchange | eXo JCR | ext3 | ext4 | fence-agents | fence-virt | Flannel | fontconfig | func | Gamin | GateIn Portal | gcc | gcc | gcj | gdb | GFS | GFS2 | glib | gss-proxy GTK+ | gvfs | gzip | HTCondor | ID Utils | imagefactory | IPSec-Tools | iptraf-ng | Jandex | Java | JGroups | Jreadline | JRuby | JSFUnit | jUDDI | Katello | Kerberos | Kimchi | Koji | libguestfs | libibverbs | libminidump | libnotify | libqb libstoragemgmt | libuser | libvirt | libxml2 | libxslt | Linux Audit | Linux Infiniband Project | Linux Kernel | Linux PAM | linux-nfs | Luci | LVM2 | LVM2 | lynx | ManageIQ | Matahari | Maven Integration for Eclipse | Maven Integration for Web Tools Platform | Mock | mod_cluster | moVirt | nautilus | netfilter | NetworkManager | NFS-Ganesha | nmap | Open vSwitch | openais | OpenDaylight | OpenJDK | OpenSSH | OpenSSL | OPNFV | OProfile | oVirt | oVirt Engine | oVirt Node | OVMF | Oz pacemaker | PackageKit | PackageKit | pango | PAPI | Paradyn | patchutils | Performance Co-Pilot | PicketBox | PicketLink | piglit | pixman | polkit | Polkit Qt | Poppler | Portlet Bridge | PostgreSQL | PressGang psmisc | Pulp | PulseAudio | pungi | pynfs | QEMU | Red Hat Update Agent | RESTEasy | rgmanager | RHQ | rpm | rpmgrill | RSYSLOG | Samba | Samba | SETroubleshoot ShrinkWrap | slapi-ns | Smokestack | Spacewalk Spherical | Spice | Spice-gtk | Spice-protocol | Stilts | suds | SWI Prolog | SwitchYard | syslog-ng | System Security Services Daemon | systemd | SystemTap | The Foreman | Thin Crust | tin | UberFire | udev udisks | udisks | UPower | util-linux | Valgrind | vc-dwim | vdagent | vdsm | vfs | Virt-clone | Virt-image | Virt-Install | Virt-manager | Virt-viewer | Virtual memory manager | Wallaby | Wayland | Wise | XFS | xinput | XNIO | Xorg | XrandR | yum

Page 9: Osd 2016 Middleware Track

10 Deploy al giorno

Come è possibile?

Page 10: Osd 2016 Middleware Track
Page 11: Osd 2016 Middleware Track

Cos’è una Microservice Architecture (MSA)?Un approccio architetturale per decomporre applicazioni complesse in sistemi indipendenti

● Organizzati per business capabilities

● Scalabilità indipendente

● Ciclo di vita indipendente

● Governo decentralizzato

● Data management decentralizzato

Page 12: Osd 2016 Middleware Track

Cos’è una Microservice Architecture (MSA)?

Picco di aspettative

gonfiate

x

Disillusione

Qui si fa sul serio

Page 13: Osd 2016 Middleware Track

Your Journey to Microservices :-)

Self-Service,On-Demand,

Elastic,Infrastructure

asCode

(Cloud)

Re-Org ->DevOps

Automazione:Puppet, Chef,

Ansiblee/o

Containers

CI & CDDeployment

Pipeline

UnMicroservizio

SiliconValley

DotComStartup

Cos’è una Microservice Architecture (MSA)?

Page 14: Osd 2016 Middleware Track

1. Self-Service, on-demand, elastic infrastructure as codea. Quanti gg per il provisioning di una nuova VM?

2. Dev vs OpsChi risponde al telefono se l’app non funziona?

3. AutomationPhoenix vs Snowflake

4. CI & CDa. Deployment Pipeline

Cos’è una Microservice Architecture (MSA)?

Page 15: Osd 2016 Middleware Track

Cos’è una Microservice Architecture (MSA)?

GREENBROWN

Page 16: Osd 2016 Middleware Track

A Development / Deployment Time:● Automation● Continuous Integration / Delivery● Configuration Management● Service / API design● Rigorous Testing ● Dependency management● Design for eventual consistency● Artifact repositories

Container: standardizzazione, automation e dependency managementUser Experience: maggiore produttività per gli sviluppatori

A Runtime:● Standardization● Isolation● Service Discovery● Load Balancing● Circuit Breaker, Fallback● Health checks & automated recovery● Distributed logging● Tracing● Infrastructure Monitoring

Page 17: Osd 2016 Middleware Track

● Deploy facile e portabile● Creato da immagini immutabili e

a strati (layered)● Isolato dal sistema operativo

dell’host.

I Container impacchettano le applicazioni con le loro dipendenze, isolando il runtimeAlta densità e massima efficienza

HOST OS

SERVER

CONTAINER

LIBS

APP

CONTAINER

LIBS

APP

Page 18: Osd 2016 Middleware Track

DEMO BUILD YOUR OWN CONTAINER IN 50 lines

Page 19: Osd 2016 Middleware Track

● Isolati e sicuri● Sembrano girare in un loro

ambiente● Se ne possono far girare

centinaia in una sola macchina● Le funzionalità sono nel kernel ● Docker è semplicemente un

formato

I Container sono dei semplici processi Linux

Alta densità e massima efficienza

HOST OS

SERVER

CONTAINER

LIBS

APP

CONTAINER

LIBS

APP

Page 20: Osd 2016 Middleware Track

Kubernetes è un container orchestrator per le applicazioni (non per le macchine)Dal greco “pilota”: radice della parola “governatore” (dal latino: gubernator)

MasterNode

Bare Metal Virtual Private Cloud Public Cloud

Storage

OperatorExternal Services

Page 21: Osd 2016 Middleware Track

A Development / Deployment Time:● Automation● Continuous Integration / Delivery● Configuration Management● Service / API design● Rigorous Testing ● Dependency management● Design for eventual consistency● Artifact repositories

Kubernetes aggiunge caratteristiche fondamentali per le MSAs (e non solo!)Kubernetes è la versione open di Borg, il sistema usato internamente da Google per scalare.

A Runtime:● Standardization● Isolation● Service Discovery● Load Balancing● Circuit Breaker, Fallback● Health checks & automated recovery● Distributed logging● Tracing● Infrastructure Monitoring

Page 22: Osd 2016 Middleware Track
Page 23: Osd 2016 Middleware Track

OpenShift Container Platform è la versione ENTERPRISE di Kubernetes

SERVICE CATALOG(LANGUAGE RUNTIMES, MIDDLEWARE, DATABASES, …)

SELF-SERVICE

APPLICATION LIFECYCLE MANAGEMENT(CI / CD)

BUILD AUTOMATION DEPLOYMENT AUTOMATION

CONTAINER CONTAINERCONTAINER CONTAINER CONTAINER

NETWORKING SECURITYSTORAGE REGISTRYLOGS &

METRICS

CONTAINER ORCHESTRATION & CLUSTER MANAGEMENT(KUBERNETES)

RED HAT ENTERPRISE LINUX

CONTAINER RUNTIME & PACKAGING(DOCKER)

ATOMIC HOST

INFRASTRUCTURE AUTOMATION & COCKPIT

Page 24: Osd 2016 Middleware Track

A Development / Deployment Time:● Automation● Continuous Integration / Delivery● Configuration Management● Service / API design● Rigorous Testing ● Dependency management● Design for eventual consistency● Artifact repositories

Openshift Container Platform aggiunge ulteriori servizi per gli sviluppatoriIl developer si deve concentrare solo sul design & development dei microservizi

A Runtime:● Standardization● Isolation● Service Discovery● Load Balancing● Circuit Breaker, Fallback● Health checks & automated recovery● Distributed logging● Tracing● Infrastructure Monitoring

Page 25: Osd 2016 Middleware Track

Wildfly Swarm, Vertx.io & Spring Boot:Il nuovo che avanza

Ugo Landini & Samuele Dell’Angelo

#redhatosd

Page 26: Osd 2016 Middleware Track

MicroProfile 1.0!Ottimizzare Enterprise Java per i Microservices

Microservice Collaboration and Innovation in the Java Community

Learn more @ microprofile.io

Page 27: Osd 2016 Middleware Track
Page 28: Osd 2016 Middleware Track

DropWizard

www.dropwizard.io

JAX-RS API

Il primo sul mercato

DropWizard Metrics

Embeddable servers:Jetty

Spring Boot

projects.spring.io/spring-boot

Spring API (@RestController)

‘Starter’ POMs: start.spring.io

Embeddable servers:Tomcat, Jetty, Undertow

WildFly Swarm

wildfly-swarm.io

Java EE 7 APIs

‘Starter’ POMs: wildfly-swarm.io/generator

Embeddable servers:WildFly (Undertow)

Opinionated & java -jar myapp.jar

Page 29: Osd 2016 Middleware Track

● Stesse tecnologie di JBoss, ma diverso punto di vista

● Si “monta” tanto Application Server quanto basta per il servizio

○ MicroProfile 1.0

○ Flat jar

○ Interfaccia web o via JBoss Forge per scegliere cosa serve

Page 30: Osd 2016 Middleware Track
Page 31: Osd 2016 Middleware Track

(Un-Opinionated) Toolkit per applicazioni reactive & async

Low-latency microservices che interagiscono con l’EventBus

Elasticità e resilienza “built-in”

Democratico, parla con tutti (.NET, Go, Ceylon, Rust, Cobol, Java EE, Spring...)

vertx.io

http://vertx.io/blog/my-first-vert-x-3-application/

Page 32: Osd 2016 Middleware Track

Vert.x EventBus

Ver

ticle

1

Ver

ticle

2

Ver

ticle

3

Ver

ticle

4

Ver

ticle

5

JVM

Vert.x Instance

Ver

ticle

1

Ver

ticle

2

Ver

ticle

6

Ver

ticle

7

JVM

Vert.x Instance

vertx.eventBus

Page 33: Osd 2016 Middleware Track

DEMO VERTX.IO, SWARM & SB & All in One

Page 34: Osd 2016 Middleware Track

Release It!Michael T. Nygard

(Java outdated, ma le storie dei fallimenti sono eccezionali)

Il libro che ha inventato il Circuit Breaker

Page 35: Osd 2016 Middleware Track

Service A Service B

Circuit Breaker

Page 36: Osd 2016 Middleware Track

Service A Service B

Hystrix - circuit-breaker, bulkhead

Page 37: Osd 2016 Middleware Track
Page 38: Osd 2016 Middleware Track
Page 39: Osd 2016 Middleware Track

Distributed Tracing

Page 40: Osd 2016 Middleware Track

App tradizionali Microservizi

Page 41: Osd 2016 Middleware Track

Virtuale

Cloud

Fisico

App tradizionali

Microservizi

Page 42: Osd 2016 Middleware Track

Red Hat xPaas

Application Server Pivotal tc Server, VMware vFabric, Oracle WebLogic Server, IBM WebSphere

JBoss EAPJBoss Web Server

In-memory data grid IBM WebSphere eXtreme Scale, Oracle Coherence, Pivotal GemFire, Software AG Terracotta JBoss Data Grid

Application integration IBM Integration Bus, Oracle SOA Suite and ESB, MuleSoft AnyPoint Platform, Sonic ESB, Tibco ActiveMatrix JBoss Fuse

Business rules and process automation

IBM Operational Decision Manager and BPM, Oracle SOA Suite and BPM Suite, Pega BPM, FICO Blaze Advisor

JBoss BRMSJBoss BPM Suite

Messaging IBM WebSphereMQ, Pivotal RabbitMQ, VMware vFabric, Tibco Enterprise Message Service JBoss A-MQ

Mobile IBM MobileFirst, SAP Mobile Platform, Kony Mobility Platform, Telerik Platform, AnyPresence Mobile Application Platform

Data virtualization and data services

IBM InfoSphere, Progress DataXtend SI, Composite Information Server, Denodo JBoss Data Virtualization

Page 43: Osd 2016 Middleware Track

Links

Microservices Playgroundbit.ly/msa-instructions

http://developers.redhat.com/downloads

Container Development KitRecorded Demo: https://youtu.be/SPATMHP-xw8

https://github.com/redhat-italy/osd-microservices-appsOSD Demo Applications

Page 44: Osd 2016 Middleware Track

MICROSERVICES con EAP7:Innovare in continuità

Giuseppe Bonocore

#redhatosd

Page 45: Osd 2016 Middleware Track

JBoss Enterprise Application Platform

● Basato su WildFly

○ Hibernate, CXF, Infinispan...

● Utilizzato da migliaia di aziende in

Italia e nel mondo

○ Banking, Telco, Utility, mission

critical

● Semplice e performante

○ Packaging, boot time, performance

#1 Open Source JEE Server

Page 46: Osd 2016 Middleware Track

Enterprise Application Platform 7

● JEE 7 certified○ WebSocket, batch, JSon

● Semplificazione○ Port reduction, graceful shutdown

● Consolidamento○ Undertow, Artemis

Cosa c’è di nuovo

Page 47: Osd 2016 Middleware Track

Enterprise Application Platform 7

● AngularJS

● Arquillian

● jQuery, jQuery Mobile

● Spring (Web Flow, WS, Security)

Tested Frameworks

Page 48: Osd 2016 Middleware Track

Enterprise Application Platform 7Scenari

Fisico Virtuale Cloud

Applicazioni Tradizionali Microservizi

Page 49: Osd 2016 Middleware Track

Enterprise Application Platform 7Scenari

Applicazioni Tradizionali Microservizi

Page 50: Osd 2016 Middleware Track

Enterprise Application Platform 7

● Microservizi in Java: UberJar con Hibernate, CXF, Log4j…○ Il rischio è di ricostruire un application server…

● EAP: Ottimizzato per i Microservizi○ Boot time in 2 sec (circa), lazy loading modules, 2 (o 1) porte,

containerizzabile, scriptabile

Microservices in JEE ?!?!

Page 51: Osd 2016 Middleware Track

Enterprise Application Platform 7

● Riutilizzo di codice e skills○ JEE features in un microservizio

(Clustering con OSE !)

● Hipster ready :-)○ Wildfly Swarm, JS Server side

Microservices in JEE ?!?!

Page 52: Osd 2016 Middleware Track

EAP S2i

Nome App

Puntamenti GIT

Page 53: Osd 2016 Middleware Track

Enterprise Application Platform 7Red Hat xPaas

Enterprise Application Platform

JBoss Web Server (Tomcat)

JBoss Data Grid

JBoss Developer Studio

Fuse

A-MQ

Data Virtualization *

Business Process

Management *

Business Rules

Management System

Red Hat Mobile /

FeedHenry

Application Container Services

IntegrationServices

BusinessProcess Services

MobileServices

* Coming Soon

Page 54: Osd 2016 Middleware Track

Enterprise Application Platform 7Red Hat xPaas

OPENSHIFT CONTAINER PLATFORM

Red Hat Enterprise Linux Red Hat Enterprise Linux Red Hat Enterprise Linux

Container ContainerJBossEAP

JBossData Grid

JBossFuse

Container JBossA-MQ

ContainerJBossBRMS

ORCHESTRATION

Page 55: Osd 2016 Middleware Track

Architettura

Page 56: Osd 2016 Middleware Track
Page 57: Osd 2016 Middleware Track

OpenShift può girare su qualsiasi tipo di infrastruttura

Page 58: Osd 2016 Middleware Track

I nodi sono istanze di RHEL

Page 59: Osd 2016 Middleware Track

I servizi girano in container Docker

Page 60: Osd 2016 Middleware Track

Registry

I Pod eseguono uno o più docker container

Page 61: Osd 2016 Middleware Track

I Master orchestrano i nodi e le app

Page 62: Osd 2016 Middleware Track

I Master forniscono API per autenticazione di utenti & client

Page 63: Osd 2016 Middleware Track

I Master usano etcd per la persistenza

Page 64: Osd 2016 Middleware Track

I Master forniscono lo scheduler per la gestione dei pod sui nodi

Page 65: Osd 2016 Middleware Track

Il posizionamento dei Pod è determinato da una policy

Page 66: Osd 2016 Middleware Track

I Service permettono ai pods di connettersi l’un l’altro

Page 67: Osd 2016 Middleware Track

I Management/Replication controller gestiscono il ciclo di vita dei pod

Page 68: Osd 2016 Middleware Track

OpenShift gestisce il recover in automatico

Page 69: Osd 2016 Middleware Track

OpenShift gestisce il recover in automatico

Page 70: Osd 2016 Middleware Track

I Pods possono connettersi ad uno shared storage

Page 71: Osd 2016 Middleware Track

Il Routing layer “ruota” richieste esterne ai pod

Page 72: Osd 2016 Middleware Track

I Dev accedono ad openShift via web, CLI o IDE

Page 73: Osd 2016 Middleware Track

Virtuale

Cloud

Fisico

App tradizionali

Microservizi

Page 74: Osd 2016 Middleware Track

Red Hat xPaas

Application Server Pivotal tc Server, VMware vFabric, Oracle WebLogic Server, IBM WebSphere

JBoss EAPJBoss Web Server

In-memory data grid IBM WebSphere eXtreme Scale, Oracle Coherence, Pivotal GemFire, Software AG Terracotta JBoss Data Grid

Application integration IBM Integration Bus, Oracle SOA Suite and ESB, MuleSoft AnyPoint Platform, Sonic ESB, Tibco ActiveMatrix JBoss Fuse

Business rules and process automation

IBM Operational Decision Manager and BPM, Oracle SOA Suite and BPM Suite, Pega BPM, FICO Blaze Advisor

JBoss BRMSJBoss BPM Suite

Messaging IBM WebSphereMQ, Pivotal RabbitMQ, VMware vFabric, Tibco Enterprise Message Service JBoss A-MQ

Mobile IBM MobileFirst, SAP Mobile Platform, Kony Mobility Platform, Telerik Platform, AnyPresence Mobile Application Platform

Data virtualization and data services

IBM InfoSphere, Progress DataXtend SI, Composite Information Server, Denodo JBoss Data Virtualization

Page 75: Osd 2016 Middleware Track

Links

Microservices Playgroundbit.ly/msa-instructions

http://developers.redhat.com/downloads

Container Development KitRecorded Demo: https://youtu.be/SPATMHP-xw8

https://github.com/redhat-italy/osd-microservices-appsOSD Demo Applications

Page 76: Osd 2016 Middleware Track

MicroRegole per grandi progetticon il BRMS

Andrea Leoncini

#redhatosd

Page 77: Osd 2016 Middleware Track

La comunità Drools

Workbench (web UI per la redazione e la gestione delle regole)

Expert (Rule Engine)

Fusion (CEP, Complex Event Processing)

jBPM (integrazione con processi)

OptaPlanner (pianificazione delle risorse)

Page 78: Osd 2016 Middleware Track

Cos’è un motore di regole (Rule Engine)?

A business rules engine is a software system that executes one or more business rules in a runtime production environment. The rules might come from legal regulation ("An employee can be fired for any reason or no reason but not for an illegal reason"), company policy ("All customers that spend more than $100 at one time will receive a 10% discount"), or other sources. A business rule system enables these company policies and other operational decisions to be defined, tested, executed and maintained separately from application code.

Source: wikipedia

Page 79: Osd 2016 Middleware Track

DROOLS/Red Hat JBoss BRMS

● Vantaggi di un Motore di Regole:○ Permette di dire "COSA fare", e non "COME farlo".○ Separazione della logica e dei dati○ Centralizzazione della conoscenza○ Integrazione dei Tool○ Regole Understandable○ Velocità e Scalabilità

Page 80: Osd 2016 Middleware Track

Quando dovreste usare Red Hat JBoss BRMS

● Scenari molto complessi, difficili da definire anche per i business experts

● Non esiste o non è noto un ben definito algoritmo● Requisiti che hanno bisogno di essere modificati molto spesso● Necessità di prendere decisioni molto velocemente, spesso su set

di dati non completi

Page 81: Osd 2016 Middleware Track

rule "Sound the alarm"when $f : FireDetected( ) not( SprinklerActivated() )then // sound the alarmend

Una semplice regola

Una semplice regola CEP, senza il concetto di tempo

Page 82: Osd 2016 Middleware Track

rule "Sound the alarm"when $f : FireDetected( ) not( SprinklerActivated() )then // sound the alarmend

Una semplice regola

Nome Regola

Una semplice regola CEP, senza il concetto di tempo

Page 83: Osd 2016 Middleware Track

rule "Sound the alarm"when $f : FireDetected( ) not( SprinklerActivated() )then // sound the alarmend

Una semplice regola

LHS

Una semplice regola CEP, senza il concetto di tempo

Page 84: Osd 2016 Middleware Track

rule "Sound the alarm"when $f : FireDetected( ) not( SprinklerActivated() )then // sound the alarmend

Una semplice regola

Una semplice regola CEP, senza il concetto di tempo

RHS

Page 85: Osd 2016 Middleware Track

rule "Sound the alarm"when $f : FireDetected( ) not( SprinklerActivated( this after[0s,10s] $f ) )then // sound the alarmend

Una semplice regola CEP

Una semplice regola CEP, con il concetto di tempo

Page 86: Osd 2016 Middleware Track

rule "Sound the alarm"when $f : FireDetected( ) not( SprinklerActivated( this after[0s,10s] $f ) )then // sound the alarmend

Una semplice regola CEP

Una semplice regola CEP, con il concetto di tempo

TEMPO

Page 87: Osd 2016 Middleware Track

CEP con il BRMS

Complex Event Processing: accorgersi di eventi significativi per il business riconoscendo time-based patterns in uno o più data feed in real-time...● Regola + Tempo: aggiunge il concetto di tempo alle regole base

○ Sliding windows○ Entry points○ Time operations

Page 88: Osd 2016 Middleware Track

Rule Engine taglia slim

● Possibilità di invocare le regole○ localmente al runtime○ da remoto

● Deploy○ JEE○ OSGI○ Wildfly Swarm○ Spring-Boot○ Java standalone○ Docker

Page 89: Osd 2016 Middleware Track

Lanciamo la campagna Pro If

● Non preoccupatevi se la logica della vostra applicazione è piena di If.

● Soprattutto non preoccupatevi se non l’avete capito subito...

● Lanciamo ufficialmente la campagna Pro If○ Gli if dal codice li togliamo noi!

Page 90: Osd 2016 Middleware Track

Scenario di deploy

Page 91: Osd 2016 Middleware Track

KIE factor

Sviluppatori e analisti lavorano ai progetti e producono regole, servizi, modelli di dati e processi

Page 92: Osd 2016 Middleware Track

KIE factor

La build dei progetti produce i cosiddetti “artefatti”

Page 93: Osd 2016 Middleware Track

KIE factor

L’Execution Server prende gli artefatti con cui crea la propria base di conoscenza direttamente dal server Maven

Page 94: Osd 2016 Middleware Track

KIE factor

L’Execution Server può essere eseguito nel “Java Flavour” preferito.

Page 95: Osd 2016 Middleware Track

Uso del Rule Engine

Page 96: Osd 2016 Middleware Track

Uso del Rule Engine

Un Engine “Specializzato”

No scanner, uno specifico GAV, integrato nella mia pipeline di rilascio

Page 97: Osd 2016 Middleware Track

E se serve un motore di regole scalabile ed in alta affidabilità?

HACEP: https://github.com/redhat-italy/hacep/

● Si possono gestire, grazie a JBoss Data Grid, un certo numero di Engine contemporanei○ Mantenendo contemporaneamente copie di backup

● Distribuzione degli eventi per uno o più gruppi uniformi (carta di credito, utente, giocatore, ecc.)

● Scalabilità fino a centinaia di nodi● Prestazioni del cluster direttamente proporzionali al numero di nodi BRMS

Page 98: Osd 2016 Middleware Track

HACEP: https://github.com/redhat-italy/hacep/

Page 99: Osd 2016 Middleware Track

DEMO RULE BRMS

Page 100: Osd 2016 Middleware Track

Virtuale

Cloud

Fisico

App tradizionali

Microservizi

Page 101: Osd 2016 Middleware Track

Red Hat xPaas

Application Server Pivotal tc Server, VMware vFabric, Oracle WebLogic Server, IBM WebSphere

JBoss EAPJBoss Web Server

In-memory data grid IBM WebSphere eXtreme Scale, Oracle Coherence, Pivotal GemFire, Software AG Terracotta JBoss Data Grid

Application integration IBM Integration Bus, Oracle SOA Suite and ESB, MuleSoft AnyPoint Platform, Sonic ESB, Tibco ActiveMatrix JBoss Fuse

Business rules and process automation

IBM Operational Decision Manager and BPM, Oracle SOA Suite and BPM Suite, Pega BPM, FICO Blaze Advisor

JBoss BRMSJBoss BPM Suite

Messaging IBM WebSphereMQ, Pivotal RabbitMQ, VMware vFabric, Tibco Enterprise Message Service JBoss A-MQ

Mobile IBM MobileFirst, SAP Mobile Platform, Kony Mobility Platform, Telerik Platform, AnyPresence Mobile Application Platform

Data virtualization and data services

IBM InfoSphere, Progress DataXtend SI, Composite Information Server, Denodo JBoss Data Virtualization

Page 102: Osd 2016 Middleware Track

Links

Microservices Playgroundbit.ly/msa-instructions

http://developers.redhat.com/downloads

Container Development KitRecorded Demo: https://youtu.be/SPATMHP-xw8

https://github.com/redhat-italy/osd-microservices-appsOSD Demo Applications

Page 103: Osd 2016 Middleware Track

Integrazione e Microservizi:come un cammello può passare dalla

cruna di un ago

Filippo Calà & Ugo Landini

#redhatosd

Page 104: Osd 2016 Middleware Track

Che cosa NON è Apache Camel?

Non è un Enterprise Service Bus

Page 105: Osd 2016 Middleware Track

Che cos’è Apache Camel?

Camel è un potente Framework Open Source di Integrazione

basato sugli Enterprise Integration Pattern

Page 106: Osd 2016 Middleware Track

Che cos’è Apache Camel?

JBoss Fuse

Open Source Lightweight Integration Platform

Page 107: Osd 2016 Middleware Track

Che cos’è Apache Camel?

JBoss Fuse

Architettura modulare e capacità di integrazione

Page 108: Osd 2016 Middleware Track

Che cos’è Apache Camel?

JBoss Fuse

JBoss Fuse include Apache Camel

Page 109: Osd 2016 Middleware Track

Che cos’è Apache Camel?

JBoss Fuse

Facile da estendere

Page 110: Osd 2016 Middleware Track

Che cos’è Apache Camel?

JBoss Fuse

Facile da gestire

Page 111: Osd 2016 Middleware Track

Che cos’è Apache Camel?

JBoss Fuse Fa tutto quello che fanno gli ESB e molto di

più

Page 112: Osd 2016 Middleware Track

Integration Framework

Page 113: Osd 2016 Middleware Track

Enterprise Integration Patterns

Page 114: Osd 2016 Middleware Track

Enterprise Integration Patterns

Page 115: Osd 2016 Middleware Track

Enterprise Integration Patterns

Page 116: Osd 2016 Middleware Track

Enterprise Integration PatternsContent Based Router

Page 117: Osd 2016 Middleware Track

Enterprise Integration PatternsContent Based Router

from newOrder

Page 118: Osd 2016 Middleware Track

Enterprise Integration PatternsContent Based Router

from newOrderchoice

Page 119: Osd 2016 Middleware Track

Enterprise Integration PatternsContent Based Router

from newOrderchoice

when isWidget to widget

Page 120: Osd 2016 Middleware Track

Enterprise Integration PatternsContent Based Router

from newOrderchoice

when isWidget to widget otherwise to gadget

Page 121: Osd 2016 Middleware Track

Enterprise Integration PatternsContent Based Router

from (newOrder)choice

when (isWidget) to (widget) otherwise to (gadget)

Page 122: Osd 2016 Middleware Track

Enterprise Integration PatternsContent Based Router

from (newOrder).choice()

.when(isWidget) .to(widget) otherwise().to(gadget);

Page 123: Osd 2016 Middleware Track

Enterprise Integration PatternsContent Based Router

from (newOrder).choice()

.when(isWidget) .to(widget) otherwise().to(gadget);

Page 124: Osd 2016 Middleware Track

Enterprise Integration PatternsContent Based Router

from (newOrder).choice()

.when(isWidget) .to(widget) otherwise().to(gadget);

Endpoint newOrder = endpoint("activemq:queue:newOrder");

Page 125: Osd 2016 Middleware Track

Enterprise Integration PatternsContent Based Router

from (newOrder).choice()

.when(isWidget) .to(widget) otherwise().to(gadget);

Endpoint newOrder = endpoint("activemq:queue:newOrder"); Predicate isWidget = xpath("/order/product = 'widget'");

Page 126: Osd 2016 Middleware Track

Enterprise Integration PatternsContent Based Router

from (newOrder).choice()

.when(isWidget) .to(widget) otherwise().to(gadget);

Endpoint newOrder = endpoint("activemq:queue:newOrder"); Predicate isWidget = xpath("/order/product = 'widget'");Endpoint widget = endpoint("activemq:queue:widget"); Endpoint gadget = endpoint("activemq:queue:gadget");

Page 127: Osd 2016 Middleware Track

Enterprise Integration PatternsJava DSL

import org.apache.camel.builder.RouteBuilder;

public class MyRoute extends RouteBuilder {public void configure() throws Exception {

from("activemq:queue:newOrder").choice()

.when(xpath("/order/product = 'widget'")).to("activemq:queue:widget")

.otherwise().to("activemq:queue:gadget");

}}

Page 128: Osd 2016 Middleware Track

Enterprise Integration PatternsXML DSL

<route><from uri="activemq:queue:newOrder"/><choice>

<when><xpath>/order/product = 'widget'</xpath> <to uri="activemq:queue:widget"/>

</when><otherwise>

<to uri="activemq:queue:gadget"/></otherwise>

</choice></route>

Page 129: Osd 2016 Middleware Track

Architecture

Page 130: Osd 2016 Middleware Track

Componenti

Page 131: Osd 2016 Middleware Track
Page 132: Osd 2016 Middleware Track
Page 133: Osd 2016 Middleware Track
Page 134: Osd 2016 Middleware Track
Page 135: Osd 2016 Middleware Track
Page 136: Osd 2016 Middleware Track

Fuse Brownfield

● Runtime:

○ Pure Java

○ Karaf

○ EAP

I ferri del mestiere

● Wiring:

○ Blueprint

○ CDI

○ Spring

Page 137: Osd 2016 Middleware Track

Fuse Greenfield

● Runtime:

○ Pure Java

○ Karaf

○ Spring Boot

I ferri del mestiere

● Wiring:

○ CDI

○ Spring

Page 138: Osd 2016 Middleware Track

Fuse e Openshift

● Fuse + Openshift = Fuse Integration Services

● Parte dell’offerta Red Hat xPaas

● Lavoro della community Fabric8

Camel Riding in the Cloud

Page 139: Osd 2016 Middleware Track

Fuse e Openshift

● Build then push:

○ Compilo usando il maven plugin di Fabric8

○ Push del risultato (Container Image + Metadata) in OCP

● Push then build:

○ Push del progetto su git

○ Source 2 image in OCP

Modalità di deployment

Page 140: Osd 2016 Middleware Track

Fuse e Openshift

● Soap2Rest:

○ CXF, Freemarker

○ Pure Java, CDI

○ S2I

Un caso concreto

Page 141: Osd 2016 Middleware Track

Fuse e OpenshiftCamel

Context

Page 142: Osd 2016 Middleware Track

Fuse e OpenshiftCamel

Context

Definizione Endpoint

Page 143: Osd 2016 Middleware Track

Fuse e OpenshiftCamel

Context

Definizione Endpoint

Rotta in Java DSL

Page 144: Osd 2016 Middleware Track

Fuse e Openshift

Camel DSL

Page 145: Osd 2016 Middleware Track

Fuse e Openshift

HystrixCircuit

Breaker

Page 146: Osd 2016 Middleware Track

Fuse e Openshift

Nome App

Puntamenti GIT

Page 147: Osd 2016 Middleware Track

DEMO CAMEL + OSE

Page 148: Osd 2016 Middleware Track

Virtuale

Cloud

Fisico

App tradizionali

Microservizi

Page 149: Osd 2016 Middleware Track

Red Hat xPaas

Application Server Pivotal tc Server, VMware vFabric, Oracle WebLogic Server, IBM WebSphere

JBoss EAPJBoss Web Server

In-memory data grid IBM WebSphere eXtreme Scale, Oracle Coherence, Pivotal GemFire, Software AG Terracotta JBoss Data Grid

Application integration IBM Integration Bus, Oracle SOA Suite and ESB, MuleSoft AnyPoint Platform, Sonic ESB, Tibco ActiveMatrix JBoss Fuse

Business rules and process automation

IBM Operational Decision Manager and BPM, Oracle SOA Suite and BPM Suite, Pega BPM, FICO Blaze Advisor

JBoss BRMSJBoss BPM Suite

Messaging IBM WebSphereMQ, Pivotal RabbitMQ, VMware vFabric, Tibco Enterprise Message Service JBoss A-MQ

Mobile IBM MobileFirst, SAP Mobile Platform, Kony Mobility Platform, Telerik Platform, AnyPresence Mobile Application Platform

Data virtualization and data services

IBM InfoSphere, Progress DataXtend SI, Composite Information Server, Denodo JBoss Data Virtualization

Page 150: Osd 2016 Middleware Track

Links

Microservices Playgroundbit.ly/msa-instructions

http://developers.redhat.com/downloads

Container Development KitRecorded Demo: https://youtu.be/SPATMHP-xw8

https://github.com/redhat-italy/osd-microservices-appsOSD Demo Applications

Page 151: Osd 2016 Middleware Track

API Management con 3ScaleNell’era dei Microservizi

Luca Bigotta

#redhatosd

Page 152: Osd 2016 Middleware Track

● Il 22 giugno Red Hat annuncia l’acquisizione di 3Scale

● Inizia la roadmap di evoluzione verso Open Source di 3Scale

● 3Scale complementa il portfolio middleware nella definizione delle “Strategia API" di Red Hat

BREAKING NEWS!!!

https://www.redhat.com/it/about/press-releases/red-hat-acquire-api-management-leader-3scale

Page 153: Osd 2016 Middleware Track

La Strategia API di Red Hat

Page 154: Osd 2016 Middleware Track

Un esempio del valore di 3Scale + Fuse insieme: Composizione API + Management API

Page 155: Osd 2016 Middleware Track

3scale è la soluzione API management più adottata nel mondo (750+ clienti)

L’architettura di 3Scale è stata progettata per garantire: 1. incomparabile Scalabilità e Alta affidabilità e Performance 2. Il minor time-to-value possibile 3. pricing competitivo sul mercato.

3Scale in breve ...

Component Technology

Front End Ruby on Rails

Gateway NGINX, Lua

Back End Ruby, Sinatra, Redis

Perchè 3Scale è sempre stata “interessante” per Red Hat? propensione all’Open Source: l’architettura è completamente basata

su componenti Open Source esiste da diversi anni una collaborazione fattiva tra 3Scale e Red Hat

3Scale e il Middleware Red Hat si complementano a vicenda Il Traffic manager di 3Scale è da diverso tempo disponibile in

Openshift

Page 156: Osd 2016 Middleware Track

Alcuni clienti 3Scale

Page 157: Osd 2016 Middleware Track

Mobile & supporto a IOT

Ecosistema dei clienti

Ecosistema dei partner

Agilità interna Monetizzazione delle API

Gestione canali multimediali e transazionali

Use Case di adozione di 3Scale

Page 158: Osd 2016 Middleware Track

Da applicazione monolitica a microservizi

applicazione monolitica microservizi

Page 159: Osd 2016 Middleware Track

API management: elemento essenziale nei Microservizi

API

APIAPI

APIAPI

API

API Management

Develop Deploy Scale Manage

Container Application Platform (PaaS)

Page 160: Osd 2016 Middleware Track

Use Case di adozione di 3Scale

Controllo Flessibilità e capacità di scalare

Visibilità

Page 161: Osd 2016 Middleware Track

Full Control delle API con 3Scale

Controllo

● Sicurezza● Gestione Chiavi

autenticazione● Limiti di traffico & SLA● Policy Enforcement● Gestione Apps & Users● Provisioning

Flessibilità/scalabilità

● Deployment distribuito● Multi-dipartimento● Multi-Ambiente● Estrema scalabilità● Multi-protocollo● Webhooks

Visibilità

● Analytics● Tracking Apps● User Tracking ● Alerts sull’ utilizzo● On-boarding● Supporto agli

Sviluppatori

Page 162: Osd 2016 Middleware Track

API Management: il ruolo di 3Scale

Page 163: Osd 2016 Middleware Track

Architettura modulare e flessibile● Modulare

○ Configurazioni, Analytics, Portale clienti/sviluppatori

○ Traffic Manager

● Nessun “single point of failure”

● Configurazioni in Cloud su Tenant dedicato

● Molteplici Scenari di deployment del Traffic Manager

○ Managed (Saas)

○ Self-managed:■ on-premise (fisico o virtuale)■ in OpenShift■ come libreria (gateway-less)■ come CDN (negli scenari di content delivery

management)

Page 164: Osd 2016 Middleware Track

a) Alta Affidabilità garantita: 99.999% uptime negli ultimi anni.

b) 100.000.000+ di chiamate ad API gestite ogni girono

c) Nessun single point of failure, architettura in HA e traffico bilanciato sui più nodi

d) Bassissima latenza aggiunta dal traffic manager: tra 20 ms and (at max) 50 ms

e) Ogni singolo nodo di traffic manager può gestire più di 10.000 calls per second

f) Architettura del traffic manager è scalabile, e configurabile in base alle esigenze

3Scale Traffic Manager: principali caratteristiche

Page 165: Osd 2016 Middleware Track

Sicurezza e Privacy

● Diverse modalità di autenticare la API previsti di default

● Flessibilità e possibilità di estendere il supporto ad altri meccanismi di autenticazione

● Privacy garantita sul contenuto del messaggio. 3Scale lavora al livello degli header

● PCI-DSS and HIPAA compliant

● ISO27001 and SOC3 compliant

Utilizzato per la verifica delle policy e aggiornamento delle statistiche

NON utilizzato

Page 166: Osd 2016 Middleware Track

3scale API Management principali caratteristiche: 1/5

Controllo degli accessi alle API flessibile e granulare

➢ API keys

➢ coppia App_ID e App_key

➢ Supporto allo standard de-facto:

OAuth v1.0 and 2.0

Page 167: Osd 2016 Middleware Track

3scale API Management principali caratteristiche: 2/5

Configurazione di contratti di livello di servizio

➢ Configurazione granulare dei livelli di

servizio per gruppi API consumer

➢ Configurazione di limiti flessibile

per-time-period

Page 168: Osd 2016 Middleware Track

3scale API Management principali caratteristiche: 3/5

Statistiche di utilizzo API

➢ Identificazione pattern di traffico

➢ Top API utilizzatori

➢ Alerts, creazione reporting ad hoc

Page 169: Osd 2016 Middleware Track

3scale API Management principali caratteristiche: 4/5

Documentazione delle interfacce automatica e interattiva

➢ Documentazione API Interattiva

➢ Swagger-based

➢ Self-service developer portal

Page 170: Osd 2016 Middleware Track

Portale degli sviluppatori & clienti/partner esperienza utente completamente personalizzabile

Page 171: Osd 2016 Middleware Track

3scale API Management principali caratteristiche: 5/5

Gestione granulare della monetizzazione delle API

➢ pricing model flessibile

➢ Fatturazione automatica

➢ Servizi di pagamento pre-integrati

Page 172: Osd 2016 Middleware Track

Monetizzazione delle API

Regole di pricing

• Pagamento One time & canone fisso mensile• Canone mensile variable (a consumo, pricing

dipendente dal volume)

Ciclo di fatturazion

e

• 2 opzioni (prepagato e postpagato)• Fatturazione mensile

Compliancy

• Nessun salvataggio di informazioni di carta di credito

Integration

• payments gateways pre-integrati

Page 173: Osd 2016 Middleware Track

3Scale Traffic Manager e Openshift

URL tenant 3Scale admin

Chiave autenticazione al tenant 3Scale admn

Nome traffic manager

Page 174: Osd 2016 Middleware Track

GRAZIE!

#redhatosd

Page 175: Osd 2016 Middleware Track

#redhatosd

Page 176: Osd 2016 Middleware Track

● Il 7 settembre Red Hat pubblica una customer reference che dimostra la validità delle “Strategia API” di Red Hat.

● Prima referenza full Red Hat

● Red Hat 3Scale + JBoss Fuse

BREAKING NEWS!!!

https://www.redhat.com/it/about/press-releases/flytoget-deploys-red-hat-jboss-fuse-and-3scale-api-management-technology-further-its-digital-ambitions

Page 177: Osd 2016 Middleware Track
Page 178: Osd 2016 Middleware Track
Page 179: Osd 2016 Middleware Track
Page 180: Osd 2016 Middleware Track
Page 181: Osd 2016 Middleware Track