# A Distributed Real-Time Monitoring Scheme for Air Pressure Stream Data Based on Kafka
## 2 Related Works  
With the advancement of IoT technology and cyber-physical systems, human society is gradually entering the Trillion Sensors (TSensors) era [17]. In fields such as real-time environmental monitoring that involve digital sensors and IoT, the value will sharply decline if stream data cannot be effectively processed. Therefore, real-time monitoring systems must be able to process continuous data streams without extreme delays to ensure the timeliness of data [18]. The challenge of developing a rapid and efficient large-scale stream-data processing method is a critical issue in this field. Traditional centralized computing systems consolidate processors, memory, storage, and other resources at a central node, which requires expensive hardware to support large-scale data processing and multi-user usage [19]. In contrast, distributed computing systems (DCSs) leverage multiple resources distributed across a network: using inexpensive standard hardware to process vast amounts of data and complex operations. DCS offers advantages in information sharing, concurrent processing, and computational capabilities over centralized computing systems [20]. The importance of DSP systems has correspondingly increased as modern applications impose stricter time constraints on the real-time analysis of massive data gathered by sensors [21; 22]. Compared to traditional static data batch processing, SP is a dynamic process that continuously integrates new data to compute results. SP primarily analyzes data streams from event producers such as sensors, devices, automation stations, and relational database systems through data analysis platforms built on relevant engines and infrastructure to detect and extract meaningful patterns and events [13]. The comparative study by [PERSON] et al. [23] on distributed data SP and analysis frameworks, the proposal by [PERSON] et al. [24] of a stream-based point processing framework, and the performance measurements of distributed stream data processing systems conducted by [PERSON] et al. [25] all indicate that distributed stream data processing systems possess advantages to include low delay, high performance, high throughput, and scalability when handling large amounts of real-time data. Additionally, the smart grid monitoring architecture based on DSP proposed by [PERSON] et al. [26] demonstrates that DSP can be applied in real-time monitoring. Therefore, DSP can effectively handle real-time data monitoring. This paper combines DSP with a real-time air pressure monitoring system to improve real-time environmental monitoring. At present, SP tools like Apache Flink, Apache Kafka, Apache Storm, and ActiveMQ play an important role in ingesting, processing, storing, indexing, and managing stream data. Apache Kafka and ActiveMQ are based on pub/sub structures and effectively solve the blocking problem caused by numerous asynchronous messages. Therefore, this paper designs real-time air pressure stream data monitoring schemes based on Apache Kafka and ActiveMQ and analyzes and compares their throughput and transmission delay. Apache Kafka is a distributed-event SP engine that consists of multiple components, including records or messages, record streams, consumers, producers, brokers, logs, partitions, and clusters [23]. In Kafka, producers send real-time data streams to different partitions of the corresponding topics in the Kafka cluster, while consumers fetch data from these topics and associate them with predefined thresholds for predictive analyses. Kafka uses a persistent querying system (KSQL) to provide pipeline-style real-time data stream processing, eliminating the need to directly submit data streams to the database [27] or to read, query, and process stored data from the database, thereby ensuring the timeliness of data transmission. Kafka provides a low-delay, high throughput, and fault-tolerant publish-subscribe pipeline based on pub/sub structures, making it suitable for processing massive data in a distributed environment.