Historian architecture overview in SCADA systems - Time & Space Complexity
Start learning this pattern below
Jump into concepts and practice - no test required
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?
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.
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.
As the number of sensors grows, the work grows too.
| Input Size (n) | Approx. Operations |
|---|---|
| 10 | 10 reads and stores |
| 100 | 100 reads and stores |
| 1000 | 1000 reads and stores |
Pattern observation: The work grows directly with the number of sensors.
Time Complexity: O(n)
This means the time to collect and store data grows in a straight line as sensors increase.
[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.
Understanding how data collection scales helps you design systems that stay reliable as they grow.
"What if the system batches sensor data before storing? How would the time complexity change?"
Practice
Solution
Step 1: Understand the role of a historian
A historian is designed to collect and store data over time from machines and processes.Step 2: Compare options with historian function
Only To collect and store time-stamped data from machines matches this function; others describe unrelated tasks.Final Answer:
To collect and store time-stamped data from machines -> Option AQuick Check:
Historian = Data collection and storage [OK]
- Confusing historian with control system
- Thinking historian replaces operators
- Assuming historian designs hardware
Solution
Step 1: Identify common historian components
Historians usually have data collectors, storage, and dashboards for visualization.Step 2: Check which component is unrelated
Machine actuators control machines physically and are not part of historian architecture.Final Answer:
Machine actuator -> Option DQuick Check:
Actuator ≠ historian component [OK]
- Confusing actuators with data collectors
- Thinking dashboards control machines
- Assuming storage is optional
Machine Sensor -> Data Collector -> Storage -> Dashboard
What will the dashboard show if the storage is empty?
Solution
Step 1: Understand data flow in historian
Data flows from sensors to storage before dashboard can display it.Step 2: Analyze dashboard output with empty storage
If storage is empty, dashboard has no historical data to show, so it displays none.Final Answer:
No historical data available -> Option CQuick Check:
Empty storage means no data on dashboard [OK]
- Assuming dashboard shows real-time data directly
- Expecting control commands on dashboard
- Thinking data collector errors show on dashboard
Solution
Step 1: Identify cause of no updated data
Data collector failure often stops new data from reaching storage and dashboard.Step 2: Choose the most direct fix
Restarting the data collector service restores data flow quickly.Final Answer:
Restart the data collector service -> Option BQuick Check:
Data collector restart fixes data update issues [OK]
- Replacing sensors unnecessarily
- Upgrading dashboard without checking data flow
- Increasing storage size unrelated to update issue
Solution
Step 1: Understand data integrity challenges
Multiple collectors sending data can cause conflicts or duplicates without coordination.Step 2: Identify best practice for integrity
Using synchronized timestamps and unique IDs prevents data conflicts and ensures correct ordering.Final Answer:
Use timestamp synchronization and unique data IDs -> Option AQuick Check:
Sync timestamps + unique IDs ensure data integrity [OK]
- Overwriting data causes loss
- Disabling collectors reduces data completeness
- Local storage prevents centralized analysis
