NodeFly Buzz: Paul Bouchon’s Holler.js
NodeFly’s passions? Monitoring your product from the start and spreading the Node.js love. And part of spreading the love is sharing fun, cool and innovative uses of Node.js.
Holler.js by Paul Bouchon is a real-time notification service. It’s distributed as a Node module with client-side code that builds on alertifyjs. As for Paul himself, we think his own description of himself will help you understand him better:
“I'm extremely impatient and I need to see results fast, so I've always enjoyed the fast-as-heck development cycle of the coding for the web. I'm honored to be part of the amazing SitePen team, where I get to work on cool projects every day that help push the Open Web forward. Previously, I spent three years in the Emerging Internet Technologies group at IBM, focusing solely on front-end R&D. I was a core developer on the Open Cooperative Web project, and I've authored various projects around the web in addition to Holler.js, most recently Ditto, a web-based AMD package analyzer on dojotoolkit.org, and Gitgraph, which provides simple GitHub-style participation graphs with JavaScript.”
Now that we’ve been introduced, let’s dig in and find out all about Holler.js.
NodeFly: Can you tell us about the origins of Holler.js?
Paul Bouchon: Holler.js started as a late night experiment with Node.js and cometD. I was working on a website that relied very heavily on user input and live data, so I thought it made sense to implement a real-time alerting system. Pushing stuff from server to client has been done for a long time, so I knew it was most definitely possible; it was just a matter of putting the pieces together in a way that was sane and minimal.
NodeFly: What made you decide to create this using Node.js? What's your background with Node.js?
Paul Bouchon: I've worked with the Bayeux protocol in the past as a developer on the Open Cooperative Web project, so I was definitely predisposed in favor of cometD. I'd been using Node.js as my go-to web server more and more; its speed, simplicity, and package management make it the perfect server for my needs, and its community is as active as ever.
Still, I hadn't really used Node for anything more than routing and rendering templates, and I was eager to do so. After digging around the interwebs, I was happy to see such actively maintained and mature projects as Faye. It was distributed as an npm package, and I was already using Alertify locally on the site in question - Node was a no-brainer for Holler.js.
NodeFly: In addition to using Node.js, you built Holler.js with Faye and Alertify. Any challenges making all of them play nicely together?
Paul Bouchon: Things tend to be easy when you stand on the shoulders of giants. Faye is a powerful publish-subscribe messaging system based on the Bayeux protocol. There are other alternatives, but Faye does an exceptional job at two things: connection management and being darn simple to set up. Using its pub-sub API provided a direct channel through which I could blast any messages I wanted from server to client.
Alertify is a great project that Holler.js uses as its notification system, and it couldn't have been easier to tie into the subscription flow used by Faye. I pipe all notification messages through a single channel to keep the footprint minimal, and Alertify's sexy aesthetics and small API surface only made the implementation simpler. All in all, due to the solid architecture of both projects, there wasn't any challenge in getting Faye and Alertify to play nicely together.
NodeFly: What are some ways users can take advantage of Holler.js?
Paul Bouchon: Holler.js can be used to issue different flavors of alerts to an app's users in real-time. For example, if I know I'll be bringing an app offline for a few hours, I'll let all users currently using the app know about this upcoming downtime. And I can do so instantly with a single command from the command line. Much of the Alertify API is exposed through Holler.js, so developers have high control over the behavior of each notification sent.
Many web apps no longer require frequent page refreshes, so users may not see a newly-deployed, hardcoded notification in a timely manner. Many Holler.js users have told me that they combine Holler with such hardcoded alerts - they will send out a real-time alert, notifying all live users of some pertinent information, and then deploy an updated page with a hardcoded version of the same alert, to catch all future app visitors. Holler can also be used to refresh or redirect the current page of a web app for all live users, making it a handy admin tool. When you deploy new code, you can use Holler to easily force a refresh for all live users so they stay up-to-date with the latest version of your app.
NodeFly: Have you received any feedback from users?
Paul Bouchon: That's definitely the coolest part about OSS, hearing about real people using a project you helped create. I've gotten nothing but helpful, constructive feedback about Holler. Users have helped me simplify its usage and distribution more than I originally thought to be possible, and they seem to really enjoy using Holler in their own projects.
NodeFly: Anything else cooking for you in the Node.js realm?
Paul Bouchon: Lately I've become a sucker for hacking the AR Drone with Node.js, using the awesome projects developed by the @nodecopter team as a foundation. I've been working on a small library that allows developers to map voice commands to specific Drone movements, essentially allowing for a (very, very basic) voice-controlled, Node.js-powered Drone. It’s definitely alpha at this point, but I plan to make this public soon.
NodeFly: Thanks, Paul! We appreciate your time and wish you all the best with Holler.js and everything else you have planned!
Do you know of a Node.js company or project that everyone should know about? If there is something you think we should profile, email us at [email protected]!