How Real-Time Systems are Probably Misunderstood

Photo of author
Written By Nidhi Sharma

Lorem ipsum dolor sit amet consectetur pulvinar ligula augue . 

Many industries are becoming more interested in real-time systems and trying to create them. These systems must address customer experiences as well as internal operations. They also need to be able to alter the industry's expected capabilities and the health of the planet.

In A Wide Range of Applications, The Next Generation Real-Time System will be Available:

  • Security and safety: Delivering new levels of health and public safety through smart buildings that automatically detect, stop and end the spread of diseases.
  • Retail: Creating new personal proximity marketing experiences for physical retail environments.
  • Emergencies: Automatically triggering evacuation protocols when floods or other emergencies are detected

There can be no compromises in the areas of reliability, responsiveness, and scalability for all these scenarios. This requires that developers adopt a new way of thinking about how high-performance real-time systems should be designed.

How Many Elevators can You Monitor Before The Database’s First Method of Creating Real-Time Systems Fails?

A modern super-city may have hundreds of thousands of elevators. All of these require continuous monitoring to identify potential safety and security issues. Real-time stream processing, which can handle large amounts of data and provide consistent and timely situational awareness, is the best way to tackle this type of "smart building" problem.

It is likely that the development would begin with information from one elevator, with analysis performed in simple batch queries and a time-series database. It would be wrong to assume that what works well for one person will work for hundreds or thousands.

This assumption assumes that database queries can handle an explosion in data with minimal performance loss. This works well with a few elevators. However, the system will fail if the data (elevators), grows beyond the database's capabilities.

The system is inherently broken at scale regardless of how many other capabilities are placed around the perimeter of the traditional database.

To create a robust and scalable system, you need to first perform analytics on anomaly detection in memory. Then, move the information to the database for historical purposes. Modern real-time systems often include the database as the final step.

Three Types of Real-Time Systems

There is increasing interest in real-time systems, but there is also confusion and misinformation. There are three types of real-time systems that can be used to solve different problems.

  • 'Hard' Real-Time Systems - hardware-based,
  • Micro-Batch Real-Time Systems - These software systems are real-time that use traditional data processes and queries.
  • Event-Driven real-time Systems - These are soft systems that use stream processing or event processing.

1. “Hard” Real-Time Systems

These systems are required to solve problems that can't tolerate missing deadlines. They also provide a high level of performance in just a few milliseconds. This level of performance is impossible to achieve with any database. All hardware and computing must be done on-premise. This type of real-time system is required for high-precision robotic assembly lines.

2. Systems for Micro-Batch Real Time

This approach to real-time systems is best suited for problems that require only some real-time processing, with latencies in hundreds of milliseconds or even seconds, and that does not require scaling. This can be achieved with eCommerce ordering systems.

Traditional data processing approaches are limited to small data sets (micro-batches), and operate on a short 'duty cycle. This can lead to fatal problems.

The number of batches increases linearly. This means that the cost of computing and the time required to run queries in the increasing volume of micro-batches grows exponentially. The law of physics kicks into action and the data analysis layer of a system cannot perform at high volumes in the defined real-time'. A database will never perform as fast as event processing.

3. Event-Driven Real-Time Systems

This is the "Goldilocks" solution for applications that need to be acted on in a short time span of between 1-10 milliseconds. This type of real-time system can be used in a recommendation system, such as eCommerce or industrial automation.

This system is driven by in-memory processing and not a database. Information (from IoT sensors and embedded AI, event brokers, and so on. It is processed in flight with stream analytics and can then be sent back to a database for historical reasons.

The compute work scales linearly with increasing data, not exponentially as in the micro-batch model.

Avoiding and Finding Performance and Scale Choke Points in Real-Time Systems

Analyzing the three types of real-time systems shows that systems that use traditional database storage models can never be scaleable in real-time even if ingestion was immediate.

Queries take time and performance decreases when a database grows. This is exactly what happens when scaling a system. Our previous elevator example showed that ingestion was instantaneous, but that accessing the database and performing queries was not real-time.

The performance of that system was eventually halted by the most inefficient part of the system, the database.

When designing the next generation real-time system, it is important to consider the timeframe in which information must be accessed and understood as well as the scale at which your system will grow.

It’s not an either-or decision -Next-Generation Real-Time Systems Will Need To Be Hybrid

Real-time systems are not universally applicable. It is important to understand which information must be stored for longer periods of time in order to provide historical reporting, deeper analytics, and pattern recognition.

Next, the information that is urgently needed (on the order of milliseconds for real-time processing) will be the first. Systems that combine different data processing models to maximize the benefits of each model will be the best.

Leave a Comment