Skip to content
echogeco
Connectors · Building your own

A connector for a system with no webhooks

Design a polling connector for a tool with no webhooks: interval, cursor, overlap, deletes and alarms, with the interval defended in requests.

designhardExercise · 3 min · 40 of 75
On this page

Without webhooks, every property a connector needs has to be built from one list endpoint and a clock. The design either fits inside a shared limit of 20 requests a minute, or it takes the time-tracker sync down with it.

The situation

The agency's project-management tool has a REST API and no webhooks. It holds 6,000 tasks, 1,500 of them on active projects, and about 400 change on a working day. The list endpoint returns 100 tasks a page, filters by updated_since to the second, and sorts by updated_at. Each task carries an integer version. A deleted task simply stops appearing. The limit is 20 requests a minute per account, and the time-tracker sync already uses up to 8.

The automation: when a task moves to "ready for client review", the model drafts a short update for the client from the task's notes, and an account manager approves it before it is sent. The account managers want each draft within 10 minutes. A missed task is a client update nobody sends. A duplicated one is two drafts in the queue and, if both are approved, two emails to the client. The lesson is webhooks versus polling.

The question

Design the connector: what it polls and how often, the cursor it keeps, and how it handles duplicates, deletes, the limit and alarms. Defend the interval with the arithmetic.

A strong answer · Rubric · Where answers go wrong

Write your answer first, then open