SOA SOA oder so ESB für Querdenker Produktlinien-Design mit ESB Peter Klotz Chief Architekt blue elephant systems GmbH (peter.klotz@blue-elephant-systems.com)
Agenda SOA & ESB Apache Servicemix & JBI ESB-Architektur & Mechanismen Design-Beispiele Erfahrungen im Produkt-Einsatz Fragen
SOA Aufbau von Applikationen aus Services Interaktion über Protokolle statt Methoden (XML, SOAP, MOM) Schnittstellen Metadata (WSDL) Service Orchestrierung Loose Coupling SOA ist ein Architektur-Prinzip ESB als SOA Infrastruktur/Implementierung
Integration Information Integration Projekte Integration Technology Integration Produkte
Main und andere Ströme Spring Main Stream POJO REST J2EE SOAP JBI ESB OSGi
Enterprise Service Bus Invocation: Synchrone and asynchrone Transport Protokolle Service Mapping (locating and binding) Routing: Addressierung, statisches/deterministisches, Content-based, Rules-based, Policy-based Routing Mediation: Adaptoren, Protokoll Transformation, Service Mapping Messaging: Message Processing, Message Transformation und Enhancement Process Choreography: Komplexe Business Prozesse Service Orchestration: Complex Event Processing: Event Interpretation, Korrelation, Pattern-Matching Quality of Service: Management: Koordination mehrerer Implementation-Services als ein einziger aggregierter Service Security (Encryption und Signing), Zuverlässiger Transport, Transaction Management Monitoring, Auditing, Logging, Metering, BAM
ESB Implementierungen Open-Source Servicemix (www.servicemix.org) OpenESB (open-esb.dev.java.net) Mule (mule.mulesource.org) JBoss ESB... Kommerziell BEA AquaLogic Oracle ESB...
Java Business Integration JBI (JSR-208) Normalized Message Router (NMR) Binding Component und Service Engine Container of Containers HTTP SOAP Email FTP JMS B CE P B CE P B CE P N M R Container z.b. Spring EP SE EP SE ESB Platform
JBI Deployment SU = Service Unit SA= Service Assembly SA SU1 SU2 SU3 SU4 SU Bean Bean Bean Bean LWC wrapper Deploy JBI Container SU1 SU2 JBI Komponenten LW C Servicemix: Spring Container SU3 EIP SU4 HTTP Zukunft: OSGi Bundles Keine SUZersplitterung
Message Exchange Patterns JBI Message Exchange Patterns (MEP) In-Out In-Only Robust-In-Only In-Optional-Out Binding Components definieren MEP Fehler-anfällig insb. In-Out async done() vergessen
Messaging Payload: XML Attachments (MIME-Messages) Standardisierte Formate (z.b. WS-Notification) Addressierung Protokoll-Header z.b. SOAP-Action, Properties, WS-A Request/Response Envelope Protokoll-Envelope (e.g. SOAP) Request/ResponseEnvelope Payload
ESB-Verteilung Node 1 RDBMS Node 2 ESB Instanz BC BC Kopplung BC Via NMR z.b. JMS-Flow Via Binding Components & Routing ESB Instanz XMLDB Node 3 BC ESB Instanz FS
Extern vs. Intern ESB EP B EP C ESB EP EP Web Service HTTP oder SOAP Web Applikation Adaptor Externes System z.b. Legacy
Deployment vs. CIs Service Assembly Deploy ESB Platform SA SU Deployment Configuration SU SU Service Unit Änderung Änderung SA SU SU ESB Platform Configuration DB SU Layer Configuration File
Realtime & Polling Realtime MOM Lokale Files oder FTP Polling und Writer WS File Poller SOAP HTTP B C B C B C ESB SE B C WA File Writer
ESB & Web Container Klassisch: ESB in Web Container z.b. JBoss Anders: Web Container in ESB z.b. Jetty in SM Web Container ESB ESB Web Container
Web Services & ESB SOAP Binding Component WSDL Generierung ESB als WS vs. einzelne Komponenten als WS SOAP BC Routing Authentication Authorization Adaptor Adaptor Komponente WSDL
Orchestrierung/Routing Orchestration describes the automated arrangement, coordination, and management of complex computer systems, middleware, and services. Statisch Java-Code Scripting (Groovy) Enterprise Integration Patterns (EIP) (Servicemix EIP, Apache Camel) Rules (Drools) Business Prozesse (BPM)
Routing Statisch: Routing an Komponenten EIP: Nur Routing BPEL: Routing + Daten Transformation EIP SU Components Service Camel SU BC SU Helper SU
Enterprise Integration Patterns http://www.enterpriseintegrationpatterns.com/ Achtung: einige nur In-Out oder nur In-Only Vorsicht beim Einsatz mancher Patterns z.b. Content Enricher Content-based Router Content Enricher Message Filter Transformer Recipient List Splitter/Aggregator Routing Slip Wire Tap
Beispiel: Wire Tap HauptPipeline In-Out Service Requests/Responses (In-Only) Custom SU File Writer Audit Request Logs Dead End
Authentifizierung Client-Authentifizierung nicht NUR für GUIs! Nutzung der ESB-Mechanismen Single Sign-On Frameworks versagen ESB XML Request auth Routing EP LDAP EP PA M proprietär EP
Programming in the Large Programm = Adaptors + Routing UNIX-Prinzip: 1 Tool pro Zweck Beispiel: Compare/Diff mit EIP Content='' Resolver Content!='' Transformer Objectclass is group Objectclass is primitive Differ
Beispiel II Beispiel: Indexing mit EIP Mass-Indexing (In-Out) Content='' Content!='' Resolver Transformer A Transformer B Delta-Indexing (In-Only) Indexer
Scripting Script-Komponenten Compilierung bei Deployment Spring Script Support z.b. auto script reload Scripts als ESB-Client Scripting für Routing Groovy: XML Slurper, Builder, GPath JSR-223: JRuby, JavaScript Issues: Deployment Cycle, Debugging
BPM & ESB Reines WS-BPEL: Web Service Orchestrierung Standardisiert (vs. EIP) BPEL Editoren (BPMN) ESB-basiertes BPM: Orchestrierung ohne Einschränkungen Web Service SOAP Business Process SOAP Web Service Legacy
BPM mit ESB Web Service Business Prozess PL PL ODE SU Spring Service Web Service PL Legacy ftp, http, file,...
Sync & Async Kernsystem: In-Out Synchron Custom-Orchestrierung: WS-BPEL Asynchron In-Only/ Robust-In-Only Orchestrierung Async Prozess System Sync Request/Response System In-Out oder In-Only EP Adaptor Sollte alle MEP handeln
Skalierbarkeit Große XML Dokumente vermeiden Streaming (Stax, kein DOM) Software-Loadbalancing z.b. mehrere Jetty-SUs, mehrfache Pipelines Prozeß-Split Pipeline Server Compute Server Daemon-Wrapper für Auto-Restart
Multi-Instanz-Installation JMS NMR Servicemix Instanz 1 Servicemix Instanz 2 1 Installation Per-Instanz Konfiguration Shared Konfiguration Servicemix Instanz 3
Produkt mit ESB Additive Service-Assemblies (Core + Produkt, Backend + Webapp) benowa, wanobe SAs Installer deployed Service-Assemblies Webapp (WA) Backend (BE) Produkt Y WA Y SA BE Y SA WA X SA BE X SA WA Core SA Produkt X BE Core SA
Fazit Geniale Modularisierung Lausige Kopplung Obacht auf Performance und Memory Komplexität
Fragen Fragen?