A Fault-Tolerant Distributed IoT System with Multi-Protocol Support and Design Patterns Implementation

Overview This preprint presents the design and implementation of a fault-tolerant distributed Internet of Things (IoT) middleware supporting heterogeneous communication protocols through a unified gateway-centered architecture. The system integrates UDP, TCP, HTTP, and gRPC within a single codebase and employs four Gang of Four (GoF) design patterns—Singleton, Strategy, Observer, and Proxy—to organize protocol adaptation, centralized coordination, component monitoring, and request routing. The architecture incorporates stateful receiver instances, version-vector-aware message processing, load balancing, heartbeat monitoring, data replication, backup and restoration, and fault recovery mechanisms. System Architecture The middleware is organized into three primary architectural layers: Client Layer: External IoT producers and Apache JMeter test clients generating requests through different communication protocols. API Gateway: A centralized IoTGateway coordinating component registration, protocol-independent request routing, receiver selection, and operational monitoring. Stateful Processing Layer: Multiple DataReceiver instances responsible for processing sensor messages, maintaining distributed state, and supporting replication and recovery. The system employs a common message representation (IoTMessage) and separates transport-specific behavior from internal processing and coordination. Design Patterns Four GoF design patterns structure the implementation: Singleton: Ensures centralized coordination through IoTGateway. Strategy: Encapsulates protocol selection and receiver dispatch, including round-robin load balancing. Observer: Supports event-driven monitoring and heartbeat-related component tracking. Proxy: Mediates client access to stateful receivers through the API Gateway. This decomposition emphasizes modularity, architectural clarity, and extensibility. Multi-Protocol Communication The middleware supports four communication interfaces: UDP: Lightweight datagram-based sensor message ingestion. TCP: Connection-oriented communication for structured message exchange. HTTP: REST-oriented interfaces for web interoperability. gRPC: Typed remote procedure calls using Protocol Buffers. Protocol-specific communication strategies enable runtime selection while preserving a shared gateway and processing architecture. Fault Tolerance and State Consistency The proposed architecture combines several resilience mechanisms: Version vectors for representing causal relationships and concurrent updates. Timestamp-based Last Write Wins conflict resolution, with version vectors used for tie-breaking. Replication and synchronization across stateful receivers. Heartbeat-based availability monitoring. Receiver restart, replacement, and reintegration mechanisms. In-memory state snapshots supporting backup and restoration. These mechanisms are designed to support continuity of service and distributed state convergence under component failures and recovery scenarios. Experimental Design and Evaluation The manuscript defines an Apache JMeter-based experimental methodology for evaluating concurrent access, response latency, throughput, error behavior, and fault recovery. Three test plans are described: HTTP/TCP: Two independent groups of 30 concurrent users each, with a 60-second ramp-up and a 150-second test duration. UDP: 120 concurrent users, with a 60-second ramp-up and a 150-second duration, using a JSR223-based sampler. gRPC: 50 concurrent users, with a 60-second ramp-up and a 150-second duration, exercising sensor registration and heartbeat operations. The evaluation framework considers throughput, response time, error rates, and capacity-related behavior. Knee capacity and usable capacity are identified as evaluation objectives rather than reported numerical results. Main Contributions A gateway-centered distributed IoT middleware architecture integrating four communication protocols within a single codebase. An explicit mapping of four GoF design patterns to communication, coordination, monitoring, and request-routing responsibilities. A stateful processing layer combining version vectors, replication, conflict resolution, backup, and recovery services. A structured experimental methodology for evaluating protocol behavior, concurrent workloads, and fault-tolerance scenarios using Apache JMeter. A documented mapping between project requirements and architectural components, supporting technical assessment and reproducibility-oriented development. Scope and Limitations This work is positioned as an academic distributed-systems prototype emphasizing architectural design and integration rather than production-grade deployment. The manuscript describes the implemented architectural mechanisms and prepared experimental test plans. It does not report quantitative benchmark results, measured capacity thresholds, or comparative performance improvements. Consequently, the experimental material should be interpreted as an evaluation framework rather than conclusive evidence of performance superiority or fault-recovery effectiveness. Reproducibility and Supporting Artifacts The manuscript documents the system architecture, principal implementation components, protocol configurations, and Apache JMeter test-plan parameters. Reproduction of the complete implementation and experiments requires access to the corresponding source code, runtime configuration, protocol definitions, test plans, and execution environment. Supporting software artifacts and repository identifiers may be associated with this record when made available. Publication Status This record contains a technical research manuscript prepared in IEEE conference format and disseminated as a preprint. No formal journal or conference publication, peer-review outcome, or acceptance status is asserted by this deposit. Author Douglas Felipe de Lima Silva Instituto Metrópole Digital (IMD)Universidade Federal do Rio Grande do Norte (UFRN)Natal, Brazil ORCID: https://orcid.org/0009-0007-9868-4891

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-03
DOI
https://doi.org/10.5281/zenodo.24764826
Primary Topic
Distributed systems and fault tolerance
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

A Fault-Tolerant Distributed IoT System with Multi-Protocol Support and Design Patterns Implementation

Douglas Felipe Lima Silva
Zenodo (CERN European Organization for Nuclear Research)
Distributed systems and fault tolerance
preprint

A Fault-Tolerant Distributed IoT System with Multi-Protocol Support and Design Patterns Implementation

Douglas Felipe Lima Silva
preprint en

Abstract

Overview This preprint presents the design and implementation of a fault-tolerant distributed Internet of Things (IoT) middleware supporting heterogeneous communication protocols through a unified gateway-centered architecture. The system integrates UDP, TCP, HTTP, and gRPC within a single codebase and employs four Gang of Four (GoF) design patterns—Singleton, Strategy, Observer, and Proxy—to organize protocol adaptation, centralized coordination, component monitoring, and request routing. The architecture incorporates stateful receiver instances, version-vector-aware message processing, load balancing, heartbeat monitoring, data replication, backup and restoration, and fault recovery mechanisms. System Architecture The middleware is organized into three primary architectural layers: Client Layer: External IoT producers and Apache JMeter test clients generating requests through different communication protocols. API Gateway: A centralized IoTGateway coordinating component registration, protocol-independent request routing, receiver selection, and operational monitoring. Stateful Processing Layer: Multiple DataReceiver instances responsible for processing sensor messages, maintaining distributed state, and supporting replication and recovery. The system employs a common message representation (IoTMessage) and separates transport-specific behavior from internal processing and coordination. Design Patterns Four GoF design patterns structure the implementation: Singleton: Ensures centralized coordination through IoTGateway. Strategy: Encapsulates protocol selection and receiver dispatch, including round-robin load balancing. Observer: Supports event-driven monitoring and heartbeat-related component tracking. Proxy: Mediates client access to stateful receivers through the API Gateway. This decomposition emphasizes modularity, architectural clarity, and extensibility. Multi-Protocol Communication The middleware supports four communication interfaces: UDP: Lightweight datagram-based sensor message ingestion. TCP: Connection-oriented communication for structured message exchange. HTTP: REST-oriented interfaces for web interoperability. gRPC: Typed remote procedure calls using Protocol Buffers. Protocol-specific communication strategies enable runtime selection while preserving a shared gateway and processing architecture. Fault Tolerance and State Consistency The proposed architecture combines several resilience mechanisms: Version vectors for representing causal relationships and concurrent updates. Timestamp-based Last Write Wins conflict resolution, with version vectors used for tie-breaking. Replication and synchronization across stateful receivers. Heartbeat-based availability monitoring. Receiver restart, replacement, and reintegration mechanisms. In-memory state snapshots supporting backup and restoration. These mechanisms are designed to support continuity of service and distributed state convergence under component failures and recovery scenarios. Experimental Design and Evaluation The manuscript defines an Apache JMeter-based experimental methodology for evaluating concurrent access, response latency, throughput, error behavior, and fault recovery. Three test plans are described: HTTP/TCP: Two independent groups of 30 concurrent users each, with a 60-second ramp-up and a 150-second test duration. UDP: 120 concurrent users, with a 60-second ramp-up and a 150-second duration, using a JSR223-based sampler. gRPC: 50 concurrent users, with a 60-second ramp-up and a 150-second duration, exercising sensor registration and heartbeat operations. The evaluation framework considers throughput, response time, error rates, and capacity-related behavior. Knee capacity and usable capacity are identified as evaluation objectives rather than reported numerical results. Main Contributions A gateway-centered distributed IoT middleware architecture integrating four communication protocols within a single codebase. An explicit mapping of four GoF design patterns to communication, coordination, monitoring, and request-routing responsibilities. A stateful processing layer combining version vectors, replication, conflict resolution, backup, and recovery services. A structured experimental methodology for evaluating protocol behavior, concurrent workloads, and fault-tolerance scenarios using Apache JMeter. A documented mapping between project requirements and architectural components, supporting technical assessment and reproducibility-oriented development. Scope and Limitations This work is positioned as an academic distributed-systems prototype emphasizing architectural design and integration rather than production-grade deployment. The manuscript describes the implemented architectural mechanisms and prepared experimental test plans. It does not report quantitative benchmark results, measured capacity thresholds, or comparative performance improvements. Consequently, the experimental material should be interpreted as an evaluation framework rather than conclusive evidence of performance superiority or fault-recovery effectiveness. Reproducibility and Supporting Artifacts The manuscript documents the system architecture, principal implementation components, protocol configurations, and Apache JMeter test-plan parameters. Reproduction of the complete implementation and experiments requires access to the corresponding source code, runtime configuration, protocol definitions, test plans, and execution environment. Supporting software artifacts and repository identifiers may be associated with this record when made available. Publication Status This record contains a technical research manuscript prepared in IEEE conference format and disseminated as a preprint. No formal journal or conference publication, peer-review outcome, or acceptance status is asserted by this deposit. Author Douglas Felipe de Lima Silva Instituto Metrópole Digital (IMD)Universidade Federal do Rio Grande do Norte (UFRN)Natal, Brazil ORCID: https://orcid.org/0009-0007-9868-4891

Zenodo (CERN European Organization for Nuclear Research)
Distributed systems and fault tolerance
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon