Skip to Content
Getting Started with Mule Cloud Connect
book

Getting Started with Mule Cloud Connect

by Ryan Carter
December 2012
Beginner
138 pages
2h 57m
English
O'Reilly Media, Inc.
Content preview from Getting Started with Mule Cloud Connect

Chapter 5. Real-Time Connectivity

We can all agree that APIs are great. They open up silos to a wealth of data and functionality, but the vast majority of these Web APIs use the HTTP request-response model, requiring the client to make a request to a server and wait for a response in an interactive fashion. This is fine for the majority of our examples so far, such as sending a Tweet, adding a contact, etc. But what about when you actively want to retrieve updates about a particular resource, such as who’s talking about my company on Twitter today? You wouldn’t have someone sitting there issuing a request every 5 minutes would you? No, ideally you want to be notified in a real-time fashion when someone is talking about your company or when something happens to your account.

One traditional solution is polling, whereby a request with your particular search terms is scheduled to periodically call an API, process the response, and then repeat. This results, however, in developers calling these APIs over and over again to get updates, only to find out nothing has changed. This process constantly uses up resources and is not acceptable to either the API consumer or the API provider. If you’re just using Twitter to see what your friends are chatting about, then waiting 30 seconds to a minute to call the API and filter out the duplicate messages might be fine, but if you’re relying on these APIs for sales leads or financial data, then polling just won’t do. This is where “real-time” technologies ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Getting Started with CockroachDB

Getting Started with CockroachDB

Kishen Das Kondabagilu Rajanna
Mule 2: A Developer's Guide

Mule 2: A Developer's Guide

Peter Delia, Antoine Borg, Ricston Ltd.

Publisher Resources

ISBN: 9781449330996Errata PageSupplemental Content