Breaking Down The Salesforce Streaming API

When you search for streaming API on Google, Salesforce dominates the landscape with its Salesforce Streaming API. Since SalesForce is technically a competitor of, but also because we augment, compliment, and help build on what SalesForce already does, we thought we’d take some time to profile what the SalesForce Streaming API delivers. To help better understand what is possible with their streaming API, and help us get better at shining a light on where the proxy, and SalesForce connectors, can take your usage of the platform to the next level, we would like to get to know the SalesForce Streaming API better.

The SalesForce Streaming API employs CometD enabling the streaming of events that are defined as PushTopics using what is called a SOQL query. CometD, “leverages WebSocket when it can (because it’s the most efficient web messaging protocol), and makes use of an Ajax push technology pattern known as Comet when using HTTP.” Allowing for anything that happens via SalesForce to be defined by a PushTopic, and delivered as an event in real-time via the SalesForce Streaming API. Turning anything that happens via SalesForce into a stream, that is subscribe-able via any topic defined by a PushTopic.

Breaking Down The Salesforce Streaming APISalesForce developers can craft a Pushtopic using a custom SOQL definition, which defines a particular channel. Clients can then subscribe to these channels, and when any object as defined by the Pushtopic is created, updated, deleted, or undeleted, and even is triggered. If the details of the change meets the rules defined in the PushTopic query, a notification is generated, and sent out to each subscribing client via a long-running HTTP or Websocket stream—depending on the scenario. Overlaying an event-driven architecture across the entire SalesForce platform, allowing all clients to respond to events, and not just making requests.

The reasons you want to use the SalesForce Streaming API are in alignment with why you’d use Reducing client polling on APIs, and allowing them to respond to common events in real-time, keeping the interface up to date, and machine learning models with SalesForce Einstein always learning. One interesting thing we learned about the SalesForce Streaming API that goes beyond what delivers is around the concept of message reliability, and the ability to replay past events, as well as the idea of message durability, which saves events for 24 hours, allowing for the retrieval and replay of messages within recent history. Adding some interesting features that go beyond what focuses on with streaming of existing web APIs.

“We are the solution for streaming all web APIs you consume into your SalesForce infrastructure” isn’t looking to compete directly with, or replace existing streaming solutions like the SalesForce Streaming API. We are just looking to understand how they work, quantify the value they bring to the table, and understand how we can augment, extend, and work with existing streaming API solutions. The SalesForce Streaming API provides a robust approach to augmenting the SalesForce platform with event-driven architecture—we don’t see as a replacement for this. However, we are the solution for streaming all web APIs you consume into your SalesForce infrastructure, being your plug and play, ready to go, event-driven architecture for any API platform you depend upon.

The SalesForce Streaming API demonstrates the potential of embracing an event-driven approach to operating a platform. SalesForce is one of the original API pioneers, and we feel their approach to adopting an event-driven layer to their existing API platform represents the future for all API providers. It reflects why we are doing, and we are hoping to become the API service provider that can help proxy, and augment your own infrastructure, without all the investment it takes to develop and operate your own event-driven architecture. Keeping you in sync with where leading API providers like SalesForce are going, without having to become a streaming API specialist—leaving the hard work to us.

A Modern API Toolbox

**Original source: blog