The future of middleware:
enterprise application
integration and Fuse
Giuseppe Brindisi
Agenda
● Build an enterprise application integration platform that is:
● Resilient
● Maintainable
● Flexible
What is EIP?
• Work by Hohpe / Woolf
• Became a de facto standard • speak the same language
• reuse of know how and solutions • Avoid custom code for integrations
Enterprise Integration Patterns
What's JBOSS Fuse?
• An integration Middleware built on:
• JBoss AMQ (ActiveMQ) for messaging • Camel for mediations (routes)
• CXF for Web Services
• Fabric for governance (registry, provisioning)
What is OSGI?
• A standard for a “Modular” Java
• how to “pack” code in a bundle (jar)
• OSGi bundles can be remotely installed, started, stopped, paused, updated and more (Lifecycle Management)
• OSGi = SOA in a JVM
• First version in 2000, coming from the telco world.
What is Camel?
• Framework Open source implementing EIP patterns
• mapping 1:1 between pattern and components
• camel routes managed through OSGI • OSGI Container
What is ZooKeeper?
• Part of the Hadoop ecosystem
• Used to build coordination logics
• Sharding, Failover, Discovery, Master election, ecc.
MAVEN
• Maven is the “de facto” standard in Java dependency management
• Nexus (Artifactory) is a centralized Maven repo that makes “Devops” easy
• controls dependencies
• a server contains each and every project artifact
What is KARAF?
• Lightweight container for OSGI
• Hot deploy, logging, shell, configuration, provisioning services
What is ACTIVE-MQ?
• Open Source Messaging Broker
• JMS, AMQP, MQTT, OpenWire, STOMP, REST • Java, C, C++, C#, Ruby, Perl, Python, PHP
• Pluggable Transport
What is CXF?
• De facto open source standard for Web Services
• Used in JBoss too • WS-*, REST support • …
What is Fabric?
• Allocate Resources, Install & Connect containers in your environment
• Publish Services, Discover & Coordinate • Manage
• Provision • Visualize
• Scale Up / Down • and much more…
What is Fabric?
• Introduced with Fuse technology • But now an independent project
• http://fabric8.io
• It is now (will be) cross product (Fuse, EAP, Openshift, ecc.)
What is Fabric?
• Provisioning• configurations, scripts, code (aggregated in profiles)
• On every kind of container
• Karaf, Wildfly, Tomcat, plain JVMs • Everywhere
• Openshift, Docker, any public/private IAAS, bare metal, hybrid.
The Console: command line console
• Fuse Command Line console• SSH based
• Total local and remote control of the system • Scriptable
Performance - CAMEL
• Camel is a Java technology and doesn’t introduce any overhead
• Performance depends by the Camel components used
• provided components has usually been finely tuned and tested in hundreds of customers
• Camel code is probably much faster than your code ;)
Performance - ActiveMQ
• AMQ persistence File system based
• LevelDB, a nosql developed by Google
• O(1) to load stored messages thanks to the BTree Google algorithm
• 3 or 30.000.000 persistent messages instantaneously “loaded” by a broker.
Performance - ActiveMQ
• LevelDB has excellent write performance
• Disk speed is the single most important factor.
• About 10k msg/sec (5kb) of sustained traffic on a modern laptop with an SSD
• About 4.5k msg/sec (5kb) of sustained traffic on Amazon server (9k msg/sec using both disks)
High Availability and Scalability
• AMQ can be configured in Master - Slave • 1 Slave per 1 Master
• N Slaves per M Masters (example: 2 Slaves per 10 Masters)
• AMQ can scale horizontally with different topologies:
• Network of Brokers
• Client side partitioning HA
Conclusions
• Resiliency• Distributed Architecture • Failover
• Master/Slave for High Availability
• Horizontal Scalability: Network of Brokers, Client side partitioning
• Maintainability
• OSGI based, standardized software component lifecycle (with versioning)
• Powerful admin console • Performance
Links to useful resources
• Fabric • Container • OSGI
• Route (Camel) • Provisioning • Versioning • Maven/Nexus • GIT • Queue • REST/WS • Zookeeper • Profiles • Bundle • OSGI
• EIP, Enterprise
Integration Patterns • Aggregator • Splitter • CBR • Enrichment • Multicast • Wiretap
Links to useful resources
Karaf
http://karaf.apache.org Fabric8
http://fabric8.io
JBoss FUSE 6.1 EA builds https://repository.jboss.org/ne xus/content/repositories/ea/or g/jboss/fuse/jboss-fuse-full/ Red Hat Supported!
https://www.jboss.org/product s/fuse.html Active MQ http://activemq.apache.org Camel https://camel.apache.org CXF http://cxf.apache.org ZooKeeper http://zookeeper.apache.org
Ask questons or rate the Speaker
Software Development Process
• Integration requisite
• If tag A contained in Message M has in
corresponding record in table B the X field • Trasform M (remove t1 tag, add X tag) • Add tag t3 to Message M in any case
Software Development Process
“Translation” in Enterprise Integration Patterns
Software Development Process
• Transform EIP in code • using a DSL in Java • using a DSL in XML
Software Development Process
• Bundle in an OSGI component
• mvn install
• Push on Maven/Nexus repo
Software Development Process
• With CLI console or Web Console, and following Roll-out company plan, pull the bundle from the repository
• Selected containers will download and start automatically the bundle
Software Development Process
• “Canonical” process is:• create a new route implementing business • pack the route in a bundle and “assign” to a
new version of a profile
• upgrade one of more containers to this profile to check everything is ok
Software Development Process
• “DEFCON 2” process:• Open the web console on a production server