IIoT integration with SCADA in SCADA systems - Time & Space Complexity
When connecting many IIoT devices to a SCADA system, it is important to understand how the system's work grows as more devices send data.
We want to know how the time to process data changes when the number of devices increases.
Analyze the time complexity of the following code snippet.
// Pseudocode for reading data from multiple IIoT devices
function readAllDevices(devices) {
for (device in devices) {
data = device.readData()
processData(data)
}
}
This code reads data from each IIoT device one by one and processes it.
- Primary operation: Loop over all devices to read and process data.
- How many times: Once for each device in the list.
As the number of devices increases, the total work grows in a straight line.
| Input Size (n) | Approx. Operations |
|---|---|
| 10 | 10 reads and processes |
| 100 | 100 reads and processes |
| 1000 | 1000 reads and processes |
Pattern observation: Doubling the devices doubles the work needed.
Time Complexity: O(n)
This means the time to read and process data grows directly with the number of devices.
[X] Wrong: "Adding more devices won't affect processing time much because each device works independently."
[OK] Correct: Even if devices work independently, the SCADA system must still read and process each device's data, so total time grows with device count.
Understanding how system workload grows with connected devices shows you can think about scaling and performance in real-world IIoT and SCADA setups.
"What if we processed data from all devices in parallel instead of one by one? How would the time complexity change?"