Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum...
Transcript of Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum...
![Page 1: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/1.jpg)
Wasser in der Wüste
Vom custom-madeSQL-DB-Messaging Anti-Pattern
zum JMS-Standard mit Apache Camel
Niko Köbler
DOAG, 20.11.2012
![Page 2: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/2.jpg)
Niko Köbler• Freiberuflicher Berater/Architekt
• IT seit 1999
w: www.n-k.de
nikokoebler.blogspot.com
t: @dasniko
Wasser in der Wüste, Niko Köbler 2
![Page 3: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/3.jpg)
Herausforderung
Wasser in der Wüste, Niko Köbler 3
Oracle DB
IBM AS/400
DB/400
PL/SQL
JEE Container
JDBC
File
File
SQL
JDBC
![Page 4: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/4.jpg)
Der Weg I• IBM Websphere MQ ???
• Oracle SOA-Suite ???
• JMS!
• Lose Kopplung
• Asynchrone Übertragung
• Queues (point-to-point)vs.Topics (publish-subscribe)
Wasser in der Wüste, Niko Köbler 4
NO!
![Page 5: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/5.jpg)
Oracle AQ• JMS-Provider „built-in“
• Seit Version 9i Release 2 „Advanced Queuing“
• Auch in XE!
• Robust, stabil, etabliert
• Datenbanktabellen / -user
• Nutzbar über PL/SQL-Packages oder JMS-Adapter
• Kein weiteres System notwendig
Wasser in der Wüste, Niko Köbler 5
![Page 6: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/6.jpg)
Der Weg II• Spring Integration
• Mule ESB / Mule Integration
• Apache Camel
Wasser in der Wüste, Niko Köbler 6
![Page 7: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/7.jpg)
Was ist Apache Camel?„Apache Camel is messaging technology glue with routing. It
joins together messaging start and end points allowing the
transference of messages from different sources to different
destinations.“
„It‘s a complete production-ready framework for people who
want to implement their solotuion to follow the EIPs.“
Quelle: http://stackoverflow.com/questions/8845186/what-exactly-is-apache-camel
Wasser in der Wüste, Niko Köbler 7
![Page 8: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/8.jpg)
Apache Camel• EIP Open Source Framework
• leichtgewichtig
• Implementiert in Java
• Routing / Mediation / Transformation
• DSLs: Java, XML, Scala
• Pipes&Filters, Bean Binding
• Testbar (Unit-Tests)
• Apache Projekte, die Camel verwenden:o ServiceMix
o ActiveMQ
o …
Wasser in der Wüste, Niko Köbler 8
![Page 9: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/9.jpg)
Apache Camel – 10.000m
Wasser in der Wüste, Niko Köbler 9
![Page 10: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/10.jpg)
Camel Beispiel - Java
Wasser in der Wüste, Niko Köbler 10
![Page 11: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/11.jpg)
Camel Beispiel - XML
Wasser in der Wüste, Niko Köbler 11
![Page 12: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/12.jpg)
Apache Camel Components• GAuth, GMail, …
• HBase
• HDFS
• HTTP
• iBatis
• IRC
• JDBC
• JMS
• JMX
• JPA
Wasser in der Wüste, Niko Köbler 12
• Atom
• Amazon WS
• Bean / Bean Validation
• Crypto
• CXF (SOAP)
• Direct, Seda, Mock
• EJB
• File
• Freemarker
• FTP
![Page 13: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/13.jpg)
Apache Camel Components• RSS
• Solr
• SpringBatch, -Integration
• SQL
• SSH
• StAX
• TCP
• XQuery
• XSLT
Wasser in der Wüste, Niko Köbler 13
• JT400
• LDAP
• Log
• Lucene
• Mail (IMAP, POP3, SMTP)
• MongoDB
• Nagios
• Printer
• REST
• RMI
![Page 14: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/14.jpg)
Enterprise Integration Patterns• Gregor Hohpe & Bobby Woolf
• Designing, Building and Deploying Messaging Solutions
• 65 Patternso (einfache) Lösungen und Ansätze für verschiedene bzw. alle Integrations-Werkzeuge
o „Gemeinsame Sprache“ und visuelle Notation
• If you are involved with the operation or development
of an enterprise application, there will doubtless come
a time when you will need to integrate your application
with another using the emerging preferred approach
of messaging. When that time comes, this book will
be your most valuable reference.
(Randy Stafford, Oracle)
Wasser in der Wüste, Niko Köbler 14
![Page 15: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/15.jpg)
Ziel-Architektur
Wasser in der Wüste, Niko Köbler 15
Oracle DB
IBM AS/400
DB/400
PL/SQL
JT400DTAQ
JEE Container
AQ
Apache CamelJMS
JMS
JMS
JDBC
SQL
JPA
![Page 16: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/16.jpg)
Ziel-Routing
Wasser in der Wüste, Niko Köbler 16
Route1 Route2
Route3
Route4
Transformation, Unmarshalling,
SplittingEndpoint-Input
Content-Based-Routing
XML-Marshalling JMS-Queue
Entity-Transformation
Persistenz
![Page 17: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/17.jpg)
Demo
![Page 18: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/18.jpg)
Q&A
![Page 19: Wasser in der Wüste · Wasser in der Wüste Vom custom-made SQL-DB-Messaging Anti-Pattern zum JMS-Standard mit Apache Camel Niko Köbler DOAG, 20.11.2012](https://reader030.fdocuments.in/reader030/viewer/2022040320/5e4afd88099cf57911703b3a/html5/thumbnails/19.jpg)
Links• Oracle AQ:
http://en.wikipedia.org/wiki/Oracle_Advanced_Queuing
• JMS: http://de.wikipedia.org/wiki/Java_Message_Service
• Apache Camel: http://camel.apache.org
• Spring Integration:http://www.springsource.org/spring-integration
• Mule ESB: http://www.mulesoft.org
• EAI Patterns: http://www.eaipatterns.com
• JT400: http://jt400.sourceforge.net
Wasser in der Wüste, Niko Köbler 19