Process data where it's generated. Not everything needs to round-trip to the cloud β and for many IoT workloads, it can't.

You have devices in the field β sensors on factory floors, cameras in warehouses, monitors on agricultural equipment, wearables on patients β generating data that needs to be processed, acted on, and selectively transmitted to the cloud. Latency to a cloud region is too high for real-time decisions. Bandwidth is too expensive or unreliable to stream everything. Devices need to function when the network is down. You need an architecture that distributes intelligence across the edge, fog, and cloud layers based on where each decision needs to be made.
Edge-fog-cloud architecture distributes computation across three tiers. Edge devices collect sensor data and run lightweight inference (anomaly detection, threshold alerts). Fog nodes (on-premise gateways or local servers) aggregate data from multiple edge devices, run more complex models, and manage device fleets. Cloud services handle long-term storage, model training, fleet-wide analytics, and management dashboards. The architecture accounts for intermittent connectivity, device heterogeneity, over-the-air updates, and security at every tier.
Data flows upward through the tiers with intelligence at each layer. Edge devices publish sensor readings to fog nodes via MQTT or CoAP. Fog nodes run stream processing (Apache NiFi, AWS Greengrass, or custom) to filter, aggregate, and enrich data before forwarding to cloud. Cloud ingestion (Kinesis, IoT Core, or Event Hubs) routes data to time-series databases, data lakes, and ML training pipelines. Commands and OTA updates flow downward through the same path. A device shadow/twin system maintains the last-known state of every device for query and reconciliation.

System Architecture Overview
| Layer | Technologies |
|---|---|
| Edge Devices | ESP32, Raspberry Pi, Jetson Nano/Orin, STM32, custom PCBs |
| Protocols | MQTT (Mosquitto, EMQX), CoAP, Modbus, BACnet, LoRaWAN, BLE |
| Fog/Gateway | AWS Greengrass, Azure IoT Edge, Apache NiFi, Docker on industrial PCs |
| Cloud IoT | AWS IoT Core, Azure IoT Hub, GCP IoT, custom MQTT brokers |
| Data | InfluxDB, TimescaleDB, ClickHouse, S3/Parquet for cold storage |
| ML at Edge | TensorFlow Lite, ONNX Runtime, NVIDIA TensorRT (Jetson) |
| Use When | Avoid When |
|---|---|
| Devices generate high-volume data that's expensive to transmit entirely | All devices have reliable, low-latency cloud connectivity |
| Real-time decisions need < 100ms response (safety, control systems) | The workload is purely data collection with batch cloud processing |
| Devices must function during network outages | You have < 50 devices and can manage them individually |
| Privacy/compliance requires processing data locally before cloud transmission | The "edge" is actually a web browser β that's a different architecture |
MW designs IoT architectures with a "data gravity" lens β we map where each data type needs to be processed (edge, fog, or cloud) based on latency requirements, bandwidth costs, and decision granularity. We don't push everything to the cloud and filter later. Our edge deployments include automated device provisioning with certificate-based authentication, OTA update pipelines with staged rollouts and automatic rollback, and local dashboards on fog nodes for on-site operators who can't wait for cloud round-trips.
Explore more design patterns and system architectures

Security isn't a feature you add after launch. It's an architectural property β either the system was designed for it, or it wasn't.

Pay for what you use, scale to zero when you don't, and stop managing servers entirely β but know when the economics stop working.

Don't pay for idle GPUs. Provision compute just-in-time, process the workload, and tear it down β turning capital expense into a per-job operating cost.
MicrocosmWorks uses a decision framework based on latency sensitivity, bandwidth cost, and data privacy requirements to partition workloads between edge and cloud. Time-critical tasks like anomaly detection on sensor data, local control loops, and safety shutoffs run at the edge, while model training, historical analytics, and cross-site aggregation stay in the cloud. We help clients map each IoT use case to the right compute tier during our architecture discovery phase.
MicrocosmWorks designs edge nodes with local persistence using lightweight databases like SQLite or TimescaleDB, combined with store-and-forward queuing that buffers data during connectivity gaps and synchronizes automatically when the connection is restored. Our edge firmware includes conflict resolution logic for scenarios where local decisions made offline diverge from cloud-side state. This ensures zero data loss and continuous operation even in environments with intermittent connectivity like remote industrial sites or mobile fleets.
MicrocosmWorks implements OTA (over-the-air) update pipelines with cryptographic signing, staged rollouts, and automatic rollback capabilities to ensure every edge device receives verified firmware without downtime risk. We use mutual TLS authentication between edge devices and the update server, with hardware-backed secure boot to prevent tampered firmware from executing. Our phased deployment strategy updates devices in small batches with health checks between stages, so a bad update never reaches your full fleet.
MicrocosmWorks selects edge hardware based on the workload profileβNVIDIA Jetson for computer vision and ML inference, AWS IoT Greengrass-compatible gateways for general-purpose edge computing, and ruggedized industrial PCs from vendors like Advantech for harsh manufacturing environments. We maintain reference architectures for each platform that include pre-configured networking, security, and telemetry stacks, which accelerates deployment by 40-60%. Our team evaluates power consumption, operating temperature range, and connectivity options to match your specific site conditions.
MicrocosmWorks has completed multiple SCADA modernization projects where we overlay edge computing gateways that translate legacy protocols like Modbus and OPC-UA into modern MQTT or gRPC streams without disrupting existing control systems. We run a parallel architecture during migration so the legacy SCADA continues operating while the new edge-cloud pipeline is validated against production data. Our consulting rates for industrial IoT modernization start at $20-$50/hr depending on the protocol complexity and regulatory requirements involved.
Our architects can help design and build systems using this pattern for your specific requirements.
Get In Touch