SlideShare a Scribd company logo
1 of 39
Download to read offline
Multi-language / multi-OS
commmunication using
RabbitMQ
Wil de Bruin
Who am I
• Wil de Bruin – Software / system engineer
• Wageningen,The Netherlands
• Graduated in Environmental Sciences
• Reseach microbiologist (1987)
• CTO – Founder Site4u (1994)
• CFML since Allaire ColdFusion 1.5
• Coldfusion training, consultancy, software development and
hosting
• Coldbox user since 2008
Agenda
• Use case:Web Hosting Panel
• RPC vs messaging
• RabbitMQ Concepts explained
• Our RabbitMQ messaging setup
• Demo / code
• Conclusions
Use case:
Web hosting panel
Web hosting panel
• Dns, Email functionality: just like Cpanel, plesk etc
• Customers demanding SLA reports: integration with Monitoring
• Resource usage:VMWare integration
• Management of servers and networks: complex networks require more
automation
Server 700…
Server 2
VueJS
frontend
Portal DB
MS SQL
CF Rest API
backend
Redirects
mySQL
Accounting
MS SQL
Domain registrar
XML API
Domain registrar
(no CFML) API
Antispam
service
( API )
Nagios
monitoring
API ??
Mail Server
Mail DB /var/vmail/domain
DNS Server
powerDNS
Commandline
Commandline
Zabbix trend
monitoring
API ??
Server 1
Commandline
Some limitations: Mailserver
• Mail Server is OpenSource (postfix / Dovecot (IMAP) / webmail (Roundcube)
• User config is defined in a database
• User mailboxes as files and directories.Will NOT be deleted when removed from
database.
• Roundcube in separate database
• Report sizing with commandline tools, noAPI available.
• Environment: Linux, bash and Python
More limitations: DNS and DNSsec
• PowerDNS has mySQL backend, but no management of DNSsec
• Workflow
• Create DNSsec in powerDNS (commandline)
• Send key to registrar
• Registrar 1: XML API, several languages
• Registrar 2: API for CFML is hard, several other language libs available (e.g PHP)
• Change status in control panel
• Environment: Linux, bash, commandline,
Still more limitations: SSL and HTTP configs
• SSL installation is manual, customers need overview (commandline)
• Mixture of
• Custom certificates from several providers
• Let’s encrypt: automated management, but how to notify our control panel?
• Environment:
• Linux, bash, commandline, python
• Windows, powershell
RPC vs messaging
RPC and REST limitations
• Only one receiver
• Sender knows about receiver
• Receiver knows about sender
• Blocks request usage
RPC
RPC
https://www.slideshare.net/ColdFusionConference/enterprise-messaging
Messaging advantages
• Cross platform, multiple technologies: Flexibility
• Decoupling Producers and Consumers
• Event driven programming: scalability
• Queuing
• Load balancing
Rabbit MQ concepts explained
AMQP
Advanced Message Queuing Protocol
(www.amqp.org)
• Binary protocol
• Diverse programming languages can communicate
• Queuing
• Routing
• Exchanges
• Secure
• Reliable
RabbitMQ
• Multiple messaging protocols (AMQP, STOMP, MQTT)
• Open source, well known
• Lots of libraries in different languages (Java, .NET, Python,Ruby, Javascript)
• Http management
• Simple concept: just accepts and forwards messages
• Developer friendly: deploy with Docker, Puppet and more
RabbitMQ messaging concepts (1/5)
RabbitMQ messaging concepts (2/5)
RabbitMQ messaging concepts (3/5)
RabbitMQ messaging concepts (4/5)
RabbitMQ messaging concepts (5/5)
Our RabbitMQ messaging setup
Sending commands in our hosting
environment
CF control
panel
Mail server
Delete Domain
Get Mailbox Size
Return Result
CF control
panel
Dns server
Enable DnsSec
Return Result
CF control
panel
ANY server
List SSL certificates
Return Result
Communication between hosts
Messaging
Our messaging setup
• Topic exchange
• Routing keys:
• mysite4u.servicename.cmd for commands to a service
• mysite4u.servicename.response for responses of a service
• Queues: servicename-commands and mysite4u-responses
• Exchange: mySite4u-topic
• Queues and messages are DURABLE i.e persistent.
Commands and responses
COMMAND
Headers:
action = string (for example: archive of getmailboxsize)
Properties:
correlation_id: string
content_type: string (application/json of text/plain)
Body: [string,json]
{
"params": {
"domainname": "example.com",
"param2": "Second parameter"
}
}
Response
Properties:
correlation_id: string
content_type: string (application/json)
Body: json
{
data: [string, json]
status: [ok,warning,error]
messages: string
}
Setup
• CF Rabbit Producer (hosting control panel)
• RabbitMQ consumer on hosting servers
• RabbitMQ producer on hosting servers
• CF Rabbit Consumer
• Polling, the easy way
• Polling at higher frequency, still easy
• Pushing messages (a.k.a the hard way)
CFML RabbitMQ producer
• Let’s start with
• https://github.com/lmajano/messaging-polyglot
• https://www.rabbitmq.com/getstarted.html RabbitMQ tutorials
• https://www.rabbitmq.com/api-guide.html Java API Guide
• Create cfproject, download jar and dump in /lib folder
• Create mappings in wirebox
• Add rabbitsettings in coldbox.conf
• Create onAppInit to establish RabbitMQ connection
• Create a Service to send messages
Flexible messaging daemon for hosting servers
• RabbitMQ Consumer written in Python
• Executes any command based on configuration, e.g:
[mysite4u.sharedmail.cmd:archive]
script: /usr/local/scripts/archiveMail/archiveMailDomain.php $domainname
run-as: vmail
reply-to: mysite4u.sharedmail.response
• Output of script is piped into RabbitMQ producer response.
RabbitMQ CF consumer
CF RabbitMQ consumer
• Pulling vs pushing
• Pushing should be easy (just like other languages….)
• Pushing more flexible
• Missing correct examples!
• Pulling is easy
• 1 minute limitation
• CFConcurrent to the rescue..
What’s missing
• Security:
• Use SSL in rabbit connections
• Make sure your reply is a valid one: use correlationID for command and match this in
handling the reply
• Monitoring
• Make sure your commands are processed
• Monitor your queue lengths
Conclusions
• Messaging is very flexible, new ways of communication
• No more coding barriers, many languages can be used
• CF rabbitMQ producers easy to achieve
• CF rabbitMQ consumers are hard to configure, due to language limitations
• Is CF the best tool for a rabbit Consumer in a micro services architecture?
• https://github.com/wpdebruin/rabbitmq-demo
Thank you!
Questions?
More questions?
E-mail: wil@site4u.nl
Slack: @wil-site4u

More Related Content

What's hot

Scaling MQTT With Apache Kafka
Scaling MQTT With Apache KafkaScaling MQTT With Apache Kafka
Scaling MQTT With Apache Kafkakellogh
 
Nginx internals
Nginx internalsNginx internals
Nginx internalsliqiang xu
 
AstriCon 2017 - Docker Swarm & Asterisk
AstriCon 2017  - Docker Swarm & AsteriskAstriCon 2017  - Docker Swarm & Asterisk
AstriCon 2017 - Docker Swarm & AsteriskEvan McGee
 
Integrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQIntegrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQGavin Roy
 
Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)
Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)
Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)IT-Доминанта
 
What's New in NGINX Plus R7?
What's New in NGINX Plus R7?What's New in NGINX Plus R7?
What's New in NGINX Plus R7?NGINX, Inc.
 
How is Kafka so Fast?
How is Kafka so Fast?How is Kafka so Fast?
How is Kafka so Fast?Ricardo Paiva
 
Hyper-V for dummies for VMware smarties
Hyper-V for dummies for VMware smartiesHyper-V for dummies for VMware smarties
Hyper-V for dummies for VMware smartiesSolv AS
 
What's New in NGINX Plus R12?
What's New in NGINX Plus R12? What's New in NGINX Plus R12?
What's New in NGINX Plus R12? NGINX, Inc.
 
How Criteo is managing one of the largest Kafka Infrastructure in Europe
How Criteo is managing one of the largest Kafka Infrastructure in EuropeHow Criteo is managing one of the largest Kafka Infrastructure in Europe
How Criteo is managing one of the largest Kafka Infrastructure in EuropeRicardo Paiva
 
Experience on-freeswitch-cluecon2011
Experience on-freeswitch-cluecon2011Experience on-freeswitch-cluecon2011
Experience on-freeswitch-cluecon2011seven1240
 
Apache Kafka - Free Friday
Apache Kafka - Free FridayApache Kafka - Free Friday
Apache Kafka - Free FridayOtávio Carvalho
 
Learn nginx in 90mins
Learn nginx in 90minsLearn nginx in 90mins
Learn nginx in 90minsLarry Cai
 

What's hot (20)

Scaling MQTT With Apache Kafka
Scaling MQTT With Apache KafkaScaling MQTT With Apache Kafka
Scaling MQTT With Apache Kafka
 
What's New in WildFly 9?
What's New in WildFly 9?What's New in WildFly 9?
What's New in WildFly 9?
 
Picking a message queue
Picking a  message queuePicking a  message queue
Picking a message queue
 
RabbitMQ
RabbitMQRabbitMQ
RabbitMQ
 
Nginx internals
Nginx internalsNginx internals
Nginx internals
 
AstriCon 2017 - Docker Swarm & Asterisk
AstriCon 2017  - Docker Swarm & AsteriskAstriCon 2017  - Docker Swarm & Asterisk
AstriCon 2017 - Docker Swarm & Asterisk
 
Jakarta EE 8 on JDK17
Jakarta EE 8 on JDK17Jakarta EE 8 on JDK17
Jakarta EE 8 on JDK17
 
RabbitMQ and AMQP Model
RabbitMQ and AMQP ModelRabbitMQ and AMQP Model
RabbitMQ and AMQP Model
 
Integrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQIntegrating PostgreSql with RabbitMQ
Integrating PostgreSql with RabbitMQ
 
Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)
Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)
Работаем с RabbitMQ в Python используя kombu + gevent. (Rinat khabibiev)
 
What's New in NGINX Plus R7?
What's New in NGINX Plus R7?What's New in NGINX Plus R7?
What's New in NGINX Plus R7?
 
How is Kafka so Fast?
How is Kafka so Fast?How is Kafka so Fast?
How is Kafka so Fast?
 
Hyper-V for dummies for VMware smarties
Hyper-V for dummies for VMware smartiesHyper-V for dummies for VMware smarties
Hyper-V for dummies for VMware smarties
 
Kamailio on Docker
Kamailio on DockerKamailio on Docker
Kamailio on Docker
 
What's New in NGINX Plus R12?
What's New in NGINX Plus R12? What's New in NGINX Plus R12?
What's New in NGINX Plus R12?
 
How Criteo is managing one of the largest Kafka Infrastructure in Europe
How Criteo is managing one of the largest Kafka Infrastructure in EuropeHow Criteo is managing one of the largest Kafka Infrastructure in Europe
How Criteo is managing one of the largest Kafka Infrastructure in Europe
 
Experience on-freeswitch-cluecon2011
Experience on-freeswitch-cluecon2011Experience on-freeswitch-cluecon2011
Experience on-freeswitch-cluecon2011
 
Apache Kafka - Free Friday
Apache Kafka - Free FridayApache Kafka - Free Friday
Apache Kafka - Free Friday
 
Asynchronous AMQP
Asynchronous AMQPAsynchronous AMQP
Asynchronous AMQP
 
Learn nginx in 90mins
Learn nginx in 90minsLearn nginx in 90mins
Learn nginx in 90mins
 

Similar to Multi-language communication using RabbitMQ

Discover the Capabilities of Windows Azure Service Bus to Power Agile Busines...
Discover the Capabilities of Windows Azure Service Bus to Power Agile Busines...Discover the Capabilities of Windows Azure Service Bus to Power Agile Busines...
Discover the Capabilities of Windows Azure Service Bus to Power Agile Busines...Sergio Compean
 
Adding Real-time Features to PHP Applications
Adding Real-time Features to PHP ApplicationsAdding Real-time Features to PHP Applications
Adding Real-time Features to PHP ApplicationsRonny López
 
PMIx: Bridging the Container Boundary
PMIx: Bridging the Container BoundaryPMIx: Bridging the Container Boundary
PMIx: Bridging the Container Boundaryrcastain
 
AMF Flash and .NET
AMF Flash and .NETAMF Flash and .NET
AMF Flash and .NETYaniv Uriel
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersClaus Ibsen
 
Messaging-as-a-Service Rivieradev 2017
Messaging-as-a-Service Rivieradev 2017Messaging-as-a-Service Rivieradev 2017
Messaging-as-a-Service Rivieradev 2017Ulf Lilleengen
 
What's Coming In CloudStack 4.18
What's Coming In CloudStack 4.18What's Coming In CloudStack 4.18
What's Coming In CloudStack 4.18ShapeBlue
 
HHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud World
HHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud WorldHHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud World
HHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud Worldmatthew1001
 
Encrypt your volumes with barbican open stack 2018
Encrypt your volumes with barbican open stack 2018Encrypt your volumes with barbican open stack 2018
Encrypt your volumes with barbican open stack 2018Duncan Wannamaker
 
Messaging for IoT
Messaging for IoTMessaging for IoT
Messaging for IoTdejanb
 
Hacking apache cloud stack
Hacking apache cloud stackHacking apache cloud stack
Hacking apache cloud stackNitin Mehta
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfOrtus Solutions, Corp
 
DevOPS training - Day 1/2
DevOPS training - Day 1/2DevOPS training - Day 1/2
DevOPS training - Day 1/2Vincent Mercier
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftRX-M Enterprises LLC
 
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...Ontico
 
Deploying and managing IBM MQ in the Cloud
Deploying and managing IBM MQ in the CloudDeploying and managing IBM MQ in the Cloud
Deploying and managing IBM MQ in the CloudRobert Parker
 
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on KubernetesRiga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on KubernetesClaus Ibsen
 
CloudStack Overview
CloudStack OverviewCloudStack Overview
CloudStack Overviewsedukull
 

Similar to Multi-language communication using RabbitMQ (20)

Discover the Capabilities of Windows Azure Service Bus to Power Agile Busines...
Discover the Capabilities of Windows Azure Service Bus to Power Agile Busines...Discover the Capabilities of Windows Azure Service Bus to Power Agile Busines...
Discover the Capabilities of Windows Azure Service Bus to Power Agile Busines...
 
Adding Real-time Features to PHP Applications
Adding Real-time Features to PHP ApplicationsAdding Real-time Features to PHP Applications
Adding Real-time Features to PHP Applications
 
PMIx: Bridging the Container Boundary
PMIx: Bridging the Container BoundaryPMIx: Bridging the Container Boundary
PMIx: Bridging the Container Boundary
 
AMF Flash and .NET
AMF Flash and .NETAMF Flash and .NET
AMF Flash and .NET
 
Developing Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containersDeveloping Java based microservices ready for the world of containers
Developing Java based microservices ready for the world of containers
 
Messaging-as-a-Service Rivieradev 2017
Messaging-as-a-Service Rivieradev 2017Messaging-as-a-Service Rivieradev 2017
Messaging-as-a-Service Rivieradev 2017
 
What's Coming In CloudStack 4.18
What's Coming In CloudStack 4.18What's Coming In CloudStack 4.18
What's Coming In CloudStack 4.18
 
HHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud World
HHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud WorldHHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud World
HHM 6887 Managing Your Scalable Applications in an MQ Hybrid Cloud World
 
Encrypt your volumes with barbican open stack 2018
Encrypt your volumes with barbican open stack 2018Encrypt your volumes with barbican open stack 2018
Encrypt your volumes with barbican open stack 2018
 
Messaging for IoT
Messaging for IoTMessaging for IoT
Messaging for IoT
 
Hacking apache cloud stack
Hacking apache cloud stackHacking apache cloud stack
Hacking apache cloud stack
 
Enterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdfEnterprise Messaging with RabbitMQ.pdf
Enterprise Messaging with RabbitMQ.pdf
 
DevOPS training - Day 1/2
DevOPS training - Day 1/2DevOPS training - Day 1/2
DevOPS training - Day 1/2
 
Building high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache ThriftBuilding high performance microservices in finance with Apache Thrift
Building high performance microservices in finance with Apache Thrift
 
Follow the White Rabbit - Message Queues with PHP
Follow the White Rabbit - Message Queues with PHPFollow the White Rabbit - Message Queues with PHP
Follow the White Rabbit - Message Queues with PHP
 
What is RabbitMQ ?
What is RabbitMQ ?What is RabbitMQ ?
What is RabbitMQ ?
 
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
Построение распределенной системы сбора данных с помощью RabbitMQ, Alvaro Vid...
 
Deploying and managing IBM MQ in the Cloud
Deploying and managing IBM MQ in the CloudDeploying and managing IBM MQ in the Cloud
Deploying and managing IBM MQ in the Cloud
 
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on KubernetesRiga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
Riga Dev Day 2016 - Microservices with Apache Camel & fabric8 on Kubernetes
 
CloudStack Overview
CloudStack OverviewCloudStack Overview
CloudStack Overview
 

Recently uploaded

Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 

Recently uploaded (20)

Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 

Multi-language communication using RabbitMQ

  • 1. Multi-language / multi-OS commmunication using RabbitMQ Wil de Bruin
  • 2. Who am I • Wil de Bruin – Software / system engineer • Wageningen,The Netherlands • Graduated in Environmental Sciences • Reseach microbiologist (1987) • CTO – Founder Site4u (1994) • CFML since Allaire ColdFusion 1.5 • Coldfusion training, consultancy, software development and hosting • Coldbox user since 2008
  • 3. Agenda • Use case:Web Hosting Panel • RPC vs messaging • RabbitMQ Concepts explained • Our RabbitMQ messaging setup • Demo / code • Conclusions
  • 5. Web hosting panel • Dns, Email functionality: just like Cpanel, plesk etc • Customers demanding SLA reports: integration with Monitoring • Resource usage:VMWare integration • Management of servers and networks: complex networks require more automation
  • 6. Server 700… Server 2 VueJS frontend Portal DB MS SQL CF Rest API backend Redirects mySQL Accounting MS SQL Domain registrar XML API Domain registrar (no CFML) API Antispam service ( API ) Nagios monitoring API ?? Mail Server Mail DB /var/vmail/domain DNS Server powerDNS Commandline Commandline Zabbix trend monitoring API ?? Server 1 Commandline
  • 7. Some limitations: Mailserver • Mail Server is OpenSource (postfix / Dovecot (IMAP) / webmail (Roundcube) • User config is defined in a database • User mailboxes as files and directories.Will NOT be deleted when removed from database. • Roundcube in separate database • Report sizing with commandline tools, noAPI available. • Environment: Linux, bash and Python
  • 8. More limitations: DNS and DNSsec • PowerDNS has mySQL backend, but no management of DNSsec • Workflow • Create DNSsec in powerDNS (commandline) • Send key to registrar • Registrar 1: XML API, several languages • Registrar 2: API for CFML is hard, several other language libs available (e.g PHP) • Change status in control panel • Environment: Linux, bash, commandline,
  • 9. Still more limitations: SSL and HTTP configs • SSL installation is manual, customers need overview (commandline) • Mixture of • Custom certificates from several providers • Let’s encrypt: automated management, but how to notify our control panel? • Environment: • Linux, bash, commandline, python • Windows, powershell
  • 11. RPC and REST limitations • Only one receiver • Sender knows about receiver • Receiver knows about sender • Blocks request usage
  • 12. RPC
  • 13. RPC
  • 15. Messaging advantages • Cross platform, multiple technologies: Flexibility • Decoupling Producers and Consumers • Event driven programming: scalability • Queuing • Load balancing
  • 16. Rabbit MQ concepts explained
  • 17. AMQP Advanced Message Queuing Protocol (www.amqp.org) • Binary protocol • Diverse programming languages can communicate • Queuing • Routing • Exchanges • Secure • Reliable
  • 18. RabbitMQ • Multiple messaging protocols (AMQP, STOMP, MQTT) • Open source, well known • Lots of libraries in different languages (Java, .NET, Python,Ruby, Javascript) • Http management • Simple concept: just accepts and forwards messages • Developer friendly: deploy with Docker, Puppet and more
  • 25. Sending commands in our hosting environment CF control panel Mail server Delete Domain Get Mailbox Size Return Result CF control panel Dns server Enable DnsSec Return Result CF control panel ANY server List SSL certificates Return Result
  • 28. Our messaging setup • Topic exchange • Routing keys: • mysite4u.servicename.cmd for commands to a service • mysite4u.servicename.response for responses of a service • Queues: servicename-commands and mysite4u-responses • Exchange: mySite4u-topic • Queues and messages are DURABLE i.e persistent.
  • 29. Commands and responses COMMAND Headers: action = string (for example: archive of getmailboxsize) Properties: correlation_id: string content_type: string (application/json of text/plain) Body: [string,json] { "params": { "domainname": "example.com", "param2": "Second parameter" } } Response Properties: correlation_id: string content_type: string (application/json) Body: json { data: [string, json] status: [ok,warning,error] messages: string }
  • 30.
  • 31. Setup • CF Rabbit Producer (hosting control panel) • RabbitMQ consumer on hosting servers • RabbitMQ producer on hosting servers • CF Rabbit Consumer • Polling, the easy way • Polling at higher frequency, still easy • Pushing messages (a.k.a the hard way)
  • 32. CFML RabbitMQ producer • Let’s start with • https://github.com/lmajano/messaging-polyglot • https://www.rabbitmq.com/getstarted.html RabbitMQ tutorials • https://www.rabbitmq.com/api-guide.html Java API Guide • Create cfproject, download jar and dump in /lib folder • Create mappings in wirebox • Add rabbitsettings in coldbox.conf • Create onAppInit to establish RabbitMQ connection • Create a Service to send messages
  • 33.
  • 34. Flexible messaging daemon for hosting servers • RabbitMQ Consumer written in Python • Executes any command based on configuration, e.g: [mysite4u.sharedmail.cmd:archive] script: /usr/local/scripts/archiveMail/archiveMailDomain.php $domainname run-as: vmail reply-to: mysite4u.sharedmail.response • Output of script is piped into RabbitMQ producer response.
  • 36. CF RabbitMQ consumer • Pulling vs pushing • Pushing should be easy (just like other languages….) • Pushing more flexible • Missing correct examples! • Pulling is easy • 1 minute limitation • CFConcurrent to the rescue..
  • 37. What’s missing • Security: • Use SSL in rabbit connections • Make sure your reply is a valid one: use correlationID for command and match this in handling the reply • Monitoring • Make sure your commands are processed • Monitor your queue lengths
  • 38. Conclusions • Messaging is very flexible, new ways of communication • No more coding barriers, many languages can be used • CF rabbitMQ producers easy to achieve • CF rabbitMQ consumers are hard to configure, due to language limitations • Is CF the best tool for a rabbit Consumer in a micro services architecture? • https://github.com/wpdebruin/rabbitmq-demo
  • 39. Thank you! Questions? More questions? E-mail: wil@site4u.nl Slack: @wil-site4u