Wafting bits in your general direction

Realtime multicasting over HTTP/XMPP

Posted by justin on September 3rd, 2012 — Filed under Fanout (Permalink)

Push is hard. Often, implementing realtime push in a website or other service means having to use unfamiliar software or frameworks. If it isn’t an XMPP server with BOSH, then it’s an esoteric HTTP server like Node.js or Tornado. Further, while the knowledge and tools necessary for load balancing a traditional web service are commonly found these days, scaling out and operating a push architecture is less straightforward. The interactions between server nodes are different. The traffic patterns are different. Even if you’ve got a handle on whatever particular approach for push you’re using today, do you know how you’ll scale it tomorrow?

Fanout is a new cloud service that makes implementing realtime push a heck of a lot easier. Simply use the Fanout API to publish messages to interested subscribers and let the Fanout cloud handle the complexity of maintaining client connections, pushing messages, and all operational and scaling concerns. What makes Fanout different from similar solutions is that it supports pushing data over a variety of transports, and it allows you to do so in a format-agnostic fashion. Below is a list of the supported transports and the payload customizability of each:

  • HTTP long-polling: accept any kind of request, and you specify the response code, status, headers, and body.
  • HTTP streaming: accept any kind of request, and you specify the initial response code, status, headers, and then a series of body payloads to be appended.
  • XMPP stanzas: you specify the entire XML stanza.
  • Webhooks: you specify the HTTP verb, path, headers, and optional body. Any HTTP response is ignored.

This kind of transport versatility is one of our founding principles. Fanout does not expose a proprietary protocol to those who consume the service unless you want it to. It can be made to expose your protocol. Or a standard protocol. Want to transmit Atom? JSON Activity Streams? How about some raw binary? All are possible. This versatility means you can migrate any existing service to Fanout, without third party consumers even noticing you made the switch. It also means that if you’re not satisfied with the Fanout service, you can migrate away. It’s your protocol, after all. No vendor lock-in here!

That said, there is also the FPP (Fanout Pubsub Protocol) transport, which is a proprietary HTTP-based protocol meant to be interfaced with Fanout’s corresponding JavaScript library. This transport pushes JSON payloads only, and is intended for developers who want to build a website quickly and do not care so much about what the protocol to the server actually looks like. The code snippet on our homepage showcases the usage of this transport.

Fanout was born out of my experience working as CTO of Livefyre. The rapid growth of our commenting platform made scaling out quite a struggle, particularly when it came to the realtime features. We debated about working with a cloud push service, but the problem is they all had proprietary protocols or required us to use their JavaScript libraries (an outrageous requirement to have, given that our public API was not browser-specific). Ultimately we considered the transition costs and potential lock-in to be dealbreakers. When I left Livefyre in late 2011, I set out to build the cloud push service that didn’t yet exist: the one that I would have been able to choose with confidence. Fanout is that service.

Fanout is currently in private beta, and free for low volume users who sign up early. If you are building a website, REST API, app, or other service, and are interested in learning more about how Fanout could bring joy to your life, let us know at info@fanout.io and be sure to visit our homepage and sign up for the beta.

Liked this post? Follow this blog to get more. 

1 comments
ben
ben moderator

Congratulations! Can't wait to try this out!

Trackbacks

  1. […] Realtime multicasting over HTTP/XMPP […]

  2. […] encore lui, a annoncé Fanout.io, un service de multicast sur HTTP et XMPP. Il en parle un peu plus en détail dans un article […]