From Polling to Push: Marvel’s Webhook Upgrade
Marvel, the London-based prototyping platform, has long offered its users the ability to sync design files from Dropbox directly into their projects. The appeal is obvious: a designer updates a PSD in Photoshop, and that change eventually shows up in the prototype without any manual uploading. Recently, Marvel replaced its older polling-based sync engine with Dropbox’s newer webhook API, cutting down latency, reducing server load, and making the whole experience feel genuinely real-time.
Why Polling Was a Stopgap
The original Marvel sync relied on Dropbox’s delta API. The delta call takes a cursor—essentially a token representing the state of a user’s Dropbox relative to Marvel’s servers—and returns a list of changes since that point, plus a new cursor and a has_more flag when a result set is incomplete.
Marvel’s early implementation was a straightforward three-step loop:
- A user opened a prototype on a device, which triggered an initial page load followed by an AJAX call. That request included a stored cursor from a prior session, acting as the starting point for synchronization.
- Every six seconds, Marvel polled Dropbox for changes. Irrelevant file updates were discarded, but any change to a file linked to a project triggered a pull and sync into that project’s assets.
- Each iteration ended by saving the newest cursor to disk so the next session could resume from that state.
This approach did work, reliably syncing updates within about 20 seconds of a PSD being saved on a user’s desktop. But it carried three significant inefficiencies:
- Every poll opened a synchronous connection from Marvel’s server to Dropbox, holding it for two to three seconds each time. With multiple prototype viewers active, that could tie up a disproportionate number of server connections and degrade the rest of the website.
- Polling only occurred when a user was actively viewing a prototype or when a project was otherwise opened—there was no proactive check for updates while nobody was looking.
- Updates were bundled with the polling cycle and could be batched across files in a project, which was slower and less efficient than addressing changes individually.
Webhooks Replace the Poll Loop
When Dropbox announced webhook support, Marvel saw a path to eliminate the polling overhead altogether. With webhooks, Dropbox calls Marvel’s server the moment a user changes a synced file, sending the user’s Dropbox ID and a ping that a change has happened. Marvel’s service queues that notification, then invokes the delta API with the stored cursor to fetch the specific file changes involved.
The other half of the real-time equation is getting those updates out to the viewing client. Marvel uses Pusher, a London-based WebSockets broadcast service, to maintain a persistent connection to each open prototype channel. When a file sync completes, Marvel pushes a message over Pusher to any clients watching that project. The result is that a designer saving a file in Photoshop only has to wait a few seconds before their change appears on an open device preview.
The upgrade doesn’t just trim network chatter; it lets Marvel deliver on the core promise of real-time prototyping for teams working on tight client deadlines. Syncing design changes automatically, with no code touched and no manual re-upload, turns a previously acceptable 20-second delay into a near-instantaneous link between a designer’s desktop and the client’s device.



