Its primitive API enables scheduling for the internet, and its client is a masterpiece of restraint.

How Google Calendar works, and what we can learn from it as engineers.

Architecture


Frontend framework: None (!). Just a few in-house libraries for things like authentication and shared utils.

Frontend Styling: CSS classnames, invoked by JS.

Frontend Storage: Cache Storage, IndexedDB (offline mode), CDN (images & fonts).

API Storage: Spanner DB.

External APIs: Google Meet, Google Contacts, Google Auth.

Services: heartbeat, eventing, notifications.

Other: An in-house compiler that makes JS download and run faster.

Interesting Problems


Sure, a calendar is one big CRUD app. But don’t let that fool you — there were plenty of demanding technical problems that had to be solved.

Calendar API

HTML layout

Yes, structuring HTML can actually be interesting! Since the calendar views are rich with content, big performance issues occur if elements aren’t isolated.

Here are the most important HTML layers:

Frontend Algorithms

Each calendar client has a few juicy algorithms

See the Compass repo for our full implementation of these algos.

Services

These are the external workhorses that allow the client code to stay simple and reliable

[

Takeaways


Building a global-scale CRUD app might look straightforward from the architecture diagram, but that simplicity still demands a high level of execution.

Given the scale demands, you can make life easier for yourself by simply not doing things.

Much like in life, it pays to know thyself when shipping product.

Google Calendar isn’t trying to be the modern app that executive assistants use to schedule 40 meetings a day (That’s what Vimcal is for).

Google Calendar aims to be a simple app that any one of its 2 billion users can operate without hand-holding. It scores 88/100 on accessibility. The UI doesn’t change. It doesn’t go down, and it has offline support if it does.

It just works.

That’s plenty.


To get these deep dives in your inbox, subscribe to my newsletter, Fullstack Engineer.