Next Generation Open Source Messaging with Apache Apollo
Transcript of Next Generation Open Source Messaging with Apache Apollo
![Page 1: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/1.jpg)
1
Next Generation Open Source Messaging with
Apache Apollo
Hiram ChirinoRed Hat EngineerBlog: http://hiramchirino.com/blog/Twitter: @hiramchirinoGitHub: https://github.com/chirino
Tuesday, February 26, 13
![Page 2: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/2.jpg)
2
About me
Hiram ChirinoBlog: http://hiramchirino.com/blog/Twitter: @hiramchirinoGitHub: https://github.com/chirino
Engineer at Red Hat Apache Committer on: ActiveMQ, Camel,
Karaf, ServiceMix, Geronimo, Felix, and Aries Apache Member and ActiveMQ PMC Chair Co-Founder of many other OS projects:
• HawtDispatch, Scalate, LevelDBJNI, Jansi, And many more!
Tuesday, February 26, 13
![Page 3: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/3.jpg)
3
Outline
What is Apache Apollo?
What makes it different?
What’s the trajectory?
Tuesday, February 26, 13
![Page 4: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/4.jpg)
4
What is Apache Apollo?
Messaging Server:•Queues •Topics•Transactions•Reliable Messaging
Tuesday, February 26, 13
![Page 5: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/5.jpg)
5
Queues: Point-to-Point
Tuesday, February 26, 13
![Page 6: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/6.jpg)
5
Queues: Point-to-Point
Tuesday, February 26, 13
![Page 7: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/7.jpg)
5
Queues: Point-to-Point
Tuesday, February 26, 13
![Page 8: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/8.jpg)
5
Queues: Point-to-Point
Tuesday, February 26, 13
![Page 9: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/9.jpg)
6
Topics: Publish/Subscribe
Tuesday, February 26, 13
![Page 10: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/10.jpg)
6
Topics: Publish/Subscribe
Tuesday, February 26, 13
![Page 11: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/11.jpg)
6
Topics: Publish/Subscribe
Tuesday, February 26, 13
![Page 12: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/12.jpg)
6
Topics: Publish/Subscribe
Tuesday, February 26, 13
![Page 13: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/13.jpg)
7
But your happy /w ActiveMQ?
ActiveMQ will be supported for many more years to come!
It will be a long time before Apollo: Supplies all of ActiveMQ’s featuresProvides migration tools
Apollo bits are being back ported
Yay! Stick with it!
Tuesday, February 26, 13
![Page 14: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/14.jpg)
8
Why use Apollo?
Lower CPU overheadA reduced memory footprintRuntime configuration reloadingREST based management APISimpler Configuration Options
Do you want:
Tuesday, February 26, 13
![Page 15: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/15.jpg)
9
Plugin Architecture
Apollo Broker
LevelDB
HawtDispatch
AMQP
Protocols
TransportsTCP/SSL
WebSocket/WSS
BDB
Openwire
MQTT
Storage
STOMP
Tuesday, February 26, 13
![Page 16: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/16.jpg)
10
Transports
•TCP•SSL •WebSockets•Secure WebSockets•UDP
Tuesday, February 26, 13
![Page 17: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/17.jpg)
11
Protocols
•STOMP 1.0/1.1/1.2•MQTT v3.1•AMQP 1.0•Openwire
Tuesday, February 26, 13
![Page 18: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/18.jpg)
12
Protocol: STOMP
http://stomp.github.com/Simple Text Orientated Messaging Protocol
Uses Text Headers like HTTPMany Clients APIs in Java, C#, C,
Ruby, Python, JS, PHP, etc.Interoperates with ActiveMQ,
RabbitMQ, HornetQ, …
Tuesday, February 26, 13
![Page 19: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/19.jpg)
13
Protocol: MQTTGet at https://github.com/fusesource/fuse-
extra/Focused on:
Pub/SubUnreliable, low bandwidth networksSmall footprint / Embedded Devices
Interoperates with WebsphereMQ, Mosquitto, …
Tuesday, February 26, 13
![Page 20: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/20.jpg)
14
Protocol: AMQP 1.0AMQP is a binary wire protocol which was
designed for interoperability between different vendors.
Supports Queue and Topic semantics.Many native client libraries are available.
Interoperates with ActiveMQ, Qpid, SwitfMQ...
Tuesday, February 26, 13
![Page 21: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/21.jpg)
15
Protocol: OpenwireOpenwire is the native binary
protocol implemented by ActiveMQ
API options: JMS 1.1 Client of ActiveMQ 5.xNMS Client for C# AppsCMS Client for C++ Apps
Not Yet SupportedXA Transactions (distributed transactions)
Tuesday, February 26, 13
![Page 22: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/22.jpg)
16
Message StoresAre PluginsShips with 2 Options
•LevelDB Store•BDB Store
Used to store•persistent messages•non-persistent messages that needs to
be swapped out of memory
Also used to swap out non-persistent messages.
Tuesday, February 26, 13
![Page 23: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/23.jpg)
17
LevelDB Store
A Journal + LevelDB based indexThe pure ASL 2.0 licensed optionUses a JNI implementation on Linux and OS X
Fastest Store availableOn all other platforms a pure Java
implementation is usedNot used as much as the JNI version
LevelDB indexes are awesome for sequential r/w access patterns
Tuesday, February 26, 13
![Page 24: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/24.jpg)
18
BDB Store
Not ASL 2.0! You have to Agree to the BDB license & download from Oracle.
Pure Java implementationVery robust.
Tuesday, February 26, 13
![Page 25: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/25.jpg)
19
What makes Apollo Different?
Tuesday, February 26, 13
![Page 26: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/26.jpg)
20
HawtDispatch
•Event Processing System•Multithreaded Reactor Model•Fixed size Thread Pool /w NIO
event support
Tuesday, February 26, 13
![Page 27: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/27.jpg)
21
Dispatch Queues
Global Dispatch QueueConcurrently executes Runnable objectsOnly 1 in the system
Serial Dispatch QueueSerially executes Runnable objects Use CAS operations
Thread
Thread
Global Queue:
Serial Queue:
Tuesday, February 26, 13
![Page 28: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/28.jpg)
22
Serial Dispatch Queues
= Client Connection
Tuesday, February 26, 13
![Page 29: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/29.jpg)
23
Low Thread Contention...
1 -> 1 -> 1 5 -> 1 -> 5 10 -> 1 -> 10
Tuesday, February 26, 13
![Page 30: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/30.jpg)
24
Low Memory Overhead... 1000 Producer Connections 1000 Topics 5000 Consumer
Connections
Tuesday, February 26, 13
![Page 31: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/31.jpg)
25
Why is Apollo using Scala?Java API example:
Same thing in the Scala API:
Terse closures FTW!
queue.execute(new Runnable(){ public void run() { System.out.println("Hi!"); }});
queue { System.out.println("Hi!");}
Tuesday, February 26, 13
![Page 32: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/32.jpg)
26
Per Consumer Store Prefetch
Tuesday, February 26, 13
![Page 33: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/33.jpg)
27
Per Consumer Store Prefetch
Tuesday, February 26, 13
![Page 34: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/34.jpg)
28
Source:http://hiramchirino.com/stomp-benchmark/ubuntu-2600k/index.html
Per Consumer Store Prefetch
Tuesday, February 26, 13
![Page 35: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/35.jpg)
29
Message Store: Store and Dispatch
Queue
Disk
Producer Consumer
Message Store
Tuesday, February 26, 13
![Page 36: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/36.jpg)
29
Message Store: Store and Dispatch
Queue
Disk
Producer Consumer
Message Store
Tuesday, February 26, 13
![Page 37: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/37.jpg)
29
Message Store: Store and Dispatch
Queue
Disk
Producer Consumer
Message Store
Tuesday, February 26, 13
![Page 38: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/38.jpg)
30
Message Store: Store with No Delay
Queue
Disk
Producer Consumer
Message Store
Tuesday, February 26, 13
![Page 39: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/39.jpg)
30
Message Store: Store with No Delay
Queue
Disk
Producer Consumer
Message Store
ACK
Tuesday, February 26, 13
![Page 40: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/40.jpg)
30
Message Store: Store with No Delay
Queue
Disk
Producer Consumer
Message Store
ACK
Tuesday, February 26, 13
![Page 41: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/41.jpg)
30
Message Store: Store with No Delay
Queue
Disk
Producer Consumer
Message Store
ACK ACK
Tuesday, February 26, 13
![Page 42: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/42.jpg)
30
Message Store: Store with No Delay
Queue
Disk
Producer Consumer
Message Store
ACK
REMOVE
Tuesday, February 26, 13
![Page 43: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/43.jpg)
30
Message Store: Store with No Delay
Queue
Disk
Producer Consumer
Message Store
ACK
Tuesday, February 26, 13
![Page 44: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/44.jpg)
31
Message Store: Store with Delay
Queue
Disk
Producer Consumer
Message Store
Tuesday, February 26, 13
![Page 45: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/45.jpg)
31
Message Store: Store with Delay
Queue
Disk
Producer Consumer
Message Store
Tuesday, February 26, 13
![Page 46: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/46.jpg)
31
Message Store: Store with Delay
Queue
Disk
Producer Consumer
Message Store
ACK
Tuesday, February 26, 13
![Page 47: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/47.jpg)
31
Message Store: Store with Delay
Queue
Disk
Producer Consumer
Message Store
ACK
REMOVE
Tuesday, February 26, 13
![Page 48: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/48.jpg)
31
Message Store: Store with Delay
Queue
Disk
Producer Consumer
Message Store
ACK
Tuesday, February 26, 13
![Page 49: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/49.jpg)
31
Message Store: Store with Delay
Queue
Disk
Producer Consumer
Message Store
ACK
Tuesday, February 26, 13
![Page 50: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/50.jpg)
32
Forget Virtual Destinations!
•Durable subscriptions are implemented with queues.
•Used a mirrored queue to send a copy to the topic with the same name.
Tuesday, February 26, 13
![Page 51: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/51.jpg)
33 Copyright © 2011 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. A Progress Software Company
FuseSource Confidential
29
Apollo’s Trajectory
Tuesday, February 26, 13
![Page 52: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/52.jpg)
34
Features! Features! Features!Back PortedApollo FeaturesLevelDB StoreMQTT ProtocolSTOMP 1.1 Support
Road MapFeatures
Networks of BrokersPriority SupportMessage SchedulingXA TransactionsJMX Management API
Pending Back PortStore Delays
Tuesday, February 26, 13
![Page 53: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/53.jpg)
35
Release Velocity
1.0 Beta 104/11
1.0 Beta 205/11
1.0 Beta 306/11
1.0 Beta 406/11
1.0 Beta 509/11
1.0 Beta 612/11
1.0 2/12
1.1 3/12
1.2 4/12
03/11 01/12 05/12
1.3 5/12
1.49/12
1.5 11/12
1.6 02/13
01/13
Tuesday, February 26, 13
![Page 54: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/54.jpg)
36
DEMO
Tuesday, February 26, 13
![Page 55: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/55.jpg)
37 Copyright © 2011 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. A Progress Software Company
FuseSource Confidential
32
Questions?
Tuesday, February 26, 13
![Page 56: Next Generation Open Source Messaging with Apache Apollo](https://reader036.fdocuments.us/reader036/viewer/2022071600/613d1641736caf36b7592806/html5/thumbnails/56.jpg)
38
The Link BonanzaApache Apollo
http://activemq.apache.org/apollo/STOMP Benchmarks
http://hiramchirino.com/stomp-benchmark/MQTT Protocol Plugin for Apollo
https://github.com/fusesource/fuse-extraHawtDispatch
http://hawtdispatch.fusesource.org/StompJMS
https://github.com/fusesource/stompjms
Tuesday, February 26, 13