High-performance messaging service for PaaS and web applications

Today we live in a fast-paced world. The ability to monitor and timely react to important events is crucial. Implementing those capabilities for your business/web applications can be truly challenging, especially when you develop applications on PaaS platforms like ServiceNow, Salesforce and Appian.

Just take a very simple use-case that all of us facing every day — an important event occurs (security alert, critical approval request etc.) and we need immediately display in-app notification for online users:

Well, this kind of interactive real-time communication simply not supported by some of the PaaS platforms and web applications. That is because it requires a specific technical capability when a client (browser) keeps a persistent connection with a server and listens to server-sent events.

We’ve built that capability for ServiceNow platform about a year ago, and today we re-invented it to make it much more scalable, powerful, and cloud platform independent:

  1. It works with any PaaS (ServiceNow, Salesforce, Appian etc.) and web applications
  2. 10K online concurrent users and thousands of messages supported out of the box
  3. Integration can be complete in 2 minutes

More details you can find at https://buzzpost.io, and below I will show how easily you can integrate in-app messaging service into your application.

How it works

buzzPost is a messaging hub that routes real-time messages within one or across multiple systems and applications.

Online users (clients) subscribe and listen to particular channels where publishers post messages:

It may be used just for one single app/system, where online users (web clients) will be listening for its server-sent messages(events):

The service can also route messages across multiple platforms and apps, e.g. online ServiceNow users can subscribe for real-time events from other web apps and external systems:

Integration (2 minutes)

It is literally that simple.

All you need is to have access to a message broker — a server, which routes your messages to connected online users. We try to keep a few public servers up and running for testing and demo purposes, so all of the examples with hub11.dev-labs.io should still work if you try them in your app/browser.

Step #1 — subscribe to a channel

Clients (web browsers) can subscribe using standard browser EventSource API. You just need to provide a broker server name (e.g. hub11.dev-labs.io) and a comma separate list of channels to subscribe.

Add the following javascript code somewhere in your app — when a web browser loads the code it will start listening for incoming messages on the corresponding channels:

Step #2 — send messages

The cool thing: messages can be sent from anywhere. It might be PaaS, another web app or any other third-party system.

To send a message you just need to send a POST http request to a message broker server with the following JSON payload:

Here is an example that sends “Hello world!” on “alfa” channel (Postman):

This is the code to send a message from a web browser:

Here is a curl code you can run in terminal:

Security

There are multiple authentication options supported:

  • API keys — out-of-the-box option, secures subscribe/post communications.
  • CORS rules
  • on-prem installation
  • private VPC
  • etc.

All examples from above do not have any security in place since hub11.dev-labs.io is a public message broker server. Production and private test/development instances have API keys security enforced.

That was just the first glance at buzzpost.io. In the next post, I’ll show how to integrate it with ServiceNow in just a few lines of code.