The Construction of a Stream Service Application with DeepStream and Simple Realtime Server Using Containerization for Edge Computing
Abstract
:1. Introduction
- Performance Comparison: The study demonstrates that the performance and efficiency of the implementation in Docker are comparable to that of traditional physical machines. This finding is crucial as it validates the use of containerization for deploying applications without sacrificing performance.
- WebRTC Efficacy: The paper evaluates the efficacy of WebRTC as a streaming format, highlighting its low latency capabilities (around 5 s) compared to other formats like HLS, which typically experiences delays exceeding 10 s. This positions WebRTC as a favorable option for real-time communication applications.
- Cross-Platform Compatibility: The research emphasizes WebRTC’s robust cross-platform support, functioning effectively across various operating systems and devices, including Windows, macOS, Android, and iOS. This broad compatibility enhances the usability of the application in diverse environments.
- Load Testing Insights: The findings reveal that while the system can support multiple simultaneous connections, performance degrades significantly with more than three devices. This insight is critical for understanding the limitations of the current hardware setup and informs future scalability considerations.
- Integration of Technologies: The paper showcases the successful integration of multiple technologies, including DeepStream, Simple Realtime Server, and Docker, to create a cohesive streaming service. This integration not only simplifies deployment but also enhances the overall system’s performance and reliability.
2. Background Review and Related Study
2.1. Docker and Virtual Machines
2.2. DeepStream
- Video Decode, Gst-uridecode: Decodes video streams from multiple sources.
- Stream Mux, Gst-nvstreammux: Merges multiple video streams into a single stream for parallel processing.
- Primary Detector, Gst-nvinfer: Performs primary object detection using a neural network (e.g., detecting fire in the video).
- Object Tracker, Gst-nvtracker: Tracks detected objects across frames to maintain consistent object identities.
- Secondary Classifiers, Gst-nvinfer: Applies additional neural networks to classify attributes of detected objects, such as car color, model, and make.
- Tiler, Gst-nvmultistreamtiler: Arranges multiple video streams or frames in a tiled display, facilitating simultaneous viewing.
- On-Screen Display, Gst-nvosd: Renders metadata such as bounding boxes and labels onto the video frames for visualization.
- Renderer, Gst-nveglglessink: Outputs the processed video to a display or file.
- Cloud Integration:
- –
- Gst-nvmsgconv: Converts metadata into a format suitable for messaging.
- –
- Gst-nvmsgbroker**: Sends processed metadata to a cloud service for further analysis or storage.
2.3. Simple Realtime Server
2.4. RTMP
- The plain protocol using TCP port 1935 by default.
- RTMPS, transmitted through a TLS/SSL connection.
- RTMPE, encrypted with Adobe’s own security mechanism. Although the implementation details are proprietary, the mechanism uses industry-standard cryptographic primitives.
- RTMPT, encapsulated with HTTP to penetrate the firewall. RTMPT usually uses clear text requests on TCP ports 80 and 443 to bypass most corporate traffic filtering. Encapsulated conversations may carry pure RTMP, RTMPS or RTMPE packets.
- RTMFP, using UDP instead of TCP, instead of RTMP Chunk Stream. Adobe Systems has developed a secure real-time media streaming protocol suite that allows end users to directly connect to each other (P2P). The RTMP protocol (Real-Time Messaging Protocol) is used to transmit objects, video, and audio between Flash and the server. This protocol is based on the TCP protocol or the polling HTTP protocol. The RTMP protocol is like a container for storing data packets. These data can be either video/audio data in FLV or data in AMF format. A single connection can transmit multiple network streams through different channels, and the sizes of the packets passing through the channels are all fixed.
2.5. HLS
2.6. WebRTC
- Network Penetration Issues: WebRTC relies on protocols like ICE, STUN, and TURN to facilitate connections through firewalls and NATs. However, it does not guarantee 100% network penetration, which can lead to connectivity issues in certain environments.
- Performance Variability: While WebRTC offers low latency, the performance can vary significantly based on the device and network conditions. For instance, the aforementioned document notes that while WebRTC can achieve a delay of around 5 s, this can increase under suboptimal conditions, particularly when multiple devices are connected simultaneously.
- Resource Usage: WebRTC’s real-time capabilities demand higher CPU usage compared to other streaming protocols like HLS and RTMP. This can be a concern for devices with limited processing power, as the CPU usage can exceed 40% during operation, potentially affecting overall system performance.
2.7. YOLOv4
2.8. Edge Device
2.9. Open Broadcaster Software
2.10. Related Works
3. Materials and Methods
3.1. System Architecture
- Edge Computing: By running the entire pipeline on the Jetson Xavier NX, the system can perform real-time analysis without relying on a cloud-based infrastructure. This reduces latency and improves privacy.
- Containerization: Using Docker and Docker Compose simplifies the deployment and management of the application on the Jetson Xavier NX.
- Efficient Video Processing: DeepStream is specifically designed for efficient video processing on NVIDIA hardware, making it well-suited for this type of application.
3.2. Experimental Environment
- FFmpeg captures video from a source (camera, file) and encodes it into a suitable format.
- The video stream is sent to the Simple Realtime Server, which passes it to the DeepStream pipeline.
- DeepStream processes the video frames, performing object detection and face recognition using pre-trained models.
- The results from DeepStream are processed further on the server, potentially generating additional information or annotations.
- The processed video stream and any additional information are sent to the Apache HTTP server.
- The web browser receives the data from the server and displays the processed video stream with any overlays or annotations.
4. Experimental Results
4.1. Deepstream Efficacy
4.2. Simple Realtime Server Efficacy
5. Discussion
5.1. Image Recognition and Training
5.2. Export and Identify the Stream Signal
5.3. Specific Target
5.4. System Results Overview
5.5. Energy-Constrained Environments
5.6. System Security
5.7. Real-World Applications
5.8. Future Directions
- Scalability Improvements: Given the findings that performance degrades significantly with more than three simultaneous connections, future research should explore optimization techniques to enhance scalability. This could involve investigating load balancing strategies or implementing more robust hardware solutions to support a higher number of concurrent users without compromising performance.
- Protocol Optimization: While WebRTC has demonstrated low latency capabilities, its high CPU usage (often exceeding 40%) poses challenges for devices with limited processing power. Future studies could focus on optimizing WebRTC’s performance or exploring alternative protocols that maintain low latency while reducing resource consumption, such as enhancing RTMP or HLS implementations.
- Integration with AI Technologies: The integration of AI technologies, such as advanced object detection and recognition algorithms, could further enhance the capabilities of the streaming service. Research could investigate the application of more sophisticated models, like YOLOv4, to improve accuracy and speed in real-time video analytics.
- Security Enhancements: As security is crucial in edge computing environments, future work should address potential vulnerabilities associated with the streaming protocols and the overall system architecture. Implementing robust encryption and access control measures will be essential to protect sensitive data and ensure user privacy.
- Cross-Platform Compatibility Testing: Although the current research highlights WebRTC’s cross-platform support, further testing across a wider range of devices and operating systems could provide insights into compatibility issues and performance variations. This would help to ensure a seamless user experience across different platforms. By addressing these areas, future research can significantly contribute to the development of more efficient, secure, and scalable streaming service applications in edge computing environments.
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Sittón-Candanedo, I.; Alonso, R.S.; Corchado, J.M.; Rodríguez-González, S.; Casado-Vara, R. A review of edge computing reference architectures and a new global edge proposal. Future Gener. Comput. Syst. 2019, 99, 278–294. [Google Scholar] [CrossRef]
- Ning, Z.; Huang, J.; Wang, X.; Rodrigues, J.J.; Guo, L. Mobile edge computing-enabled Internet of vehicles: Toward energy-efficient scheduling. IEEE Netw. 2019, 33, 198–205. [Google Scholar] [CrossRef]
- Chen, J.; Li, K.; Deng, Q.; Li, K.; Philip, S.Y. Distributed deep learning model for intelligent video surveillance systems with edge computing. IEEE Trans. Ind. Inform. 2019. [Google Scholar] [CrossRef]
- Islam, A.; Debnath, A.; Ghose, M.; Chakraborty, S. A survey on task offloading in multi-access edge computing. J. Syst. Archit. 2021, 118, 102225. [Google Scholar] [CrossRef]
- Furano, G.; Meoni, G.; Dunne, A.; Moloney, D.; Ferlet-Cavrois, V.; Tavoularis, A.; Byrne, J.; Buckley, L.; Psarakis, M.; Voss, K.O.; et al. Towards the use of artificial intelligence on the edge in space systems: Challenges and opportunities. IEEE Aerosp. Electron. Syst. Mag. 2020, 35, 44–56. [Google Scholar] [CrossRef]
- Wan, S.; Ding, S.; Chen, C. Edge computing enabled video segmentation for real-time traffic monitoring in internet of vehicles. Pattern Recognit. 2022, 121, 108146. [Google Scholar] [CrossRef]
- Potdar, A.M.; Narayan, D.; Kengond, S.; Mulla, M.M. Performance evaluation of docker container and virtual machine. Procedia Comput. Sci. 2020, 171, 1419–1428. [Google Scholar] [CrossRef]
- Masdari, M.; Nabavi, S.S.; Ahmadi, V. An overview of virtual machine placement schemes in cloud computing. J. Netw. Comput. Appl. 2016, 66, 106–127. [Google Scholar] [CrossRef]
- Ali, A.A.; El-Kalioby, M.; Abouelhoda, M. The case for Docker in multicloud enabled bioinformatics applications. In Bioinformatics and Biomedical Engineering, Proceedings of the 4th International Conference, IWBBIO 2016, Granada, Spain, 20–22 April 2016, Proceedings 4; Springer: Berlin/Heidelberg, Germany, 2016; pp. 587–601. [Google Scholar]
- Guidotti, R.; Soldani, J.; Neri, D.; Brogi, A. Explaining successful docker images using pattern mining analysis. In Software Technologies: Applications and Foundations, Proceedings of the STAF 2018 Collocated Workshops, Toulouse, France, 25–29 June 2018, Revised Selected Papers; Springer: Berlin/Heidelberg, Germany, 2018; pp. 98–113. [Google Scholar]
- Cito, J.; Ferme, V.; Gall, H.C. Using docker containers to improve reproducibility in software and web engineering research. In Proceedings of the ACM 38th International Conference on Software Engineering Companion (ICSE-C), Austin, TX, USA, 14–22 May 2016; Springer: Berlin/Heidelberg, Germany, 2016; pp. 609–612. [Google Scholar]
- Kumar, P.; Shah, M. To Build Scalable and Portable Blockchain Application Using Docker. In Soft Computing: Theories and Applications; Springer: Berlin/Heidelberg, Germany, 2020; pp. 619–628. [Google Scholar]
- Qiu, M. Smart Computing and Communication: 5th International Conference, SmartCom 2020, Paris, France, 29–31 December 2020, Proceedings; Springer Nature: Berlin/Heidelberg, Germany, 2021. [Google Scholar]
- Abdulghafoor, N.H.; Abdullah, H.N. Real-time moving objects detection and tracking using deep-stream technology. J. Eng. Sci. Technol. 2021, 16, 194–208. [Google Scholar]
- Simple Realtime Server (SRS). Available online: https://github.com/ossrs/srs (accessed on 15 March 2023).
- RTMP. Available online: https://helpx.adobe.com/adobe-media-server/dev/stream-on-demand-media-rtmp.html (accessed on 20 April 2023).
- Durak, K.; Akcay, M.N.; Erinc, Y.K.; Pekel, B.; Begen, A.C. Evaluating the performance of apple’s low-latency HLS. In Proceedings of the 2020 IEEE 22nd International Workshop on Multimedia Signal Processing (MMSP), Tampere, Finland, 21–24 September 2020; IEEE: New York, NY, USA, 2020; pp. 1–6. [Google Scholar]
- HTTP Live Streaming. Available online: https://zh.wikipedia.org/wiki/HTTP_Live_Streaming (accessed on 10 January 2023).
- Chodorek, A.; Chodorek, R.R.; Sitek, P. UAV-based and WebRTC-based open universal framework to monitor urban and industrial areas. Sensors 2021, 21, 4061. [Google Scholar] [CrossRef] [PubMed]
- Chodorek, A.; Chodorek, R.R.; Yastrebov, A. The Prototype Monitoring System for Pollution Sensing and Online Visualization with the Use of a UAV and a WebRTC-Based Platform. Sensors 2022, 22, 1578. [Google Scholar] [CrossRef] [PubMed]
- García, B.; Gallego, M.; Gortázar, F.; Bertolino, A. Understanding and estimating quality of experience in WebRTC applications. Computing 2019, 101, 1585–1607. [Google Scholar] [CrossRef]
- Hu, X.; Liu, Y.; Zhao, Z.; Liu, J.; Yang, X.; Sun, C.; Chen, S.; Li, B.; Zhou, C. Real-time detection of uneaten feed pellets in underwater images for aquaculture using an improved YOLO-V4 network. Comput. Electron. Agric. 2021, 185, 106135. [Google Scholar] [CrossRef]
- Ullah, S.; Kim, D.H. Benchmarking Jetson platform for 3D point-cloud and hyper-spectral image classification. In Proceedings of the 2020 IEEE International Conference on Big Data and Smart Computing (BigComp), Busan, Republic of Korea, 19–22 February 2020; IEEE: New York, NY, USA, 2020; pp. 477–482. [Google Scholar]
- Feng, H.; Mu, G.; Zhong, S.; Zhang, P.; Yuan, T. Benchmark analysis of yolo performance on edge intelligence devices. Cryptography 2022, 6, 16. [Google Scholar] [CrossRef]
- Zhu, J.; Feng, H.; Zhong, S.; Yuan, T. Performance analysis of real-time object detection on Jetson device. In Proceedings of the 2022 IEEE/ACIS 22nd International Conference on Computer and Information Science (ICIS), Zhuhai, China, 26–28 June 2022; IEEE: New York, NY, USA, 2022; pp. 156–161. [Google Scholar]
- Grzesik, P.; Mrozek, D. Metagenomic analysis at the edge with Jetson Xavier NX. In Proceedings of the International Conference on Computational Science, Kraków, Poland, 16–18 June 2021; Springer: Berlin/Heidelberg, Germany, 2021; pp. 500–511. [Google Scholar]
- Carofiglio, G.; Muscariello, L.; Augé, J.; Papalini, M.; Sardara, M.; Compagno, A. Enabling icn in the internet protocol: Analysis and evaluation of the hybrid-icn architecture. In Proceedings of the 6th ACM Conference on Information-Centric Networking, Macau, China, 24–26 September 2019; pp. 55–66. [Google Scholar]
- Dai, Y.; Xu, D.; Maharjan, S.; Qiao, G.; Zhang, Y. Artificial intelligence empowered edge computing and caching for internet of vehicles. IEEE Wirel. Commun. 2019, 26, 12–18. [Google Scholar] [CrossRef]
- Xu, X.; Xu, A.; Jiang, Y.; Wang, Z.; Wang, Q.; Zhang, Y.; Wen, H. Research on Security Issues of Docker and Container Monitoring System in Edge Computing System. In Journal of Physics: Conference Series; IOP Publishing: Bristol, UK, 2020; Volume 1673, p. 012067. [Google Scholar]
- Jansen, C.; Witt, M.; Krefting, D. Employing docker swarm on openstack for biomedical analysis. In Proceedings of the International Conference on Computational Science and Its Applications, Beijing, China, 4–7 July 2016; Springer: Berlin/Heidelberg, Germany, 2016; pp. 303–318. [Google Scholar]
- Sharma, I.; Manohit; Bhandari, A. Implementing Slowloris DoS Using Docker. In Advances in Information Communication Technology and Computing; Springer: Berlin/Heidelberg, Germany, 2021; pp. 109–117. [Google Scholar]
- Brogi, A.; Pahl, C.; Soldani, J. On enhancing the orchestration of multi-container Docker applications. In Proceedings of the European Conference on Service-Oriented and Cloud Computing, Como, Italy, 12–14 September 2018; Springer: Berlin/Heidelberg, Germany, 2018; pp. 21–33. [Google Scholar]
- Nguyen, T.L.; Nou, R.; Lebre, A. YOLO: Speeding up VM and Docker Boot Time by reducing I/O operations. In Proceedings of the European Conference on Parallel Processing, Göttingen, Germany, 26–30 August 2019; Springer: Berlin/Heidelberg, Germany, 2019; pp. 273–287. [Google Scholar]
- Saxena, D.; Sharma, N. Analysis of Docker Performance in Cloud Environment. In Advances in Information Communication Technology and Computing; Springer: Berlin/Heidelberg, Germany, 2021; pp. 9–18. [Google Scholar]
- Morabito, R.; Farris, I.; Iera, A.; Taleb, T. Evaluating performance of containerized IoT services for clustered devices at the network edge. IEEE Internet Things J. 2017, 4, 1019–1030. [Google Scholar] [CrossRef]
- Qiao, Y.; Shen, S.; Zhang, C.; Wang, W.; Qiu, T.; Wang, X. EdgeOptimizer: A programmable containerized scheduler of time-critical tasks in Kubernetes-based edge-cloud clusters. Future Gener. Comput. Syst. 2024, 156, 221–230. [Google Scholar] [CrossRef]
- Oleghe, O. Container placement and migration in edge computing: Concept and scheduling models. IEEE Access 2021, 9, 68028–68043. [Google Scholar] [CrossRef]
- List, M. Using docker compose for the simple deployment of an integrated drug target screening platform. J. Integr. Bioinform. 2017, 14. [Google Scholar] [CrossRef] [PubMed]
- Pentyala, S.K. Emergency communication system with Docker containers, OSM and Rsync. In Proceedings of the 2017 International Conference On Smart Technologies For Smart Nation (SmartTechCon), Bengaluru, India, 17–19 August 2017; IEEE: New York, NY, USA, 2017; pp. 1064–1069. [Google Scholar]
Device | Chrome | Firefox | Microsoft Edge | Safari |
---|---|---|---|---|
Windows 10 | O | O | O | |
Android Samsung Note8 | O | O | O | |
iPhone 12 | O | O | O | O |
iPad | O | O | O | |
Macbook | O | O | O |
Component | Specifications |
---|---|
GPU | 384-core NVIDIA Volta™ GPU with 48 Tensor Cores |
CPU | 6-core NVIDIA Carmel ARM®v8.2 64-bit CPU 6 MB L2 + 4 MB L3 |
Storage | 16 GB eMMC 5.1 |
Power | 10 W | 15 W |
PCIe | 1 × 1 + 1 × 4 (PCIe Gen3, Root Port & Endpoint) |
Video Encode | 2× 464 MP/s (HEVC) 2× 4K @ 30 (HEVC) 6× 1080p @ 60 (HEVC) 14× 1080p @ 30 (HEVC) |
Video Decode | 2× 690 MP/s (HEVC) 2× 4K @ 60 (HEVC) 4× 4K @ 30 (HEVC) 12× 1080p @ 60 (HEVC) 32× 1080p @ 30 (HEVC) 16× 1080p @ 30 (H.264) |
Display | 2 multi-mode DP 1.4/eDP 1.4/HDMI 2.0 |
DL Accelerator | 2× NVDLA Engines |
Vision Accelerator | 7-Way VLIW Vision Processor |
Networking | 10/100/1000 BASE-T Ethernet |
Mechanical | 45 mm × 69.6 mm 260-pin SO-DIMM connector |
Software | Version |
---|---|
Ubuntu | 18.04.5 |
DeepStreamSDK | 5.1.0 |
Cuda | 10.2 |
TensorRT | 7.1 |
cuDNN | 8.0 |
libNVWarp360 | 2.0.1d3 |
gstreamer | 1.0 |
Docker | 19.03.6 |
Docker Compose | 1.29.1 |
Python | 3.6 |
Simple Realtime Server | 4.0 |
Apache | 2.4.29 |
ffmpeg | 3.4.8-0ubuntu0.2 |
OBS | 27.2.4 (Linux) |
YOLOV4 | 2020 |
SRS/6.0.33 | OS System | 10 Load | Others | ||||
---|---|---|---|---|---|---|---|
Alive | 4d 23:08:29 | Alive | 4d 04:59:04 | Internet | 0 Kbps/0 Kbps | CPU | 16/16 |
CPU | 3.00%/1600.00% | CPU | 448.00%/1600.00% | Intranet | 28 Mbps/25 Mbps | PID | 12086 |
Memory | 2% 502 MB/31 GB | Memory | 30% 9 GB/31 GB | Conns | 76 30 21 13 | PPID | 10741 |
Network | 4/8 Mbps/3 Mbps | Load | 4.73/4.61/4.51 | Disk | 0% OKBps 4 MBps | Ready | Yes |
FPS | Motorbike | Car | Person |
---|---|---|---|
24.5 | 93%; 92%; 90%; 89%; 87%; 81% | 87%; 86% | 96%; 90%; 90%; 87% |
28.4 | 93%; 91%; 90%; 89%; 86% | 87%; 86% | 96%; 90%; 90%; 87% |
27.2 | 93%; 92%; 90%; 89%; 86% | 87%; 86% | 96%; 90%; 90%; 87% |
29.4 | 93%; 92%; 90%; 89%; 86% | 87%; 86% | 96%; 90%; 90%; 87% |
28.7 | 93%; 92%; 90%; 89%; 86% | 87%; 86% | 96%; 90%; 90%; 87% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Shih, W.-C.; Wang, Z.-Y.; Kristiani, E.; Hsieh, Y.-J.; Sung, Y.-H.; Li, C.-H.; Yang, C.-T. The Construction of a Stream Service Application with DeepStream and Simple Realtime Server Using Containerization for Edge Computing. Sensors 2025, 25, 259. https://doi.org/10.3390/s25010259
Shih W-C, Wang Z-Y, Kristiani E, Hsieh Y-J, Sung Y-H, Li C-H, Yang C-T. The Construction of a Stream Service Application with DeepStream and Simple Realtime Server Using Containerization for Edge Computing. Sensors. 2025; 25(1):259. https://doi.org/10.3390/s25010259
Chicago/Turabian StyleShih, Wen-Chung, Zheng-Yao Wang, Endah Kristiani, Yi-Jun Hsieh, Yuan-Hsin Sung, Chia-Hsin Li, and Chao-Tung Yang. 2025. "The Construction of a Stream Service Application with DeepStream and Simple Realtime Server Using Containerization for Edge Computing" Sensors 25, no. 1: 259. https://doi.org/10.3390/s25010259
APA StyleShih, W.-C., Wang, Z.-Y., Kristiani, E., Hsieh, Y.-J., Sung, Y.-H., Li, C.-H., & Yang, C.-T. (2025). The Construction of a Stream Service Application with DeepStream and Simple Realtime Server Using Containerization for Edge Computing. Sensors, 25(1), 259. https://doi.org/10.3390/s25010259