3. Part 1
MOM intro.
I. why
II. what
III. when
MOM spec.
I. JMS
II. AMQP
III. STOMP
IV. XMPP
V. MQTT
4. MOM intro. - why
1970s single protocol connecting mainframe
5. MOM intro. - why
1980s many protocol connecting mainframe
6. MOM intro. - why
• not easy since data format , hardware etc.
• so adapter coms out, but still face many problems,
maintainable?
• so many technologies comes out , such as
RPC(COM/COM+,CORBA,EJB) – sync. call
Message Queue – Async. event notification
Also ,many Enterprise messaging killer coming, such
as WebSphere MQ, SonicMQ , TIBCO Rendezvous,
SUN JCAPS…
7. MOM intro. - what
Message-oriented middleware (MOM) is software or
hardware infrastructure supporting sending and
receiving messages between distributed systems. MOM
allows application modules to be distributed over
heterogeneous platforms and reduces the complexity of
developing applications that span multiple operating
systems and network protocols…
-- From Wikipedia
9. MOM intro. - when
Heterogeneous application integration
Decoupled between applications(No RPC)
Event-driven backbone(CEP)
10. MOM spec. - JMS
•JMS 1.1 released in in 2002 (JMS 1.0.2 spec. since
1998)
•JMS 2.0 launched in 2011 as JSR 343
•JMS 2.0 released in 2013 (with Java EE 7)
11. MOM spec - JMS
JMS client (MessageProducer, MessageConsumer ,
JMSConsumer , JMSProducer)
Non-JMS client (Instead of the JMS API , using JMS
provider’s native client API)
JMS producer
JMS consumer
JMS provider
JMS message
JMS domains
Administered objects(Connection factory,Destination)
35. MOM spec. - STOMP
STOMP 1.2 Released on 2012 10
STOMP 1.1
STOMP 1.0
In a way, It’s seems combing memcached protocol with
REST style operation(such as
send,subscribe,unsubscribe,begin,commit,abort,ack,n
ack,disconnect).
36. Part 2
MOM core tech.
I. Transport
II. Persistent
III. Transaction
IV. Integration
MOM advanced features
I. HA
II. Performance
III. Administering and monitoring
IV. Plugins
37. MOM core tech. - Transport
AMQ Transport configuration snippets
39. MOM core tech. - Transport
Hornetq Transport configuration snippets
40. MOM core tech. - Persistent
RDB store
Memory store
File store
Sequential disk access can in some cases be faster
than random memory access! – from ACM Queue
article
47. MOM core tech. - Transaction
2PC , 3PC or Paxos Why not choice?
Complex, Round Trip…
48. MOM Core Tech. - Transaction
Client DB
Broker DB
①
send
halfmessage
②Op
③
Commit/Rollback
①store half message
③, ⑤
commit: update message status
rollback:delete message
④
periodiccheck
uncommittedmessage
⑤Commit/Rollback
Local Tx
Local Tx
60. MOM advanced features- Performance
Performance differs greatly depending on
many different factors
the network topology
transport protocols used
quality of service
hardware, network, JVM and operating system
number of producers, number of consumers
distribution of messages across destinations along
with message size
So, No one is absolutely winner!
Benchmark testing(SPECjms2007) is a Galileo
thing !
68. MOM geomancy - ZMQ
C++ Networking library
ZMQ Pattern:
Request-reply, which connects a set of clients to a set of services.
This is a remote procedure call and task distribution pattern.
Publish-subscribe, which connects a set of publishers to a set of
subscribers. This is a data distribution pattern.
Pipeline, which connects nodes in a fan-out/fan-in pattern that can
have multiple steps and loops. This is a parallel task distribution
and collection pattern.
75. MOM geomancy - local features continue
But, if you biased towards jms,How to give your
views about jms ?
•Join and contribute to users@jms-spec.java.net
•Submit ideas to JMS spec issue tracker (or comment
on existing ideas)
•Contact nigel.deakin@oracle.com
•See jms-spec.java.net for details
81. MOM geomancy - References
•JMS Performance Comparison
•amqp-core-complete-v1.0-os.pdf
•HornetQ User Manual.pdf
•ActiveMQ In Action(Manning-2011).pdf
•Building a High Availability and Disaster Recovery Solution using AlwaysOn
Availability Groups.docx
•RocketMQ_design.pdf
•ZeroMQ: Messaging for Many Applications.pdf
•ZeroMQ.pdf