Background Job Results
Imports, exports, payments, and other long-running work often finish while the user is still being redirected. A cache channel keeps the last event, so the browser gets the result as soon as it subscribes, with no polling and no extra key-value store to bridge the gap.
Implementation
// Server: the job finishes, maybe before the browser has subscribed
await apinator.trigger({
name: 'job-finished',
channel: `private-cache-job-${jobId}`,
data: JSON.stringify({ status: 'done', imported: 1200 })
})
// Client, after the redirect: gets the cached result even if the job already finished
const job = client.connect().subscribe(`private-cache-job-${jobId}`)
job.bind('job-finished', (data) => showResult(data))Why Apinator for background job results
Other use cases
Live Chat & Messaging
Build realtime chat experiences with channels, typing indicators, and presence.
Live Notifications & Activity Feeds
Deliver instant notifications and live activity feeds to your users.
Collaborative Editing
Build Google Docs-style collaboration with live cursors and realtime sync.
From the blog
WebSocket Protocol Explained
A practical guide to the WebSocket protocol — how connections are established, how frames are structured, what opcodes do, and what all of this means when you're building realtime apps.
How the WebSocket Handshake Works
The WebSocket connection starts as HTTP and upgrades to a persistent socket. Here's exactly what happens during the handshake — headers, keys, and all.
Presence Channels Explained
Presence channels let you track who's online in real time — showing typing indicators, viewer counts, and live cursors without building your own member tracking.
Ready to build background job results?
Get started in minutes. Completely free, no credit card required.