Scheduling Is Harder Than It Looks

Bilal Hussain June 24, 2026 8 min read
An hourglass standing on a bed of pebbles

Appointment booking is the classic underestimated feature. It looks like a form and an insert. Teams routinely quote it in days, and then spend the following month on the parts nobody wrote down.

The difficulty is not the booking. It is that a calendar is shared, mutable state being edited concurrently by people and systems that cannot see each other, across time zones, with a clock that occasionally skips an hour.

Store the intent, not just the instant

The standard advice is to store timestamps in UTC and convert for display. This is correct for events that have already happened and quietly wrong for some events in the future.

A clinic that opens at nine in the morning opens at nine after the clocks change, not at the UTC instant that used to be nine. If you store only the instant, every recurring appointment shifts by an hour twice a year. Recurring rules need the wall-clock time and the time zone name preserved alongside the resolved instant, so the series can be recomputed when the rules change — and time zone rules do change, by government decision, at short notice.

Double-booking is a concurrency problem

Checking whether a slot is free and then writing the booking is two operations, and two users can interleave them. Under light load you may never see it; on the morning a campaign goes out, you will see it repeatedly.

This needs a real constraint — an exclusion constraint on the time range in the database, or a transaction with the appropriate isolation level. It does not need a longer check-then-write, because there is no length of gap that closes the race. Availability shown in the interface is a hint; the database is the arbiter.

Availability in the UI is a suggestion. The only thing that decides whether a slot is free is the write that takes it.

Syncing with calendars you do not control

The moment you synchronise with Google Calendar or Outlook, you have adopted someone else's data model, someone else's rate limits, and someone else's opinion about what a recurring event is. Both are well documented and neither behaves quite like the other.

  • Sync incrementally with the providers' change tokens. Re-reading whole calendars will exhaust your quota and still miss edits made while you were reading.
  • Expect to receive your own writes back as external changes. Tag events you created, or you will build an echo that never settles.
  • Decide what wins before you need to know. When both sides changed the same event, silence is not a policy.
  • Treat webhooks as unreliable. They are delivered at least once, sometimes late, occasionally not at all — reconcile on a schedule regardless.
  • Handle disconnection as a normal state. Tokens are revoked, passwords change, people leave. The queue must drain safely, not pile up.

Budget for it honestly

None of this is exotic, and all of it is work. A booking feature that handles concurrency, recurrence, time zones and two-way sync with an external calendar is a small product in its own right, not a form. Quoting it as a form is how these projects end up late, and the client is rarely the one who was wrong about the scope.

CalendarsAPIsNode.jsIntegrations
Share:

Recent posts

View all articles
Stacks of paper files piled on an office desk01
Engineering

What It Actually Takes to Read an Invoice with AI

A demo that reads one clean invoice takes an afternoon. A system that reads the invoices a real business receives takes considerably longer, and the gap is where most projects stall.

August 26, 2026 · 8 min readRead more
Server racks threaded with orange and blue network cabling02
Cloud

Multi-Tenant on Day One, or Not at All

Retrofitting tenant isolation into a system that assumed one customer is one of the most expensive migrations in software. Here is how to avoid needing it.

August 5, 2026 · 7 min readRead more
Hand arranging screen wireframes pinned to a whiteboard03
Process

What a Workflow Engine Is Actually For

Workflow engines are frequently introduced to solve a problem the team does not have, and skipped by the teams that do have it. The difference is who needs to read the process.

July 15, 2026 · 7 min readRead more
Contact

Let’s Build
Something Solid

Tell us what you’re trying to ship. We’ll come back within one business day with a plan, a timeline and an honest estimate.

Pakistan office
Opposite Agriculture College, Abu Dhabi RoadAbbas Plaza, C-1 Sadiq TownRahim Yar Khan, 64200Punjab, Pakistan
United Kingdom office
3/0, 2 Sibbald StreetDundee, DD3 7JAScotland, UK

Fill this form below

We reply within one business day.