Dropbox adopts webhooks

Patricio Robles
May. 17 2014, 05:30PM EDT

The latest major service to join the webhooks ranks is Dropbox. The file hosting service, which has built a billion-dollar business on the back of solving the problem of file synchronization, last week announced that it has added webhooks functionality.

With webhooks, application developers can configure Dropbox to notify their apps whenever their app's registered users perform an action that results in a file change. For instance, an app can be notified when a file is added to Dropbox so that it can perform an action on the newly-added file. As with many webhooks implementations, Dropbox's notifications are sent as JSON-formatted HTTP post requests.

Before launching webhooks support publicly, Dropbox beta tested webhooks with a number of companies. Two of them, Picturelife and Slack, noted that webhooks will reduce the amount of API calls they need to make, simplifying their application architectures and reducing their infrastructure needs. According to Picturelife's CEO Nate Westheimer, "Our backend sync services now get to work smarter, not harder. Rather than constantly making thousands of requests, polling for changes, we get to sit back and wait for users to make changes, and then only make the requests we need."

Simplicity drives adoption

REST APIs have taken over the world, but they're not perfect. With more and more companies relying on APIs, and with more and more APIs serving up time-sensitive data, some of it intended for real-time consumption, making sure that API consumers can quickly and efficiently obtain the data they need is crucial. Take, for instance, scenarios in which an API consumer has a need to be notified when data changes or an event occurs. The simplest approach to dealing with such use cases is to periodically poll the API, but this is far from perfect and can be downright problematic in some cases for obvious reasons.

Fortunately, a simple solution, dubbed webhooks, was conceived in 2008. Since then, webhooks, which are HTTP callbacks, have grown in popularity and a number of services with API offerings employ them. For instance, email delivery provider Sendgrid allows applications to be notified about email delivery events using webhooks.

Webhooks are by no means the only solution. WebSockets is a viable approach for certain kinds of applications, and prior to its webhooks support, Dropbox offered a long-poll endpoint for file notifications. But webhooks, which replaces pull with push altogether, looks like it will likely continue to grow in popularity because of its simplicity. As Myles Grant, an engineer at Dropbox webhooks beta tester Slack, revealed, "Dropbox webhooks only took a weekend to implement."

In a day in age when developer time is so valuable and companies frequently integrate their services with multiple API providers, the simplest solutions are often destined to become the most popular. And by that measure, webhooks may be hard to beat.

Patricio Robles Follow me on Google+

Comments