CBDW2014 - Down the RabbitMQ hole with ColdFusion
-
Upload
ortus-solutions-corp -
Category
Technology
-
view
297 -
download
1
description
Transcript of CBDW2014 - Down the RabbitMQ hole with ColdFusion
![Page 1: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/1.jpg)
Down the RabittMQ Hole with ColdFusion
![Page 2: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/2.jpg)
WHO AM I?• Luis Majano - Computer Engineer
• Born in El Salvador ------------------>
• Architecture + Software Design
• CEO of Ortus Solutions
• Manager of the IECFUG (www.iecfug.com)
• Adobe Community Professional
• Creator of all things Box: ColdBox, ContentBox, WireBox....
![Page 3: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/3.jpg)
AGENDA
• RPC Calls • What is Messaging • Implementations • AMQP Protocol • RabbitMQ • Nice Demo
![Page 4: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/4.jpg)
RPC STYLE CALLS
CFC CFC
CFC
![Page 5: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/5.jpg)
• Blocks Request Usage • Even if you do them Asynchronous, messages only 1 receiver • Sender always knows about receiver • Receiver knows about sender • How can we decouple knowledge? • How can we apply messaging patterns to our apps?
PROBLEMS WITH RPC
![Page 6: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/6.jpg)
Messaging (EMS)Producer
Consumer Consumer Consumer
Messaging Bus
Can be any system or
language
Can be any system or
language
Doesn’t care about consumers
AsynchronousDoes not get a
response
![Page 7: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/7.jpg)
• Producers don’t care about consumers -> Decouple • Cross platforms-technologies-OS, you name it -> Flexibility • Event Driven Programming -> Scalability • Queueing for later delivery • Asynchronous • Load balancing • Hulkyfied services
BENEFITS OF MESSAGING
![Page 8: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/8.jpg)
Usages and Patterns
Work QueuesMessaging
Publish/Subscribe Topics/Routing
![Page 9: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/9.jpg)
Protocols
JMS AMQP STOMP
![Page 10: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/10.jpg)
AMQP - www.amqp.org
• Advanced Message Queuing Protocol • != JMS • Standard binary protocol • Exchanges • Queuing • Routing • Reliable • Secure • Several Implementations
RabbitMQ
ActiveMQ
Qpid
StormMQ
![Page 11: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/11.jpg)
• AMQP Messaging Broker • www.rabbitmq.com • Built on erlang like Couchbase NoSQL • Extremely fast, reliable and secure • Languages: c#, erlang, java, python, ruby, node, cfml • Simple concept
• Accepts and forwards messages • Its like a post box, post office and postman
![Page 12: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/12.jpg)
HOW IT WORKS?Producer
Message (Body+Routing Key)
Exchange (Bindings via Routing Key)
Body = binary, json, anything
stock.prices
stock.run
log.error cluster
Queues are bound to exchanges with patterns
Routing key = Bindings
Queues
![Page 13: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/13.jpg)
• Direct
• Routing key = queue name • No mapping or extra fluff just a passthrough • Similar to JMS
• Topic
• Binding pattern (routing key) is match against the queue name • Not full regex • Ex: log.*, log# • Not like JMS Topics, forget JMS, this is not JMS
• Fanout + More
EXCHANGE TYPES
![Page 14: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/14.jpg)
LOAD BALANCING + ACK
Worker Queue
Consumer
Consumer
Consumer
Messages are round-robin
to each consumer
Consumer need to ack
![Page 15: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/15.jpg)
PUB-SUB EXAMPLE
![Page 16: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/16.jpg)
DEMO TIME
• Java Producer • Java Consumer • CFML Consumer • NodeJS Consumer • JavaScript + Stomp Consumer • CFML Producer
![Page 17: CBDW2014 - Down the RabbitMQ hole with ColdFusion](https://reader034.fdocuments.in/reader034/viewer/2022052621/5585099fd8b42a6f7f8b4775/html5/thumbnails/17.jpg)
Q & A
• RabbitMQ In Action Book • http://www.rabbitmq.com • http://tryrabbitmq.com/ • https://github.com/RabbitMQSimulator/RabbitMQSimulator • http://koo.fi/blog/2013/02/18/web-messaging-with-rabbitmq-web-stomp-and-
sockjs/ • https://github.com/robharrop/presentations.git