As the speed required for modern enterprises to remain competitive steadily increases, a traditional, database-centric approach falls short when it comes to agility, scalability, and latency. As a result, a growing number of companies are looking to real-time systems for their critical business applications (e.g., manufacturing, healthcare, and energy and utilities) that rely on real-time data for continuous improvements in safety, efficiency, and reliability.
Real-time systems refer to any information processing system with hardware and software components that perform real-time application functions and can respond within predictable and specific time constraints. Common examples include air traffic control systems, process control systems, and autonomous driving systems.
While there is growing interest in real-time applications, there is still significant confusion and misinformation about the various types of real-time systems and their different capabilities, as well as how they leverage databases. Fundamentally, there are three types of real-time systems, each of which is relevant for solving a different class of problems:
- ‘Hard’ Real-Time Systems are hardware-based systems that must operate within the confines of a stringent deadline, with performance speed measured in milliseconds. No database can deliver on this kind of performance, and all computing needs to be done by the hardware itself. Applications that run on these systems may be considered to have failed if they do not complete their functions within an allotted time span. High-precision, automated robotic assembly lines require the rigor of this type of real-time system.
- Micro-Batch Real-Time Systems use more traditional data processes and queries, collecting data in small groups (or batches) for the purpose of processing and taking action on that data. These systems are most appropriate for problems that only require limited latency constraints in the order of hundreds of milliseconds (or even seconds) and do not have to deal with regular fluctuations in data velocity and volume. eCommerce ordering systems can be a good match for these systems.
Traditional approaches to data processing are performed against micro-batches of data at a fast ‘duty cycle.’ Ground zero for creating fatal problems is found in attempts to scale the system and to diminish the latency between batches to make these systems function similar to event-driven real-time systems. As the number of batches increases linearly, the compute overhead and cost to continually run the queries in the growing volume of micro-batches increases exponentially. At some point, the law of physics kicks in, though, and it becomes impossible to make the data analysis layer of the system perform in the defined ‘real-time’ at high volume. Ultimately, a database will never be as fast as event processing. - Event-Driven Real-Time Systems use events to trigger and communicate between decoupled services. As these systems are better at managing multiple data sources, and can easily scale as the number of sources increases, they are typically used in applications built with microservices. Event-driven real-time systems are the ultimate solution for software applications that require action within a very short time period, e.g., within the 1-10 millisecond range. Mission critical applications – such as gas leak detection and response systems – rely on the agility and speed of these systems to prevent potentially dangerous situations.
In-memory stream processing, rather than database queries, is the driving force in this system. Information (from IoT sensors, embedded AI, event brokers, etc.) is processed asynchronously and in-flight to give situational awareness to what the data is saying at the moment of injections. The database becomes an afterthought and is only used for historical purposes after any necessary action is taken.
There isn’t a one-size-fits-all approach to real-time systems. So, before making any decisions on which system is right for you, it’s important to first identify the real-time applications that will enable your business to harness the power of your data to increase efficiency and productivity. Once you’ve done this, you can determine which information will need to be stored over longer periods of time in a database for historic reporting and deeper analytics vs which information will require immediate action for the real-time event processing.
Want to learn more? Check out this Understanding Event-Driven Systems White Paper.