Applying reactive programming approach in IoT based reliable crossroad traffic monitoring
Pavel Lavreshin

Problem statement
Is Reactive programming applicable in IoT traffic monitoring system?
Whether Reactive programming can make traffic monitoring system reliable and fault-tolerant?
Source and inspiration:
IoT crossroad traffic monitoring - birds'-eye view

1.
2.
3.
Challenges in IoT crossroad traffic monitoring
-
Streamed data processing efficiency - bounded system resources
-
System responsiveness - usability, consistency
-
Platform resilience - fault-tolerance, self-healing, recovery
-
Services scalability - horizontal scaling potential
Reactive programming paradigms in this work
-
Actor model
-
Reactive streams
-
Event Sourcing, CQRS
Reactive solution success criteria
-
Use message-driven communication or streams
-
Persist events in Event Store
-
Remain responsive under load
-
Stay resilient in case of failures and errors
-
Be elastic and utilise system resources efficiently
Methods used in the work
- PoC development
- Simulation scenario setup
- Actors based implementation
- Reactive streams based implementation
- Performance evaluation and metrics
- Outcomes and analysis
PoC simulation setup
Video recognition events:
Sensor events:
- Traffic incidents
- Road lane queues
- Vehicles passing / vehicle type detection
- Weather conditions updated (temperature, humidity)
- Road surface conditions changed (ice / wet / dry)
I Actor model

1.
2.
3.
Actors implementation outcome
Pros:
Cons:
- Low-level machinery required
- No back-pressure support
- System resources unsafe
- Encapsulated state
- Lightweight and cheap to spawn in the system
- Messages delivery guarantees
II Reactive streams

1.
2.
3.
4.
Reactive streams implementation outcome
Cons:
- Parallelism and concurrency with high-level DSL
- Back-pressure out of the box
- Less CPU context switches and reduced memory usage
Pros:
- Steep learning curve
- Few runtime issues encountered due to lack of docs
Summary
Reactive programming in IoT brings:
- Concurrency
- Durability
- Fault-tolerance
- Efficient resource utilisation
Is Reactive programming applicable in IoT crossroad traffic monitoring ?
Thanks for attention!
Questions?
CRUD / OLTP design

CRUD / OLTP Design



Copy of Reactive crossroad
By Pavel Lavreshin
Copy of Reactive crossroad
APPLYING REACTIVE PROGRAMMING APPROACH IN IOT BASED RELIABLE CROSSROAD TRAFFIC MONITORING
- 83