|By James Sun||
|October 27, 2012 03:00 PM EDT||
The electromagnetic spectrum buzzes with activity. Smartphones, wireless headsets, desktop computers, in-car navigation systems, GPS-enabled gadgets, and many more devices compete for bandwidth as well as our attention. I served as the lead software developer for a team that recently completed a demonstration of a real-time, pedestrian monitoring system at Sakura Matsuri, a major street festival in Washington, D.C. We chose PubNub as our real-time messaging backbone and this article will provide some insight into how we used PubNub and why it was the right platform for us.
Our project team, which included members from Traffax, Inc., Michael Belisle Design and Agile Media Ventures, was awarded a grant via the Reliability IDEA program, which is administered by the Transportation Research Board. The program (http://www.trb.org/IDEAProgram/IDEAReliability.aspx) funded proposals with potential to test innovative ways to improve the consistency or dependability of travel times, improve travel time prediction, and provide information to travelers and other highway system users when dealing with unexpected delays. A major goal of our project was to develop, implement and document a real-time pedestrian monitoring system at a large, outdoor event.
We approached the Japan-America Society of Washington, D.C., sponsors of the Sakura Matsuri Festival, the largest one-day display of Japanese culture in the United States. It's held each April as the climax of the National Cherry Blossom Festival. In years past, the festival has attracted well over 100,000 visitors in an area that covers several city blocks near the National Mall.
The technical architecture for our project consisted of five key elements:
- BluFax sensors
Sensors were deployed in strategic locations, primarily entrances/exits and performance stages, at Sakura Matsuri. The sensors listened for BluetoothTM devices that are set in "discover" mode and uploaded detected devices to the Data server.
- Data server
The Data server received packets of data transmitted by the BluFax sensors, did some limited processing, and forwarded them to the Messaging server.
- Messaging server
The Messaging server was the heart of the system. It's where all of the incoming data, both the raw, sensor-generated data and the data from external publishers described below, was transformed into more usable information. This information was then published via PubNub. In addition to serving as the primary publisher, the Messaging server saved the sensor data in MongoDB for post-event analysis.
- Data publishers
For our demonstration, we developed a mobile web application that served as just another publisher in our architecture. In addition, we developed standalone services (using node.js) that monitored social networking sites, such as Twitter and Flickr, and published related tweets and pictures to PubNub.
- Information consumers
We developed two interfaces that consumed and presented the data generated by the event. One was a web page that presented the data, most of which was geotagged, on a Google Map in real-time. The second was a visual dashboard that showed key performance indicators of sensor-related data.
As the lead developer, my role on the project was to create the software architecture to support the demonstration at Sakura Matsuri. The remainder of this article will focus on how PubNub was integrated in the last three components of that architecture.
PubNub served as the primary messaging backbone for our technical architecture. I developed a simple specification for how all messages should be formatted throughout our application. Once the team committed to the spec, we were able to integrate publishers and subscribers very easily, across a variety of locations, platforms and technologies.
Figure 1: Main Web Display
The mobile web application, developed with PhoneGap, included a function which simulated a parking garage that updated festival attendees on the number of spaces available for patrons. Instead of spending our limited resources building and maintaining a fast, robust and scalable messaging infrastructure, PubNub allowed us to focus our energy on integrating several varied sources of data and building creative ways to present the information.
I explored several messaging options before settling on PubNub. My goals were to build something quickly using node.js, host it in the cloud, and support our "bursty" traffic load without getting bogged down in managing multiple servers and services. The first option I looked at was building our application on top of Socket.IO, a terrific library developed by Guillermo Rauch, a superstar in the node.js community. While Socket.IO is a solid library, we didn't have the time or development resources to build up the necessary infrastructure to host, manage and tune a server running Socket.IO.
At the time I was considering various options, the primary (commercial) competitor to PubNub was Pusher. While there is a key technical difference between the two services - PubNub uses HTTP streaming/long polling while Pusher uses websockets - for our use case, the base feature set and pricing offered by both were pretty similar. Since I had already hacked together a quick-and-dirty prototype using the tutorials, documentation and libraries provided by PubNub, it made the most sense to stick with PubNub.
One key benefit of PubNub now is the availability of data centers worldwide through its Multi-Region Deployment add-on. As we look to deploy our solution across the U.S. and internationally, having a technology partner who has a global presence, will be a critical success factor.
In the end, I was very happy my choice of PubNub. Their feature set and customer support were key factors in my success.
Our demonstration at Sakura Matsuri went extremely well and was well received by the sponsor as well as curious attendees. If you're interested, you can watch a short video documenting our project here, http://vimeo.com/50101608. Now that the event is over, I've had an opportunity to sit back and take a hard look at what we accomplished and the role that PubNub played in our solution. Here are a couple of things to keep in mind if you're evaluating PubNub as a real-time messaging component for your solution:
For our demonstration at Sakura Matsuri, we did not take advantage of segregating messages via channels. One benefit of incorporating channels is that subscribers could decide which types of messages they were most interested in receiving. Traffic and parking messages would be useful to those driving to the event, but less helpful to folks taking public transportation.
PubNub is fast. While a comprehensive performance analysis is beyond the scope of this article, let's just say that there were plenty of other components that were part of the overall architecture that were much slower than PubNub.
- Customer Support
For paid customers, PubNub offers 24x7 phone support and a service level agreement (SLA). As it turned out, I did have to call PubNub support on the day of the event. Like any good developer, I decided to modify code at the last minute (!) and wound up breaking something that had worked previously. I spoke to a PubNub customer support engineer, and he addressed my issue quickly and completely.
The battle over bimodal IT is heating up. Now that there’s a reasonably broad consensus that Gartner’s advice about bimodal IT is deeply flawed – consensus everywhere except perhaps at Gartner – various ideas are springing up to fill the void. The bimodal problem, of course, is well understood. ‘Traditional’ or ‘slow’ IT uses hidebound, laborious processes that would only get in the way of ‘fast’ or ‘agile’ digital efforts. The result: incoherent IT strategies and shadow IT struggles that lead ...
Feb. 8, 2016 06:00 PM EST Reads: 442
SYS-CON Events announced today that VAI, a leading ERP software provider, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. VAI (Vormittag Associates, Inc.) is a leading independent mid-market ERP software developer renowned for its flexible solutions and ability to automate critical business functions for the distribution, manufacturing, specialty retail and service sectors. An IBM Premier Business Part...
Feb. 8, 2016 03:00 PM EST Reads: 572
SYS-CON Events announced today that Catchpoint Systems, Inc., a provider of innovative web and infrastructure monitoring solutions, has been named “Silver Sponsor” of SYS-CON's DevOps Summit at 18th Cloud Expo New York, which will take place June 7-9, 2016, at the Javits Center in New York City, NY. Catchpoint is a leading Digital Performance Analytics company that provides unparalleled insight into customer-critical services to help consistently deliver an amazing customer experience. Designed...
Feb. 8, 2016 02:00 PM EST Reads: 340
SYS-CON Events announced today that Alert Logic, Inc., the leading provider of Security-as-a-Service solutions for the cloud, will exhibit at SYS-CON's 18th International Cloud Expo®, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. Alert Logic, Inc., provides Security-as-a-Service for on-premises, cloud, and hybrid infrastructures, delivering deep security insight and continuous protection for customers at a lower cost than traditional security solutions. Ful...
Feb. 8, 2016 02:00 PM EST Reads: 373
In most cases, it is convenient to have some human interaction with a web (micro-)service, no matter how small it is. A traditional approach would be to create an HTTP interface, where user requests will be dispatched and HTML/CSS pages must be served. This approach is indeed very traditional for a web site, but not really convenient for a web service, which is not intended to be good looking, 24x7 up and running and UX-optimized. Instead, talking to a web service in a chat-bot mode would be muc...
Feb. 8, 2016 02:00 PM EST Reads: 205
[session] From Build to Scale: Lifecycle of Microservices By @fortyfivan | @CloudExpo #Microservices
More and more companies are looking to microservices as an architectural pattern for breaking apart applications into more manageable pieces so that agile teams can deliver new features quicker and more effectively. What this pattern has done more than anything to date is spark organizational transformations, setting the foundation for future application development. In practice, however, there are a number of considerations to make that go beyond simply “build, ship, and run,” which changes ho...
Feb. 8, 2016 01:30 PM EST Reads: 169
SYS-CON Events announced today that Interoute, owner-operator of one of Europe's largest networks and a global cloud services platform, has been named “Bronze Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2015 at the Javits Center in New York, New York. Interoute is the owner-operator of one of Europe's largest networks and a global cloud services platform which encompasses 12 data centers, 14 virtual data centers and 31 colocation centers, with connections to 195 ad...
Feb. 8, 2016 12:45 PM EST Reads: 355
SYS-CON Events announced today that Commvault, a global leader in enterprise data protection and information management, has been named “Bronze Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY, and the 19th International Cloud Expo, which will take place on November 1–3, 2016, at the Santa Clara Convention Center in Santa Clara, CA. Commvault is a leading provider of data protection and information management...
Feb. 8, 2016 10:45 AM EST Reads: 382
SYS-CON Events announced today that AppNeta, the leader in performance insight for business-critical web applications, will exhibit and present at SYS-CON's @DevOpsSummit at Cloud Expo New York, which will take place on June 7-9, 2016, at the Javits Center in New York City, NY. AppNeta is the only application performance monitoring (APM) company to provide solutions for all applications – applications you develop internally, business-critical SaaS applications you use and the networks that deli...
Feb. 8, 2016 10:15 AM EST Reads: 363
The (re?)emergence of Microservices was especially prominent in this week’s news. What are they good for? do they make sense for your application? should you take the plunge? and what do Microservices mean for your DevOps and Continuous Delivery efforts? Continue reading for more on Microservices, containers, DevOps culture, and more top news from the past week. As always, stay tuned to all the news coming from@ElectricCloud on DevOps and Continuous Delivery throughout the week and retweet/favo...
Feb. 8, 2016 09:45 AM EST Reads: 179
If we look at slow, traditional IT and jump to the conclusion that just because we found its issues intractable before, that necessarily means we will again, then it’s time for a rethink. As a matter of fact, the world of IT has changed over the last ten years or so. We’ve been experiencing unprecedented innovation across the board – innovation in technology as well as in how people organize and accomplish tasks. Let’s take a look at three differences between today’s modern, digital context...
Feb. 8, 2016 08:15 AM EST Reads: 174
Continuous Delivery and Release Automation for Microservices By @Anders_Wallgren | @DevOpsSummit #Microservices
As software organizations continue to invest in achieving Continuous Delivery (CD) of their applications, we see increased interest in microservices architectures, which–on the face of it–seem like a natural fit for enabling CD. In microservices (or its predecessor, “SOA”), the business functionality is decomposed into a set of independent, self-contained services that communicate with each other via an API. Each of the services has their own application release cycle, and are developed and depl...
Feb. 6, 2016 02:00 PM EST Reads: 214
At the heart of the Cloud Native model is a microservices application architecture, and applying this to a telco SDN scenario offers enormous opportunity for product innovation and competitive advantage. For example in the ETSI NFV Ecosystem white paper they describe one of the product markets that SDN might address to be the Home sector. Vendors like Alcatel market SDN-based solutions for the home market, offering Home Gateways – A virtual residential gateway (vRGW) where service provider...
Feb. 6, 2016 01:00 PM EST Reads: 150
In the Bimodal model we find two areas of IT - the traditional kind where the main concern is keeping the lights on and the IT focusing on agility and speed, where everything needs to be faster. Today companies are investing in new technologies and processes to emulate their most agile competitors. Gone are the days of waterfall development and releases only every few months. Today's IT and the business it powers demands performance akin to a supercar - everything needs to be faster, every sc...
Feb. 6, 2016 09:00 AM EST Reads: 516
With microservices, SOA and distributed architectures becoming more popular, it is becoming increasingly harder to keep track of where time is spent in a distributed application when trying to diagnose performance problems. Distributed tracing systems attempt to address this problem by following application requests across service boundaries, persisting metadata along the way that provide context for fine-grained performance monitoring.
Feb. 5, 2016 03:45 PM EST Reads: 807
Web performance issues and advances have been gaining a stronger presence in the headlines as people are becoming more aware of its impact on virtually every business, and 2015 was no exception. We saw a myriad of major outages this year hit some of the biggest corporations, as well as some technology integrations and other news that we IT Ops aficionados find very exciting. This past year has offered several opportunities for growth and evolution in the performance realm — even the worst failu...
Feb. 3, 2016 10:00 PM EST Reads: 549
Are you someone who knows that the number one rule in DevOps is “Don’t Panic”? Especially when it comes to making Continuous Delivery changes inside your organization? Are you someone that theorizes that if anyone implements real automation changes, the solution will instantly become antiquated and be replaced by something even more bizarre and inexplicable?
Feb. 3, 2016 06:30 PM EST Reads: 316
Welcome to the first top DevOps news roundup of 2016! At the end of last year, we saw some great predictions for 2016. While we’re excited to kick off the new year, this week’s top posts reminded us to take a second to slow down and really understand the current state of affairs. For example, do you actually know what microservices are – or aren’t? What about DevOps? Does the emphasis still fall mostly on the development side? This week’s top news definitely got the wheels turning and just migh...
Feb. 3, 2016 03:00 PM EST Reads: 287
Test automation is arguably the most important innovation to the process of QA testing in software development. The ability to automate regression testing and other repetitive test cases can significantly reduce the overall production time for even the most complex solutions. As software continues to be developed for new platforms – including mobile devices and the diverse array of endpoints that will be created during the rise of the Internet of Things - automation integration will have a huge ...
Feb. 3, 2016 02:00 PM EST Reads: 641
Providing a full-duplex communication channel over a single TCP connection, WebSocket is the most efficient protocol for real-time responses over the web. If you’re utilizing WebSocket technology, performance testing will boil down to simulating the bi-directional nature of your application. Introduced with HTML5, the WebSocket protocol allows for more interaction between a browser and website, facilitating real-time applications and live content. WebSocket technology creates a persistent conne...
Feb. 3, 2016 07:00 AM EST Reads: 314