SlideShare a Scribd company logo
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
}
ITB2019 Multi-language / multi-OS communication using RabbitMQ - Wil de Bruin
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
ITB2019 Multi-language / multi-OS communication using RabbitMQ - Wil de Bruin
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

KEY
Nginx in production
PPT
Messaging For the Cloud and Microservices
PDF
Fabric8 - Being devOps doesn't suck anymore
PDF
Narayana 5: The premier open source transaction manager
PDF
RabbitMQ fairly-indepth
PDF
Devoxx Morocco 2016 - Microservices with Kafka
PDF
MariaDB - The Future of MySQL?
PPT
OpenNebula Administrator View
Nginx in production
Messaging For the Cloud and Microservices
Fabric8 - Being devOps doesn't suck anymore
Narayana 5: The premier open source transaction manager
RabbitMQ fairly-indepth
Devoxx Morocco 2016 - Microservices with Kafka
MariaDB - The Future of MySQL?
OpenNebula Administrator View

What's hot (20)

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

Similar to ITB2019 Multi-language / multi-OS communication using RabbitMQ - Wil de Bruin (20)

ODP
Art Of Message Queues
PDF
CBDW2014 - Down the RabbitMQ hole with ColdFusion
PDF
Practical Message Queuing Using RabbitMQ (PHPem, 3rd July 2014)
PDF
Multi-platform Enterprise Messaging with RabbitMQ
PDF
Message Queues with RabbitMQ - Brad Wood.pdf
PDF
Enterprise Messaging with RabbitMQ.pdf
PPTX
RabbitMQ Model and Some Example Applications
PPTX
RabbitMQ 101 : job scheduling, micro service communication, event based data...
PDF
Reducing load with RabbitMQ
PDF
Messaging Standards and Systems - AMQP & RabbitMQ
PPTX
RabbitMQ 101 : How to cook the rabbit? - phptour 2016
PDF
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
PDF
Messaging Standards and Systems - AMQP & RabbitMQ
PDF
Message Queues a basic overview
PDF
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
PPTX
The RabbitMQ Message Broker
ODP
The Art of Message Queues - TEKX
PDF
Life in a Queue - Using Message Queue with django
PPTX
Consuming RabbitMQ at TTL
PDF
Microservices communication styles and event bus
Art Of Message Queues
CBDW2014 - Down the RabbitMQ hole with ColdFusion
Practical Message Queuing Using RabbitMQ (PHPem, 3rd July 2014)
Multi-platform Enterprise Messaging with RabbitMQ
Message Queues with RabbitMQ - Brad Wood.pdf
Enterprise Messaging with RabbitMQ.pdf
RabbitMQ Model and Some Example Applications
RabbitMQ 101 : job scheduling, micro service communication, event based data...
Reducing load with RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
RabbitMQ 101 : How to cook the rabbit? - phptour 2016
Alvaro Videla, Building a Distributed Data Ingestion System with RabbitMQ
Messaging Standards and Systems - AMQP & RabbitMQ
Message Queues a basic overview
How to cook Rabbit on Production - Serhiy Nazarov | Ruby Meditation 28
The RabbitMQ Message Broker
The Art of Message Queues - TEKX
Life in a Queue - Using Message Queue with django
Consuming RabbitMQ at TTL
Microservices communication styles and event bus
Ad

More from Ortus Solutions, Corp (20)

PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
PDF
June Webinar: BoxLang-Dynamic-AWS-Lambda
PDF
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
PDF
What's-New-with-BoxLang-Brad Wood.pptx.pdf
PDF
Getting Started with BoxLang - CFCamp 2025.pdf
PDF
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
PDF
What's New with BoxLang Led by Brad Wood.pdf
PDF
Vector Databases and the BoxLangCFML Developer.pdf
PDF
Using cbSSO in a ColdBox App Led by Jacob Beers.pdf
PDF
Use JSON to Slash Your Database Performance.pdf
PDF
Portable CI wGitLab and Github led by Gavin Pickin.pdf
PDF
Tame the Mesh An intro to cross-platform tracing and troubleshooting.pdf
PDF
Supercharging CommandBox with Let's Encrypt.pdf
PDF
Spice up your site with cool animations using GSAP..pdf
PDF
Passkeys and cbSecurity Led by Eric Peterson.pdf
PDF
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
PDF
Integrating the OpenAI API in Your Coldfusion Apps.pdf
PDF
Hidden Gems in FusionReactor for BoxLang, ACF, and Lucee Users.pdf
PDF
Geting-started with BoxLang Led By Raymon Camden.pdf
PDF
From Zero to CRUD with ORM - Led by Annette Liskey.pdf
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
June Webinar: BoxLang-Dynamic-AWS-Lambda
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
What's-New-with-BoxLang-Brad Wood.pptx.pdf
Getting Started with BoxLang - CFCamp 2025.pdf
CFCamp2025 - Keynote Day 1 led by Luis Majano.pdf
What's New with BoxLang Led by Brad Wood.pdf
Vector Databases and the BoxLangCFML Developer.pdf
Using cbSSO in a ColdBox App Led by Jacob Beers.pdf
Use JSON to Slash Your Database Performance.pdf
Portable CI wGitLab and Github led by Gavin Pickin.pdf
Tame the Mesh An intro to cross-platform tracing and troubleshooting.pdf
Supercharging CommandBox with Let's Encrypt.pdf
Spice up your site with cool animations using GSAP..pdf
Passkeys and cbSecurity Led by Eric Peterson.pdf
Legacy Code Nightmares , Hellscapes, and Lessons Learned.pdf
Integrating the OpenAI API in Your Coldfusion Apps.pdf
Hidden Gems in FusionReactor for BoxLang, ACF, and Lucee Users.pdf
Geting-started with BoxLang Led By Raymon Camden.pdf
From Zero to CRUD with ORM - Led by Annette Liskey.pdf

Recently uploaded (20)

PDF
Empathic Computing: Creating Shared Understanding
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
cuic standard and advanced reporting.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Approach and Philosophy of On baking technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Spectroscopy.pptx food analysis technology
Empathic Computing: Creating Shared Understanding
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
cuic standard and advanced reporting.pdf
MIND Revenue Release Quarter 2 2025 Press Release
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Approach and Philosophy of On baking technology
Per capita expenditure prediction using model stacking based on satellite ima...
MYSQL Presentation for SQL database connectivity
Unlocking AI with Model Context Protocol (MCP)
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
“AI and Expert System Decision Support & Business Intelligence Systems”
Understanding_Digital_Forensics_Presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Programs and apps: productivity, graphics, security and other tools
The Rise and Fall of 3GPP – Time for a Sabbatical?
Diabetes mellitus diagnosis method based random forest with bat algorithm
Spectroscopy.pptx food analysis technology

ITB2019 Multi-language / multi-OS communication using RabbitMQ - Wil de Bruin

  • 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 }
  • 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
  • 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