Most technologists and programmers seem to get excited by the stories of what happens when a few smart engineers tinker with ideas in a garage. Maybe it’s the awe of innovation, maybe we are looking for inspiration, or maybe we just have CEO envy and want to build our own company someday. Whatever the reason, the tech industry as a whole savors stories of innovation. Just look at the movie The Social Network—the world spent well over $225MM watching the movie about the beginnings of Facebook.
Today’s tinkerers have it much easier. With the combination of open source software and low cost commodity computers, developers have the opportunity to innovate with most of the investment being just their own time.
Its no surprise that many Pivotal employees enjoy tinkering too. One such employee is Alvaro Videla, co-author for RabbitMQ in Action and creator of the RabbitMQ Simulator, one of his more famous tinkering projects. Recently, Videla took the time to demonstrate how RabbitMQ could be installed on a Raspberry Pi, the under $50 credit-card sized computer that seems to be designed to inspire home grown innovations.
This demonstration (also recorded on video embedded below), may not be the most popular way to deploy RabbitMQ, but it does show how easy and portable it is and the idea of working with a Raspberry Pi opens room in every developer’s heart for a little inspiration and tinkering.
How Can RabbitMQ Be Used with Raspberry Pi?
With Pivotal RabbitMQ, we have a highly scalable, efficient, easy-to-deploy message queue. Beyond the long list of support for languages and protocols that could connect to a cluster of Pis running RabbitMQ or distribute messages to individual Pi subscribers, RabbitMQ also supports MQTT for when Pis are clients or sensors. With MQTT, any device on a network can send data directly to a message queue, and the protocol is ideally suited for sensors and mobile devices. The ease of use and flexibility makes it a utility belt of sorts that can get us all tinkering with possibilities to make a ‘Rabbit Pi’:
- Create a quad-copter unmanned aerial vehicle running Rasberry Pi
- Develop wireless home, factory, warehouse, or retail automation and collect the data
- Use the camera’s night vision to capture what people or animals do in habitats, zoos, or at home
- Capture regular, time-lapse video of the stars, sun, and moon
- Build and deploy video-based art installations based on any internet-based data set like a Twitter feed
Of course, looking to the business world, Pis could also serve as sensors to serve big data analysis of your people, your fleet, your inventory or your orders. The door is wide open for however you want to design new insights into your business.
Setting RabbitMQ up on a Rasberry Pi Cluster
In the video and screen shots below, Videla walks through the steps involved in setting up a RabbitMQ cluster on three Rasberry Pi servers, all on a local network. This would be the first step for setting up a messaging queue for any distributed processing, or would help the little Rasberry Pi to start working like a supercomputer. Videla starts off with the RabbitMQ already installed an looks to the RabbitMQ page on clustering for guidance.
1) Once you have installed RabbitMQ, start RabbitMQ on each machine.
2) Then, check the status to show they are not already clustered.
3) Next, stop the RabbitMQ application and reset it, telling the second server to cluster with the first machine. Start the application again and check status to be sure it is clustered. Next, repeat with the third machine by resetting it and telling it to cluster with both the first and second node.
4) Start the application and check the status to see if the third machine is clustered with the other two machines.
5) Now, open the management API on the first node and see the status.
6) Also, you can stop a node and refresh the management console to see that it is not running.
About the Author