Lesson 2.4Lesson 2.4 · Connectivity & Protocols
Edge, Cloud & Gateways
Where the computing happens - on-site at the edge, or up in the cloud - and the gateway in between
Every reading faces a fork in the road: compute it here, on-site in milliseconds, or ship it to the cloud with its limitless memory and models. Most buildings need both.
We can now sense, connect and speak protocols. One question remains before the data becomes a platform and a twin: where does the computing actually happen? A building generates a firehose of readings, and every one faces a choice - process it locally, on-site, at the edge, or send it up to the cloud.
This is not a fashion war; it is a genuine engineering trade-off across latency, resilience, bandwidth, cost and privacy, and the mature answer is almost always both, in a hybrid split. Sitting on the boundary is the humble, essential gateway - translating protocols, buffering data when the link drops, and deciding what to handle on-site versus what to forward. Get this layer right and your twin is fast, resilient and affordable; get it wrong and it is laggy, fragile and expensive.
Edge = fast/critical/private. Cloud = heavy/historical. Gateway = translate + buffer + guard. Hybrid twin wins.
Two places to compute: edge and cloud
Cloud computing means sending data off-site to large, shared data centres - effectively limitless storage, powerful processors, heavy analytics and machine-learning models, all managed for you and reachable from anywhere. It is where big historians, cross-portfolio analytics and elaborate digital twins comfortably live, because you can rent as much compute and memory as you need.
Edge computing means doing the work on or near the building itself, on local devices - gateways, edge servers, smart controllers - close to where the data is born. Instead of shipping every raw reading away, the edge can filter, aggregate, run control logic and react locally, in milliseconds, without a round-trip to a distant data centre.
Neither is simply better. The cloud gives you scale, durability and advanced analytics but adds distance - latency, dependence on your internet link, ongoing bandwidth and subscription cost, and the privacy questions of data leaving the premises. The edge gives you speed, autonomy and data minimisation but is constrained in compute, memory and manageability. The real art of building-data architecture is deciding, job by job, which work belongs where - and the next sections give you the criteria.
It helps to picture a continuum rather than two boxes. At one end sits the device itself, which can do a little processing; next the on-site gateway or edge server; then perhaps a regional server; and finally the cloud. Work can land anywhere along that line, and often the same data is handled at several points - filtered at the edge, summarised at a gateway, analysed in the cloud. This spread-out arrangement is sometimes called fog computing, and it is the shape most serious building systems actually take.
The trade-offs that decide the split
Five factors govern where a given job should run.
Latency. Anything needing an instant response - a control loop, a safety interlock, occupancy-driven lighting - should run at the edge, because a cloud round-trip of even a fraction of a second is too slow and too dependent on a healthy link. Slow analytics - daily energy trends, benchmarking - are happy in the cloud.
Resilience. If the internet drops, an edge system keeps controlling the building; a cloud-only system may go blind or dumb. Critical control should never hang on an external connection, so it belongs at the edge (or in the BMS).
Bandwidth and cost. Streaming every raw reading to the cloud is expensive and often wasteful. The edge can aggregate and filter - send a summary, or only exceptions - cutting both bandwidth and cloud cost dramatically.
Privacy and security. Some data is sensitive - camera feeds, occupancy that reveals individual behaviour. Processing it at the edge and sending only anonymised results keeps raw personal data on-site, reducing exposure. Connected buildings carry real cyber and privacy risk; treat statutory and security sign-off as work for qualified professionals.
Scale and advanced analytics. Training machine-learning models, storing years of history, comparing a whole portfolio - these want the cloud's near-limitless resources. The pattern that falls out is clear: fast, critical, sensitive, high-volume work at the edge; heavy, historical, cross-site intelligence in the cloud.
There is also a cost dimension that is easy to overlook. Cloud services usually charge for ingest, storage and egress, so a building that naively streams every raw reading can run up a surprising monthly bill for data it never looks at. Doing the reduction at the edge - averaging, thresholding, sending only changes or exceptions - is often the single biggest lever on both bandwidth and running cost. The edge is not just faster; frequently it is cheaper, precisely because it lets you send less.
Edge = fast, critical, sensitive, filter. Cloud = heavy, historical, cross-site, ML. Split the work, do not pick a side.
The gateway: translator, buffer and bridge
The device that makes the edge real is the gateway - the workhorse on the boundary between the building and the wider network, and the connective tissue of this whole module. A building or IoT gateway does several jobs at once.
It is a translator: as we saw with protocols, it converts BACnet, Modbus, KNX, LoRaWAN and Zigbee into a common form - very often normalising everything into MQTT/JSON for the platform and twin, so the messy multi-protocol reality below becomes one clean stream above.
It is a buffer: when the internet link drops - and it will - a good gateway keeps collecting and stores data locally, then forwards it when the connection returns, so no readings are lost during an outage. This store-and-forward behaviour is quietly essential to a trustworthy historian and twin.
It is an edge processor: it can filter, aggregate, run local rules or light analytics, and even execute control loops on-site, deciding what to handle locally and what to send up. And it is a security boundary, the controlled point where the segmented building (OT) network meets the outside world. A well-designed gateway is why a building can be both locally autonomous and globally connected at once.
Gateways come in many sizes, from a small protocol converter doing one translation to a rugged industrial edge computer running containers of analytics and control. The right one depends on how much you intend to push to the edge. What they share is a position of trust: because a gateway can see and shape the whole data stream, it is also a prime target, so it must be hardened, patched and monitored like the critical infrastructure it is - again, work for qualified security professionals, not an afterthought bolted on at handover.
Hybrid architectures and a worked example
Because each layer has a distinct strength, real systems are hybrid - sometimes called fog computing, spreading work across a continuum from device to edge to cloud. Consider a smart office again.
At the edge, gateways run the fast, local and sensitive work: an occupancy-driven lighting loop reacts in milliseconds without any cloud call; camera feeds are processed on-site to a simple people-count so raw footage never leaves the building; and if the internet drops, comfort and lighting keep running while the gateway buffers every reading. Meanwhile the gateway forwards a filtered, summarised stream to the cloud, where a long-term historian keeps years of data, machine-learning models predict equipment failures across the whole portfolio, and the rich, comparative digital twin lives - reachable by the facilities team from anywhere.
The result is the best of both: instant, resilient, private control on-site; deep, durable, cross-building intelligence in the cloud; and a gateway stitching them together. For a twin this is decisive - a purely cloud twin is fragile and laggy, a purely edge twin cannot see the big picture, but a hybrid gives you a twin that is both responsive and wise. That balance, drawn deliberately, is the last piece of the connectivity puzzle before we turn, in Module 3, to the BMS that actually runs the plant.
A final caution keeps the hype in check. Vendors sell both extremes hard - some pushing an all-cloud platform, others an all-edge appliance - and both pitches over-simplify. The right split is a judgement about your building: its criticality, its connectivity, its privacy obligations and its budget. Ask of any product where each workload actually runs, what happens when the internet drops, and who can see the raw data. If those answers are vague, then the architecture is not yet real - and a twin built on a vague, hand-waved architecture will always disappoint in operation.
Fog = device -> edge -> cloud continuum. Hybrid twin: responsive at the edge, wise in the cloud.
Edge computing
Processing on or near the building
Low latency, resilient to internet loss, keeps sensitive data local; constrained in compute and storage. For fast, critical, private work.
Cloud computing
Off-site, scalable data centres
Near-limitless storage and analytics, reachable anywhere; adds latency, link dependence, cost and privacy questions. For heavy, historical work.
IoT / building gateway
Translator, buffer and security bridge
Converts protocols (often to MQTT/JSON), stores-and-forwards across outages, runs edge logic, and guards the OT boundary.
Hybrid / fog architecture
A device-edge-cloud continuum
Spreads work by where it best runs; the standard shape for a responsive yet intelligent digital twin. Defer security sign-off to specialists.
Workshop — decide edge or cloud for real jobs
The core skill here is judgement: placing each workload where it belongs. This exercise makes you do exactly that for a realistic smart building, using the five trade-off factors as your rubric.
A notebook or spreadsheet. No hardware required - this is a design-judgement exercise.
Goal: practise splitting workloads across edge and cloud Inputs: the workload list below (or a building you know) and a notebook Time: ~30 minutes
- 1List 6-8 real workloads for a smart office: e.g. occupancy-driven lighting control, daily energy benchmarking, camera-based people counting, chiller fault prediction, live comfort dashboard, long-term data archive, safety interlock.
- 2For each, score the five factors: does it need low latency? Must it survive an internet outage? Is it high-volume or bandwidth-heavy? Is the data privacy-sensitive? Does it need heavy compute or long history?
- 3Assign each workload to edge, cloud, or both, and write one sentence justifying the placement from your scores.
- 4Draw the gateway in the middle and note what it translates (which protocols), what it buffers, and which workloads it runs locally.
- 5Sketch the failure case: the internet link drops for an hour. Mark what keeps working (edge), what pauses (cloud), and how the gateway's store-and-forward prevents data loss.
You’ll walk away with
A one-page table placing each workload at edge, cloud or both with a justification, plus a diagram showing the gateway's translation and buffering and what survives an internet outage.
Three altitudes on the same idea
Read the band that fits you — or all three.
The edge is physical: it needs somewhere to live. Edge servers and gateways want rack or closet space, power, cooling and network drops, ideally co-located with the BMS and communications closets. Designing these in - along with a robust internet path and its backup - means a building can process locally and connect globally without a scramble for space later. The edge/cloud split is partly an architectural provision.
Edge computing is why smart interiors feel instant and stay private. Occupancy-driven lighting and comfort that respond in milliseconds do so because the logic runs locally, not via a distant server - and processing occupancy or camera data on-site, sending only anonymised counts, protects the people using the space. Understanding this lets you promise responsiveness and privacy as genuine, designed features.
Edge-versus-cloud is a defining skill of modern systems design, well beyond buildings. Knowing how to place work across the device-edge-cloud continuum by weighing latency, resilience, bandwidth, cost and privacy - and how gateways translate and buffer - transfers straight into IoT, data engineering and proptech roles. It is conceptual, learnable now, and exactly the systems judgement employers are short of.
“The cloud is the modern way, so a smart building should send everything to the cloud and process it there.”
Do it yourself
Reason it through - no kit required.
- 1Name the five factors that decide whether a job runs at the edge or in the cloud.
- 2Give one workload that must run at the edge and explain why.
- 3Why does streaming every raw reading to the cloud often waste money and bandwidth?
- 4List the three main jobs a gateway performs.
- 5Why is a purely cloud digital twin fragile compared with a hybrid one?
The one line to carry out
Peer-reviewed journals & authoritative standards
- 01Edge computing — Wikipedia, 2026.
- 02Internet of things — Wikipedia, 2026.
- 03Data lake — Wikipedia, 2026.
- 04Time series database — Wikipedia, 2026.
That completes the connectivity module: networks, building protocols, IoT protocols, and where the computing lives. Data can now flow reliably from any device to a platform and a twin. In Module 3 we turn to the system that has been quietly running the plant all along - the building management system.
The author
Amogh N P
Architect, interior designer, and creative polymath. Studio Matrx began in his notebooks — his vision of design made honest, useful, and open to everyone. Its Academy is written and taught in his memory, and free, forever.
More about Amogh →