Design and implementation of a REST API-based client-server architecture for multi-sensor IoT monitoring
Giva Andriana Mutiara1, Periyadi 1, Muhammad Rizqy Alfarisi1, Muhammad Aulia Rifqi Zain1, Muhammad Ghifar Rijali 1 and Fathurrohman Nur Rochim 1
Corresponding Author : Giva Andriana Mutiara
Recieved : 24-Oct-2024; Revised : 20-Mar-2025; Accepted : 22-Mar-2025
Abstract
This paper discusses the design and implementation of a representational state transfer (REST) application programming interface (API)-based client-server architecture for an internet of things (IoT) monitoring application with multiple sensors. The research aims to enable real-time monitoring of an integrated system consisting of more than ten sensors, utilizing ESP-32 and long-range (LoRa) communication. The monitoring system focuses on developing a web-based interface that allows remote access to real-time data changes, without detailing sensor functionality or energy consumption. The system employs a REST API for data transmission. Sensor data is collected by the ESP-32, transmitted over a long-range wide-area network (LoRaWAN), processed by the LoRa receiver, and then relayed via Wi-Fi to the API. The architecture follows an N-layer design, facilitating client-server communication, database synchronization, and data provisioning for the web interface. Performance testing was conducted on two nodes, each containing multiple sensors, across various scenarios to evaluate system efficiency, load capacity, security, and dashboard functionality. Results show that the API response time for data retrieval from the two nodes ranged between 200 and 400 milliseconds. System performance begins to degrade beyond 1,500 users, with an observed error rate of 1.72% for node-1 and 0.9% for node-2. Security tests confirm the system’s resistance to various security threats. Dashboard monitoring results indicate that data can be displayed with a latency of less than one second.
Keywords
REST API, Internet of things (IoT), Client-server architecture, Real-time monitoring, LoRa communication, Multi-sensor system.
References
[1] Nugraha AK, Mutiara GA, Gunawan T, Hapsari GI. Android-based system monitoring of supporting variables for nursery-plant growth in plantation areas. JOIV: International Journal on Informatics Visualization. 2023; 7(1):51-7.
[2] Pratama FD, Mutiara GA, Meisaroh L. A virtual cage for monitoring system semi-intensive livestock’s using wireless sensor network and haversine method. Jurnal Infotel. 2023; 15(2):201-8.
[3] Javaid M, Haleem A, Singh RP. Health informatics to enhance the healthcare industry's culture: an extensive analysis of its features, contributions, applications and limitations. Informatics and Health. 2024; 1(2):123-48.
[4] Nižetić S, Šolić P, Gonzalez-de DL, Patrono L. Internet of things (IoT): opportunities, issues and challenges towards a smart and sustainable future. Journal of Cleaner Production. 2020; 274:1-32.
[5] Pathmudi VR, Khatri N, Kumar S, Abdul-qawy AS, Vyas AK. A systematic review of IoT technologies and their constituents for smart and sustainable agriculture applications. Scientific African. 2023; 19:1-14.
[6] Sasi T, Lashkari AH, Lu R, Xiong P, Iqbal S. A comprehensive survey on IoT attacks: taxonomy, detection mechanisms and challenges. Journal of Information and Intelligence. 2024; 2(6):455-513.
[7] Martens CD, Da SLF, Silva DF, Martens ML. Challenges in the implementation of internet of things projects and actions to overcome them. Technovation. 2022; 118:102427.
[8] Tawalbeh LA, Muheidat F, Tawalbeh M, Quwaider M. IoT privacy and security: challenges and solutions. Applied Sciences. 2020; 10(12):1-17.
[9] Kumar S, Tiwari P, Zymbler M. Internet of things is a revolutionary approach for future technology enhancement: a review. Journal of Big Data. 2019; 6(1):1-21.
[10] Chyrun L, Gozhyj A, Yevseyeva I, Dosyn D, Tyhonov V, Zakharchuk M. Web content monitoring system development. In COLINS 2019 (pp. 126-42).
[11] Rakhmawati NA, Ferlyando V, Samopa F, Astuti HM. A performance evaluation for assessing registered websites. Procedia Computer Science. 2017; 124:714-20.
[12] Tapia F, Mora MÁ, Fuertes W, Aules H, Flores E, Toulkeridis T. From monolithic systems to microservices:a comparative study of performance. Applied Sciences. 2020; 10(17):1-35.
[13] Awais M, Iqbal J. Layered architecture of internet of things-a review. Proceeding book of 2nd international conference on scientific and academic research 2023 (pp.124-31).https://as-proceeding.com/index.php/icsar/article/view/281
[14] Mena M, Criado J, Iribarne L, Corral A, Chbeir R, Manolopoulos Y. Towards high-availability cyber-physical systems using a microservice architecture. Computing. 2023; 105(8):1745-68.
[15] Rescati M, De MM, Paganoni M, Pau D, Schettini R, Baschirotto A. Event-driven cooperative-based internet-of-things (IoT) system. In international conference on IC design & technology 2018 (pp. 193-6). IEEE.
[16] Hamdan S, Ayyash M, Almajali S. Edge-computing architectures for internet of things applications: a survey. Sensors. 2020; 20(22):1-52.
[17] Hossain MD, Sultana T, Akhter S, Hossain MI, Thu NT, Huynh LN, et al. The role of microservice approach in edge computing: opportunities, challenges, and research directions. ICT Express. 2023; 9(6):1162-82.
[18] Rathore N, Rajavat A, Patel M. Investigations of microservices architecture in edge computing environment. In social networking and computational intelligence: proceedings of SCI-2018 2020 (pp. 77-84). Springer Singapore.
[19] Li L, Chou W, Zhou W, Luo M. Design patterns and extensibility of REST API for networking applications. IEEE Transactions on Network and Service Management. 2016; 13(1):154-67.
[20] Thalor M, Allur SR, Bhende VS, Chavan A. Analysis of monolithic and microservices system architectures for an E-commerce web application. International Journal of Intelligent Systems and Applications in Engineering (IJISAE). 2024; 12(4):2400–6.https://ijisae.org/index.php/IJISAE
[21] Zulkarnaini Z, Wahyuningrum I, Octarina A. Monolithic architecture integrated web application school educational management information system. In proceedings of the 7th first international conference on global innovations (FIRST-ESCSI 2023) 2024 (pp. 398-407). Springer Nature.
[22] Saha T. Application development using microservice architecture. Culminating Projects in Computer Science and Information Technology. 2022.
[23] Elhoseny H, Hazem EB. Utilizing service oriented architecture (SOA) in IoT smart applications. Journal of Cybersecurity and Information Management. 2019; 0(1):15-31.
[24] Rashid T, Mustafa S. A review on IoT: layered architecture, security issues and protocols. International Journal of Computer Science and Network Security. 2023; 23(9):100-10.
[25] Abba AAA, Djedouboum AC, Gueroui AM, Thiare O, Mohamadou A, Aliouat Z. A three-tier architecture of large-scale wireless sensor networks for big data collection. Applied Sciences. 2020; 10(15):1-21.
[26] Gupta P, Mokal TP, Shah DD, Satyanarayana KV. Event-driven SOA-based IoT architecture. In international conference on intelligent computing and applications: ICICA 2016 (pp. 247-58). Springer Singapore.
[27] Belhe S, Barshikar S, Kadu S. Serverless computing and its impact on application development in cloud environments. International Journal of Technology Engineering Arts Mathematics Science. 2023; 3(2):22-8.
[28] Ouyang R, Wang J, Xu H, Chen S, Xiong X, Tolba A, et al. A microservice and serverless architecture for secure IoT system. Sensors. 2023; 23(10):1-24.
[29] Karaduman B, Oakes BJ, Eslampanah R, Denil J, Vangheluwe H, Challenger M. An architecture and reference implementation for WSN-based IoT systems. In emerging trends in IoT and integration with data science, cloud computing, and big data analytics 2022 (pp. 80-103). IGI Global Scientific Publishing.
[30] Dixit A, Trivedi A, Godfrey WW. IoT and machine learning based peer to peer framework for employee attendance system using blockchain. In international conference on augmented intelligence and sustainable systems 2022 (pp. 1088-93). IEEE.
[31] O‘g‘li TQ, Anatolevna AD, Ilgizarovna ZR. Exploring client-side and server-side architectures in web development: a comprehensive analysis. Science and Innovation. 2024; 3(17):654-8.
[32] Chen H, Xu L. Software architecture and framework for programmable automation controller: a systematic literature review and a case study. Machines.2016; 4(2):1-14.
[33] Khan SMA. Popular software architecture used in software development. Kindle Publisher; 2023:1-101. https://www.researchgate.net/publication/370715656_Popular_Software_Architecture_Used_In_Software_Development
[34] Vila M, Sancho MR, Teniente E. XYZ monitor: IoT monitoring of infrastructures using microservices. In international conference on service-oriented computing 2020 (pp. 472-84). Cham: Springer International Publishing.
[35] Alhajri K, Alghamdi M, Alrashidi M, Balharith T, Tabeidi R. Smart office model based on internet of things. In the international conference on artificial intelligence and computer vision 2021 (pp. 174-83). Cham: Springer International Publishing.
[36] Vanteru MK, Jayabalaji KA, Ilango P, Nautiyal B, Begum AY. Multi-sensor based healthcare monitoring system by LoWPAN-based architecture. Measurement: Sensors. 2023; 28:1-7.
[37] Ramu VB. Edge computing performance amplification. International Journal of Recent Advances in Science and Technology. 2023; 10(3):69-76.
[38] Medina S, Montezanti D, Gómez DL, Garay F, De GA, Naiouf M. Distributed architectures based on edge computing, fog computing and end devices: a conceptual review incorporating resilience aspects. In conference on cloud computing, big data & emerging topics 2023 (pp. 31-44). Cham: Springer Nature Switzerland.
[39] Katal A, Dahiya S, Choudhury T. Energy efficiency in cloud computing data center: a survey on hardware technologies. Cluster Computing. 2022; 25(1):675-705.
[40] Nguyen T, Nguyen H, Gia TN. Exploring the integration of edge computing and blockchain IoT: Principles, architectures, security, and applications. Journal of Network and Computer Applications. 2024:103884.
[41] Nyabuto MG, Mony V, Mbugua S. Architectural review of client-server models. International Journal of Scientific Research and Engineering Trends. 2024; 10(1):139-43.
[42] Hernández LM, Cadena AH, Vázquez JN, Magaña JÁ, Zea JM. REST (Representational State Transfer) architecture for enterprise web application development. Innovación Y Desarrollo Tecnológico Revista Digital. 2020; 12(3):219-27.
[43] Zaniewski P, Law RR. Comparative review of selected internet communication protocols. Foundations of Computing and Decision Sciences. 2023; 48(1):39-56.
[44] Koteswaramma R. Client-side load balancing and resource monitoring in cloud. International Journal of Engineering Research and Applications. 2012; 2(6):167-71.
[45] Chawngsangpuii R, Das P. Communication protocol in internet of things. International Journal of Innovative Technology and Exploring Engineering. 2020: 9(6): 1737-40.
[46] Ahmad I, Suwarni E, Borman RI, Rossi F, Jusman Y. Implementation of restful API web services architecture in takeaway application development. In 1st international conference on electronic and electrical engineering and intelligent system 2021 (pp. 132-7). IEEE.
[47] Tariq U, Ahmed I, Bashir AK, Shaukat K. A critical cybersecurity analysis and future research directions for the internet of things: a comprehensive review. Sensors. 2023; 23(8):1-46.
[48] Abbasi M, Plaza-hernandez M, Prieto J, Corchado JM. Security in the internet of things application layer: requirements, threats, and solutions. IEEE Access. 2022; 10:97197-216.
[49] William G, Anthony R, Purnama J. Development of NodeJS based backend system with multiple storefronts for batik online store. In proceedings of the 2020 international conference on engineering and information technology for sustainable industry 2020 (pp. 1-6). ACM.
[50] Rawat P, Mahajan AN. ReactJS: a modern web development framework. International Journal of Innovative Science and Research Technology. 2020; 5(11):698-702.
[51] Kaushik V, Gupta K, Gupta D. React native application development. International Journal of Advanced Studies of Scientific Research. 2019; 4(1):461-67.
[52] Quan Y. Design and implementation of e-commerce platform based on Vue.JS and MySQL. In 3rd international conference on computer engineering, information science & application technology 2019 (pp. 449-54). Atlantis Press.
[53] Dalimunthe S, Putra EH, Ridha MA. Restful API security using json web token (JWT) with hmac-sha512 algorithm in session management. IT Journal Research and Development. 2023; 8(1):81-94.
[54] Bucko A, Vishi K, Krasniqi B, Rexha B. Enhancing JWT authentication and authorization in web applications based on user behavior history. Computers. 2023; 12(4):1-18.
[55] Al-ali AR, Gupta R, Zualkernan I, Das SK. Role of IoT technologies in big data management systems: a review and smart grid case study. Pervasive and Mobile Computing. 2024: 101905.
[56] Rane NL, Paramesha M, Choudhary SP, Rane J. Machine learning and deep learning for big data analytics: a review of methods and applications. Partners Universal International Innovation Journal. 2024; 2(3):172-97.
[57] Fadillah WM, Mutiara GA, Periyadi P, Alfarisi MR, Meisaroh L. Vicinity monitoring of military vehicle cabin to improve passenger comfort with fusion sensors and LoRa RFM95W. Journal of Robotics and Control. 2024; 5(5):1216-26.
[58] Koo KY, Battista ND, Brownjohn JM. SHM data management system using MySQL database with MATLAB and web interfaces. In 5th international conference on structural health monitoring of intelligent infrastructure (shmii-5), Cancún, México 2011 (pp. 589-96).
[59] Sharanagowda K. A study on the client server architecture and its usability. IOSR Journal of Computer Engineering. 2022; 24(4):73-6.
[60] Du W, Li J, Wang Y, Chen L, Zhao R, Zhu J, et al. Vulnerability-oriented testing for restful APIS. In 33rd USENIX security symposium (USENIX Security 24) 2024 (pp. 739-55). USENIX Association.