|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.
[slides] Workloads and Public Cloud at @CloudExpo By @utollwi | @ProfitBricksUSA #DevOps #Containers #Microservices
Public Cloud IaaS started its life in the developer and startup communities and has grown rapidly to a $20B+ industry, but it still pales in comparison to how much is spent worldwide on IT: $3.6 trillion. In fact, there are 8.6 million data centers worldwide, the reality is many small and medium sized business have server closets and colocation footprints filled with servers and storage gear. While on-premise environment virtualization may have peaked at 75%, the Public Cloud has lagged in adop...
Jul. 30, 2015 04:00 PM EDT Reads: 2,194
SYS-CON Events announced today that HPM Networks will exhibit at the 17th International Cloud Expo®, which will take place on November 3–5, 2015, at the Santa Clara Convention Center in Santa Clara, CA. For 20 years, HPM Networks has been integrating technology solutions that solve complex business challenges. HPM Networks has designed solutions for both SMB and enterprise customers throughout the San Francisco Bay Area.
Jul. 30, 2015 03:45 PM EDT Reads: 439
The Software Defined Data Center (SDDC), which enables organizations to seamlessly run in a hybrid cloud model (public + private cloud), is here to stay. IDC estimates that the software-defined networking market will be valued at $3.7 billion by 2016. Security is a key component and benefit of the SDDC, and offers an opportunity to build security 'from the ground up' and weave it into the environment from day one. In his session at 16th Cloud Expo, Reuven Harrison, CTO and Co-Founder of Tufin,...
Jul. 30, 2015 03:00 PM EDT Reads: 476
Alibaba, the world’s largest ecommerce provider, has pumped over a $1 billion into its subsidiary, Aliya, a cloud services provider. This is perhaps one of the biggest moments in the global Cloud Wars that signals the entry of China into the main arena. Here is why this matters. The cloud industry worldwide is being propelled into fast growth by tremendous demand for cloud computing services. Cloud, which is highly scalable and offers low investment and high computational capabilities to end us...
Jul. 30, 2015 02:42 PM EDT
MuleSoft has announced the findings of its 2015 Connectivity Benchmark Report on the adoption and business impact of APIs. The findings suggest traditional businesses are quickly evolving into "composable enterprises" built out of hundreds of connected software services, applications and devices. Most are embracing the Internet of Things (IoT) and microservices technologies like Docker. A majority are integrating wearables, like smart watches, and more than half plan to generate revenue with ...
Jul. 30, 2015 02:30 PM EDT
Jul. 30, 2015 02:00 PM EDT Reads: 283
One of the ways to increase scalability of services – and applications – is to go “stateless.” The reasons for this are many, but in general by eliminating the mapping between a single client and a single app or service instance you eliminate the need for resources to manage state in the app (overhead) and improve the distributability (I can make up words if I want) of requests across a pool of instances. The latter occurs because sessions don’t need to hang out and consume resources that could ...
Jul. 30, 2015 01:00 PM EDT Reads: 172
[session] DevOps State of Mind By @RedHatNews | @DevOpsSummit #DevOps #PaaS #Jenkins #Kubernetes #Docker
Rapid innovation, changing business landscapes, and new IT demands force businesses to make changes quickly. The DevOps approach is a way to increase business agility through collaboration, communication, and integration across different teams in the IT organization. In his session at DevOps Summit, Chris Van Tuin, Chief Technologist for the Western US at Red Hat, will discuss: The acceleration of application delivery for the business with DevOps
Jul. 30, 2015 12:45 PM EDT Reads: 1,111
What’s New in the World of Application Analytics By @MikeAnand | @DevOpsSummit #DevOps #API #APM #Microservices
Software is eating the world. The more it eats, the bigger the mountain of data and wealth of valuable insights to digest and act on. Forward facing customer-centric IT organizations, leaders and professionals are looking to answer questions like how much revenue was lost today from platinum users not converting because they experienced poor mobile app performance. This requires a single, real-time pane of glass for end-to-end analytics covering business, customer, and IT operational data.
Jul. 30, 2015 12:00 PM EDT Reads: 1,304
Growth hacking is common for startups to make unheard-of progress in building their business. Career Hacks can help Geek Girls and those who support them (yes, that's you too, Dad!) to excel in this typically male-dominated world. Get ready to learn the facts: Is there a bias against women in the tech / developer communities? Why are women 50% of the workforce, but hold only 24% of the STEM or IT positions? Some beginnings of what to do about it! In her Opening Keynote at 16th Cloud Expo, S...
Jul. 30, 2015 12:00 PM EDT Reads: 2,043
Approved this February by the Internet Engineering Task Force (IETF), HTTP/2 is the first major update to HTTP since 1999, when HTTP/1.1 was standardized. Designed with performance in mind, one of the biggest goals of HTTP/2 implementation is to decrease latency while maintaining a high-level compatibility with HTTP/1.1. Though not all testing activities will be impacted by the new protocol, it's important for testers to be aware of any changes moving forward.
Jul. 30, 2015 11:30 AM EDT Reads: 155
[video] An Interview with @ProfitBricksUSA CEO @AchimWeiss | @CloudExpo #DevOps #Docker #Containers #Microservices
"ProfitBricks was founded in 2010 and we are the painless cloud - and we are also the Infrastructure as a Service 2.0 company," noted Achim Weiss, Chief Executive Officer and Co-Founder of ProfitBricks, in this SYS-CON.tv interview at 16th Cloud Expo, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 30, 2015 11:15 AM EDT Reads: 1,116
You often hear the two titles of "DevOps" and "Immutable Infrastructure" used independently. In his session at DevOps Summit, John Willis, Technical Evangelist for Docker, covered the union between the two topics and why this is important. He provided an overview of Immutable Infrastructure then showed how an Immutable Continuous Delivery pipeline can be applied as a best practice for "DevOps." He ended the session with some interesting case study examples.
Jul. 30, 2015 10:15 AM EDT Reads: 157
The Internet of Things. Cloud. Big Data. Real-Time Analytics. To those who do not quite understand what these phrases mean (and let’s be honest, that’s likely to be a large portion of the world), words like “IoT” and “Big Data” are just buzzwords. The truth is, the Internet of Things encompasses much more than jargon and predictions of connected devices. According to Parker Trewin, Senior Director of Content and Communications of Aria Systems, “IoT is big news because it ups the ante: Reach out ...
Jul. 30, 2015 06:00 AM EDT Reads: 392
[video] Logging and Monitoring with @Sematext Founder @OtisG | @DevOpsSummit #DevOps #Logging #Monitoring
"We got started as search consultants. On the services side of the business we have help organizations save time and save money when they hit issues that everyone more or less hits when their data grows," noted Otis Gospodnetić, Founder of Sematext, in this SYS-CON.tv interview at @DevOpsSummit, held June 9-11, 2015, at the Javits Center in New York City.
Jul. 29, 2015 11:45 PM EDT Reads: 1,029
Modern DevOps Tool Kit By @Logentries and @NewRelic | @DevOpsSummit #DevOps #Containers #Microservices
Auto-scaling environments, micro-service architectures and globally-distributed teams are just three common examples of why organizations today need automation and interoperability more than ever. But is interoperability something we simply start doing, or does it require a reexamination of our processes? And can we really improve our processes without first making interoperability a requirement for how we choose our tools?
Jul. 29, 2015 07:15 PM EDT Reads: 396
Where the Network Got Invited to the Party By @LMacVittie | @DevOpsSummit #DevOps #Docker #Containers #Microservices
At DevOps Summit NY there’s been a whole lot of talk about not just DevOps, but containers, IoT, and microservices. Sessions focused not just on the cultural shift needed to grow at scale with a DevOps approach, but also made sure to include the network ”plumbing” needed to ensure success as applications decompose into the microservice architectures enabling rapid growth and support for the Internet of (Every)Things.
Jul. 29, 2015 06:15 PM EDT Reads: 1,751
How do you securely enable access to your applications in AWS without exposing any attack surfaces? The answer is usually very complicated because application environments morph over time in response to growing requirements from your employee base, your partners and your customers. In his session at @DevOpsSummit, Haseeb Budhani, CEO and Co-founder of Soha, shared five common approaches that DevOps teams follow to secure access to applications deployed in AWS, Azure, etc., and the friction an...
Jul. 29, 2015 04:30 PM EDT Reads: 510
Take the Long View with Digital Transformation By @IoT2040 | @ThingsExpo #IoT #M2M #API #Microservices #InternetOfThings
Digital Transformation is the ultimate goal of cloud computing and related initiatives. The phrase is certainly not a precise one, and as subject to hand-waving and distortion as any high-falutin' terminology in the world of information technology. Yet it is an excellent choice of words to describe what enterprise IT—and by extension, organizations in general—should be working to achieve. Digital Transformation means: handling all the data types being found and created in the organizat...
Jul. 29, 2015 04:00 PM EDT Reads: 1,076
This week, I joined SOASTA as Senior Vice President of Performance Analytics. Given my background in cloud computing and distributed systems operations — you may have read my blogs on CNET or GigaOm — this may surprise you, but I want to explain why this is the perfect time to take on this opportunity with this team. In fact, that’s probably the best way to break this down. To explain why I’d leave the world of infrastructure and code for the world of data and analytics, let’s explore the timing...
Jul. 29, 2015 03:45 PM EDT Reads: 363