Skip to content
Custom software

Business software that keeps working when the internet drops: offline-first architecture explained

Saturday night, full house, the internet goes down. With cloud-only software, service stops. Here is how we build systems that never stop.

Team Cloudita

2 min read

Illustrazione: Gestionali che funzionano anche quando salta internet: l'architettura offline-first spiegata

Anyone working in hospitality or at a beach resort knows it: the connection always drops at the worst moment. Saturday night with a full dining room, mid-August with the beach sold out. Software that depends 100% on the internet, at that moment, stops the work.

That is why the systems we build for restaurants follow an offline-first approach: they work locally first, and the network is there to sync, not to survive.

How it works in practice

Take a real case: restaurant software with orders from the waiters’ phones, printers in the kitchen, pizzeria and bar, and a till.

  • The core of the system runs on a computer inside the venue. The waiters’ phones and the printers are on the local network: if the internet drops, the local network does not.
  • A full copy of the software runs on an external server, ready to take over if the venue’s computer fails.
  • The two copies sync automatically at short intervals, every minute.

The hard part: who is right?

Syncing two databases that can both be modified is the delicate part. If a waiter adds a dish while the till is closing the bill, which version wins?

The techniques we use:

  • every record has a universally unique identifier (UUID), generated where it is created: there are never two orders with the same number;
  • every change carries its origin (local or server) and the moment it happened;
  • operations are additive: an order is never deleted, it is cancelled with a movement that stays on record. That way history can always be rebuilt and the numbers always add up.

This approach has a valuable side effect: every euro taken and every cancelled dish stays tracked. At the end of the night the till balances and you always know why.

When you really need it

Not every piece of software has to be offline-first. Software for a professional office can happily live in the cloud. It makes sense when:

  • the work happens on site, with customers waiting;
  • even a ten-minute outage costs money or reputation;
  • there are physical devices to drive, such as printers, cash drawers or displays.

What to ask whoever offers you software

  1. “If the internet goes down, what stops working?”
  2. “If the till computer breaks, how long does it take to get going again?”
  3. “Where is my data and how is it backed up?”

If the answers are vague, dig deeper before signing. If you want ours, write to us.

Let's talk

Got a website, a software project or a security question? A real person will get back to you.

Write to us

Keep reading

All articles

Music: "Tech Corporate Startup Promo With Bright Drive" by Alex Morgan, CC BY 4.0 licence. Satellite imagery Esri, Maxar.