0
0
SCADA systemsdevops~5 mins

Historian architecture overview in SCADA systems - Time & Space Complexity

Choose your learning style9 modes available
Time Complexity: Historian architecture overview
O(n)
Understanding Time Complexity

When we look at historian architecture, we want to understand how the system handles data over time.

We ask: How does the work grow as more data points come in?

Scenario Under Consideration

Analyze the time complexity of the data collection and storage loop.


// Pseudocode for historian data collection
for each sensor in sensors:
  data = read_sensor(sensor)
  store_data(data)

// Periodically archive old data
archive_old_data()
    

This code reads data from each sensor and stores it, then archives old data periodically.

Identify Repeating Operations

Look for loops or repeated actions.

  • Primary operation: Loop over all sensors to read and store data.
  • How many times: Once per sensor each cycle.
How Execution Grows With Input

As the number of sensors grows, the work grows too.

Input Size (n)Approx. Operations
1010 reads and stores
100100 reads and stores
10001000 reads and stores

Pattern observation: The work grows directly with the number of sensors.

Final Time Complexity

Time Complexity: O(n)

This means the time to collect and store data grows in a straight line as sensors increase.

Common Mistake

[X] Wrong: "Adding more sensors won't affect performance much because data collection is fast."

[OK] Correct: Each sensor adds work, so more sensors mean more time needed to read and store data.

Interview Connect

Understanding how data collection scales helps you design systems that stay reliable as they grow.

Self-Check

"What if the system batches sensor data before storing? How would the time complexity change?"