Confoo 2014 Messaging Systems
-
Upload
hanneli-tavante -
Category
Technology
-
view
344 -
download
0
description
Transcript of Confoo 2014 Messaging Systems
![Page 1: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/1.jpg)
MESSAGING SYSTEMS
WHY SHOULD I USE THEM?
http://slidesha.re/1dwZ1eS
![Page 2: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/2.jpg)
!
• @hannelita
• Software Developer
• Coffee and Pokémon Addicted
Hanneli
Hi!
http://slidesha.re/1dwZ1eS
![Page 3: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/3.jpg)
What we will see
• How can we integrate 2 or more systems?
• A list of alternatives to integrate them
• Problems and good points of these strategies
• Messaging systems - the good parts
• Messaging systems - the bad points
• Cool pictures, stupid jokes and funny gifs
(or not that funny)http://slidesha.re/1dwZ1eS
![Page 4: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/4.jpg)
Software development - very simple
http://slidesha.re/1dwZ1eS
![Page 5: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/5.jpg)
Simple software development
Web!
![Page 6: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/6.jpg)
1. Number of users increases
![Page 7: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/7.jpg)
2. Number of requested functionalities increases
![Page 8: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/8.jpg)
How can we expand the system?
![Page 9: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/9.jpg)
How can we integrate?
Hi!@&ˆ!@!
???????
![Page 10: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/10.jpg)
How can we integrate?
The systems need to change information.
![Page 11: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/11.jpg)
Method 1
Hi!
![Page 12: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/12.jpg)
Method 1 - TXT
![Page 13: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/13.jpg)
Method 1 - TXT
• How should I format the TXT file?
• Parse == Hell
• Speed (development and execution)
![Page 14: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/14.jpg)
Method 1 - TXT
![Page 15: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/15.jpg)
Method 1I
Hi!
ESB
Hello!
![Page 16: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/16.jpg)
Method 1I - ESB
![Page 17: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/17.jpg)
Method 1I - ESB
• SOA Expertise
• High skill set
• $$$$$ in some cases.
![Page 18: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/18.jpg)
Method I1 - ESB
![Page 19: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/19.jpg)
One example
Support Company
![Page 20: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/20.jpg)
Example
PLZ FIX MY SYSTEM.
Sure! I will contact IT department.
Sales Guy
![Page 21: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/21.jpg)
Example
Heeeyy IT guy! Yo!We have work to
do!
![Page 22: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/22.jpg)
Example
Have you seen the hockey game yesterday?
YEEESS AWESOME!
![Page 23: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/23.jpg)
bla bla bla bla bla bla
![Page 24: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/24.jpg)
Example
bla bla bla
bla bla bla
![Page 25: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/25.jpg)
Example
Synchronous communication
![Page 26: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/26.jpg)
Example
Have you seen the hockey game yesterday?
YEEESS AWESOME!
![Page 27: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/27.jpg)
Example
The SHALL NOT directly communicate.
![Page 28: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/28.jpg)
Example
Client 1 Request 1
![Page 29: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/29.jpg)
Example
Now they won’t directly communicate!
![Page 30: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/30.jpg)
Example
Asynchronous Communication
They don’t waste time!
![Page 31: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/31.jpg)
Example
![Page 32: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/32.jpg)
![Page 33: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/33.jpg)
Some problems
![Page 34: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/34.jpg)
![Page 35: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/35.jpg)
Some Problems
![Page 36: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/36.jpg)
Message Transmission
Asynchronous communication
No direct communication
There’s a ‘keeper' for the message board
M essageOrientedM iddleware
![Page 37: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/37.jpg)
Message Transmission
Destination
Message
Sender ReceiverBroker
![Page 38: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/38.jpg)
More Technical
Sender ReceiverBroker
![Page 39: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/39.jpg)
Java World
M essageOrientedM iddleware
J avaMessageS ervice
Specification(PDF)
ActiveMQHornetQ
Oracle AQ
Some implementations
![Page 40: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/40.jpg)
Implementations
HornetQ
ActiveMQ
- Work with different languages
(interoperability)
- Security (Cryptography)
- Message delivery guarantee (Reliability)
PROTOCOL
A vancedM essageQ ueuingP rotocol
![Page 41: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/41.jpg)
Implementations
HornetQ
ActiveMQ
- Work with different languages
(interoperability)
- Similar to HTTP
- Text
PROTOCOL
S treamingTextO rientedM essageP rotocol
![Page 42: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/42.jpg)
Implementations
ØMQ{- Multiple Languages
- Concurrency
- Transports messages between protocols
- Multicast
- Written in C++
- Performance
- Hard to configure
![Page 43: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/43.jpg)
Implementatiosn
Sidekiq{ - Ruby
- Rails
- Redis
- Performance
![Page 44: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/44.jpg)
Implementations
Kafka{- Performance
- Scalability
- Messages persisted on disk and replicated on
cluster
- Environment had to configure
![Page 45: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/45.jpg)
Implementations
ActiveMQ{- Performance
- Java
- ESBs
![Page 46: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/46.jpg)
When I should use messaging systems
Asynchronous communication
- Email{ - Reports
- Long running operations in batch
![Page 47: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/47.jpg)
When I should NOT use messaging systems
Synchronous communication
- Requires immediate response{ - Cannot provide
information about the destination
![Page 48: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/48.jpg)
MOAR Examples
Imagine a system:
Sends Emails
CRUD Generates Daily Reports
Captures and log eventsJMS
JMS
JMS
![Page 49: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/49.jpg)
Before Messaging Systems
doSomething();
doMOAR();
sadsdsda();
return();
Synchronous communicationWhat happens if
it takes too long?
![Page 50: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/50.jpg)
Queue
Consumer
After Messaging Systems
return();
Asynchronous communication
sendMessageToQueue();
doSomething();
doMOAR();
sadsdsda();
All done for this message!
![Page 51: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/51.jpg)
Where to go now
Enterprise Integration Patterns
Apache Camel
JMS
![Page 53: Confoo 2014 Messaging Systems](https://reader034.fdocuments.net/reader034/viewer/2022051400/54c3aadd4a7959ca568b459c/html5/thumbnails/53.jpg)
References
• http://academictech.doit.wisc.edu/blend/facilitate/communicate
• http://docs.oracle.com/cd/E19340-01/820-6424/aeraq/index.html
• http://docs.oracle.com/javaee/1.3/jms/tutorial/1_3_1-fcs/doc/jms_tutorialTOC.html
• http://www.practicingsafetechs.com/TechsV1/MOMs/
• http://www.amqp.org/product/overview
• http://stomp.github.io/stomp-specification-1.2.html#Protocol_Overview
• http://zguide.zeromq.org/
• https://github.com/mperham/sidekiq/wiki
• http://kafka.apache.org/