A Service Discovery Solution for Edge Choreography-Based Distributed Embedded Systems
Abstract
:1. Introduction
2. Materials and Methods
3. Basic Concepts
- Incoming data from sensors are stored among all interconnected edge machines in a distributed way. Assuming an edge computing layer composed by storage limited devices, this principle maximizes the use of memory.
- Discovery is managed by a unique broker server in the choreography system. This principle maintains consistency and facilitates the efficient use of service providers.
- Data providers. Receive data from sensors and deliver data to other services.
- Data consumers. Receive data from other services and maintain interoperability.
3.1. Discovery
3.2. Communication Patterns
3.2.1. Request‒Response Pattern
3.2.2. Datacentric Pattern
Algorithm 1 Subscribe and unsubscribe updates |
Init: The broker receives a message CASE:
|
3.2.3. Rule‒Server Pattern
3.3. Publishing and Unpublishing
4. Implementation and Results
- PROBE comprises the body with the type of sensor measurements, the minimum gathering frequency, and the way in which the consumer prefers to receive data. Message body is described with regular expressions.
- PROBE MATCH nests as many <d: ProbeMatches> sections as found matches, according to the publishing list. Each section includes in the scope the type of measurement, one delivery pattern, and the frequency. Messages are formed of strings, which makes message processing easier for the client. Instances are predefined in the system.
- RESOLVE returns a subcollection of <d: ProbeMatches>. In case of no valid response, the consumer will not start the second pair of requests‒response messages. In case of a rule‒server pattern, the message scope includes the variable var that is applicable to the rule. After receiving a RESOLVE package, the broker communicates with the target service provider, reporting the selected rule and variable. This communication between broker and target follows a request‒response pattern. The acknowledge of the target to adopt the rule with the specific variable triggers the RESOLVE MATCH message between broker and client.
- RESOLVE MATCH takes on great relevance in datacentric and request‒response patterns because the broker decides and assigns the provider to balance the load of the different subscribed target services. In the case of rule‒server patterns, RESOLVE MATCH = RESOLVE and the purpose is an acknowledgement.
4.1. Data Patterns Analysis
4.2. Latency Interpreter Analysis
- XFIPAMSG_payload {
- <d:Hello>
- <a:EndpointReference>
- <a:Address>Service.address</a:Address>
- </a:EndpointReference>
- <d:Types>i: humidity </d:Types>
- <d:Scopes> dataset </d:Scopes>
- <d:MetadataVersion>0000</d:MetadataVersion>
- </d:Hello>
- }
- XFIPAMSG_payload {
- <d:Hello>
- <a:EndpointReference>
- <a:Address> Service.address </a:Address>
- </a:EndpointReference>
- <d:Types> i:humidity </d:Types>
- <d:Scopes>
- Rule THRESHOLD percentage
- </d:Scopes>
- [<d:XAddrs> xs:localhost:9020 xs:192.168.1.215:9031 </d:XAddrs>]
- <d:MetadataVersion> 0001 </d:MetadataVersion>
- </d:Hello>
- }
4.3. CPU Usage and Memory Analysis
- (1)
- Figure 11 (upper) shows a machine hosting eight microservices but without data exchange. Services require half of the Raspberry Pi memory.
- (2)
- Figure 11 (middle) shows the eight microservices exchanging data. Three services are request–response data consumers; one service is request–response data provider; four services are datacentric providers. Data exchange is continuous, and messages are produced in a ratio between 0.4 and 1.0 s. The CPU usage increases up to 38%.
- (3)
- Figure 11 (lower) includes a ninth microservice, the broker. The experiment stresses CPU and memory. The broker receives on average 10 discovery probes per second from services hosted in RP2. CPU raises up to a 95% and memory usage near 100%. We observe that, in addition to discovery process times shown in Table 4, internal choreography message passing introduces a latency λ of 29.4 ms average per petition. The system is stable but λ ranges from 2 to 59 ms with a σ standard deviation of 18.07 ms in 135 samples.
- (4)
- Finally, data exchange between consumers and providers is stopped. Input and output broker messages maintain CPU activity up to 95%. The experiment reduces λ to 4.97 ms and σ to 2.52 ms in 250 samples.
5. Discussion
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Singh, K.; Tomar, D.S. Architecture, enabling technologies, security and privacy, and applications of internet of things: A survey. In Proceedings of the 2nd International Conference on I-SMAC: (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC 2018), Palladam, India, 30–31 August 2018. [Google Scholar]
- Ahmad, K.; Mohammad, O.; Atieh, M.; Ramadan, H. IoT: Architecture, challenges, and solutions using fog network and application classification. In Proceedings of the 19th International Arab Conference on Information Technology, Khalde, Lebanon, 28–30 November 2018; pp. 1–7. [Google Scholar]
- García, L.; Parra, L.; Jimenez, J.M.; Lloret, J.; Lorenz, P. IoT-Based Smart Irrigation Systems: An Overview on the Recent Trends on Sensor and IoT Systems for Irrigation in Precision Agriculture. Sensors 2020, 20, 1042. [Google Scholar] [CrossRef] [Green Version]
- Atlam, H.F.; Walters, R.J.; Wills, G.B. Fog Computing and the Internet of Things: A Review. Big Data Cogn. Comput. 2018, 2, 10. [Google Scholar] [CrossRef] [Green Version]
- Hejazi, H.; Rajab, H.; Cinkler, T.; Lengyel, L. Survey of platforms for massive IoT. In Proceedings of the IEEE International Conference on Future IoT Technologies (Future IoT), Eger, Hungary, 18–19 January 2018. [Google Scholar]
- Peltz, C. Web Services Orchestration and Choreography. Computer 2003, 36, 46–52. [Google Scholar] [CrossRef]
- Cherrier, S.; Langar, R. Services organization in IoT: Mixing orchestration and choreography. In Proceedings of the Global Information Infrastructure and Networking Symposium GIIS, Thesssaloniki, Greece, 23–25 October 2018. [Google Scholar]
- Rafique, W.; Qi, L.; Yaqoob, I.; Imran, M.; Rasool, R.U.; Dou, W. Complementing IoT Services through Software Defined Networking and Edge Computing: A Comprehensive Survey. IEEE Commun. Surv. Tutor. 2020, 22. [Google Scholar] [CrossRef]
- Taušan, N.; Markkula, J.; Kuvaja, P.; Oivo, M. Choreography in the Embedded Systems Domain: A Systematic Literature Review. Inf. Softw. Technol. 2017, 91, 82–101. [Google Scholar] [CrossRef] [Green Version]
- Taušan, N.; Markkula, J.; Kuvaja, P.; Oivo, M. Choreography modelling in the embedded systems domain: Requirements and implementation technologies. In Proceedings of the 4th International Conference on Model-Driven Engineering and Software Development, Rome, Italy, 19–21 February 2016. [Google Scholar]
- Fernández-Llatas, C.; Mocholí, J.B.; Moyano, A.; Meneu, T. Semantic Process Choreography for Distributed Sensor Management. In Proceedings of the International Workshop on Semantic SensorWeb (SSW), Valencia, Spain, 27–28 October 2010; pp. 32–37. [Google Scholar]
- Bayo-Montón, J.-L.; Martínez-Millana, A.; Han, W.; Fernadez-Llatas, C.; Sun, Y.; Traver, V. Wearable Sensors Integrated with Internet of Things for Advancing eHealth Care. Sensors 2018, 18, 1851. [Google Scholar]
- Martínez-Millana, A.; Bayo-Montón, J.-L.; Fernández-Llatas, C.; Merino-Torres, J.F.; Traver-Salcedo, V. Integration of Distributed Services and Hybrid Models Based on Process Choreography to Predict and Detect Type 2 Diabetes. Sensors 2018, 18, 79. [Google Scholar]
- Park, J.; Han, J.; Kang, K.; Hae Lee, K. The registry for sensor network discovery. In Proceedings of the IEEE International Conference on Engineering Complex Computer Systems, Auckland, New Zealand, 11–14 July 2011. [Google Scholar]
- Paik, H.-Y.; Lemos, A.L.; Barukh, M.C.; Benatallah, A.; Natarajan, B. Web Service Implementation and Composition Techniques; Springer Nature: Cham, Switzerland, 2017. [Google Scholar]
- Cappiello, C.; Meroni, G.; Pernici, B.; Plebani, P.; Salnitri, M.; Vitali, M.; Trojaniello, D.; Catallo, I.; Sanna, A. Improving Health Monitoring with Adaptative Data Movement in Fog Computing. Front. Robot. AI 2020, 7. [Google Scholar] [CrossRef]
- Lan, L.; Shi, R.; Wang, B.; Zhang, L.; Jiang, N. U Universal Complex Event Processing Mechanism based on Edge Computing for Internet of Things Real-Time Monitoring. IEEE Access 2019, 7, 101865–101878. [Google Scholar] [CrossRef]
- Plebani, P.; Salnitri, M.; Vitali, M. Fog computing and data as a service: A goal-based modeling approach to enable effective data movements. In International Conference on Advanced Information Systems Engineering, CAiSE 2018; Lecture Notes in Computer, Science; Krogstie, J., Reijers, H., Eds.; Springer: Cham, Switzerland, 2018; Volume 10816, pp. 203–219. [Google Scholar]
- Hamida, A.B.; Kon, F.; Lago, N.; Zarras, A.; Athanasopoulos, D.; Pilios, D.; Vassiliadis, P.; Georgantas, N.; Issarny, V.; Mathioudakis, G. Integrated CHOReOS Middleware—Enabling Large-Scale, QoS-Aware Adaptative Choreographies; Large Scale Choreographies for the Future Internet, Project number FP7-257178; HAL-Inria: Paris-Rocquencourt, France, 2013. [Google Scholar]
- Auitili, M.; Inverardi, P.; Tivoli, M. CHOReOS: Large scale choreographies for future internet. In Proceedings of the IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering, Antwerp, Belgium, 3–6 February 2014. [Google Scholar]
- Autili, M.; Di Salle, A.; Gallo, F.; Pompilio, C.; Tivoli, M. CHOReVOLUTION: Service Choreography in Practice. Sci. Comput. Program. 2020, 197, 102498. [Google Scholar] [CrossRef]
- ActnConnect, S. The Choreographic Platform Actorsphere. 2019. Available online: https://actnconnect.de/actorsphere-en (accessed on 28 November 2020).
- Weiß, A.; Andrikopoulos, V.; Gómez Sáez, S.; Hahn, M.; Karastoyanova, D. Chorsystem: A message-based system for the life cycle management of choreographies. In On the Move to Meaningful Internet Systems: OTM 2016 Conferences; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2016; Volume 10033, pp. 503–521. [Google Scholar]
- Cruz-Felipe, L.; Montesi, F.; Safina, L. Implementing Choreography Extraction, 2019, University of Southern Denmark. arXiv:1910.11741v1[cs.PL], 25 Oct 2019. Available online: https://kopernio.com/viewer?doi=arxiv%3A1910.11741&token=WzI0NTY0MDUsImFyeGl2OjE5MTAuMTE3NDEiXQ.UzxKxfiF38fj4ppe64RteSbJuLI (accessed on 2 January 2021).
- Arellanes, D.; Lau, K.-K. Evaluating IoT Service Composition Mechanisms for the Scalability of IoT Sytems. Future Gener. Comput. Syst. 2020, 108, 827–848. [Google Scholar] [CrossRef]
- Savanovic, Z.; Galleta, L. A type language for message passing component-based systems. In Proceedings of the 13th Interaction and Concurrency Experience (ICE), Cardiff, UK, 19–20 June 2020; pp. 3–24. [Google Scholar]
- Guanciale, R.; Tuosto, E. PomCho: A Tool Chain for Choreographic design. Sci. Comput. Program. 2020, 202, 102535. [Google Scholar] [CrossRef]
- Coto, A.; Guanciale, R.; Tuosto, E. Choreographic development of message-passing applications. In Coordination Models and Languages; Lecture Notes in Computer Science; Bliudze, S., Bocchi, L., Eds.; Springer: Cham, Switzerland, 2020; Volume 12134. [Google Scholar]
- Hahn, M.; Breitenbücher, U.; Leymann, F.; Weiβ, A. TraDE—A transparent data exchange middleware for service choreographies. In On the Move to Meaningful Internet Systems. OTM 2017 Conferences: OTM 2017; Lecture Notes in Computer Science; Panetto, H., Debruyne, C., Gaaloul, W., Papazoglou, M., Paschke, A., Ardagna, C.A., Meersman, R., Eds.; Springer: Cham, Switzerland, 2017. [Google Scholar]
- Hahn, M.; Breitenbücher, U.; Leymann, F.; Wurster, F.; Yussupov, V. Modeling data transformations in data-aware service choreographies. In Proceedings of the IEEE 22nd International Enterprise Distributed Object Computing Conference, Stockholm, Sweden, 16–19 October 2018; pp. 28–34. [Google Scholar]
- Seeger, J.; Deshmukh, R.; Sarafov, V.; Bröring, A. Dynamic IoT Choreographies. IEEE Pervasive Comput. 2019, 18, 19–27. [Google Scholar] [CrossRef] [Green Version]
- Chen, L.; Englund, C. Choreographing services for smart cities: Smart traffic demonstration. In Proceedings of the IEEE 85th Vehicular Technology Conf. (VTC Spring), Sydney, Australia, 4–7 June 2017. [Google Scholar]
- Obrien, P.D.; Nicol, R.C. FIPA Towards a Standard for Software Agents. BT Technol. J. 1998, 16, 51–59. [Google Scholar] [CrossRef]
- W3C. The SOAP message exchange model. In Simple Object Access Protocol (SOAP) 1.1; Box, D., David, E., Kakivaya, G., Layman, A., Mendelshohn, N., Nielsen, H.F., Thatte, S., Winer, D., Eds.; W3C: Cambridge, MA, USA, 2000. [Google Scholar]
- W3C. SOAP Version 1.2 Part 1: Messaging Framework; Gudgin, M., Hadley, M., Mendelsohn, N., Moreau, J.J., Nielsen, H.F., Karmarkar, A., Lafon, Y., Eds.; W3C: Cambridge, MA, USA, 2007. [Google Scholar]
- Kalyanam, K.R.; Batts, J.; Kim, J.; Singh, S.; Vo, T.; Yan, C. Investigating Messaging Protocols for the Internet of Things (IoT). IEEE Access 2020, 8, 94880–94911. [Google Scholar]
- Shelby, Z.; Hartke, K.; Bormann, C. The Constrained Application Protocol (CoAP); RFC 7252; IETF Constrained RESTful Environments Working Group: Fremont, CA, USA, 2014. [Google Scholar]
- Yassein, M.B.; Shatnawi, M.Q.; Aljwarneh, S.; Al-Hatmi, R. Internet of things: Survey and open issues of MQTT protocol. In Proceedings of the International Conference on Engineering & MIS (ICEMIS), Monastir, Tunisia, 8–10 May 2017; pp. 1–6. [Google Scholar]
- Stanford-Clark, A.; Truong, H.L. MQTT for Sensor Networks (MQTT-SN); Protocol Specification: Version 1.2; International Business Machines Corporation (IBM): Armonk, NY, USA, 2013. [Google Scholar]
- Quoc Uy, N.; Hoai Nam, V. A comparison of AMQP and MQTT protocols for the internet of things. In Proceedings of the 6th Conference on Information and Computer Science (NICS), Hanoi, Vietnam, 12–13 December 2019; pp. 292–297. [Google Scholar]
- XMPP. Available online: https://xmpp.org/uses/internet-of-things.html (accessed on 28 November 2020).
- OMG. DDS Standards: DDS v1.4., 2015, DDSI-RTPS v2.3. 2019. Available online: www.omg.org/spec/DDS (accessed on 22 November 2020).
- Rahmani, A.M.; Gia, T.N.; Negash, B.; Anzanpour, A.; Azimi, I.; Jiang, M.; Liljeberg, P. Exploiting Smart e-Health Gateways at the Edge of Healthcare Internet-of-Things: A Fog Computing Approach. Future Gener. Comput. Syst. 2018, 78, 641–658. [Google Scholar] [CrossRef]
- Bimschas, D.; Hellbrück, H.; Mietz, R.; Pfisterer, D.; Römer, K.; Teubler, T. Middleware for smart gateways connecting sensornets to the internet. In Proceedings of the 5th International Workshop on Middleware Tools, Services and Run-Time Support for Sensor Networks, New York, NY, USA, 29 November–3 December 2010; pp. 8–14. [Google Scholar]
- Khalifeh, A.; Aldahdouh, K.A.; Darabkh, K.A.; Al-Sit, W. A survey of 5G emerging wireless technologies featuring LoRaWAN, Sigfox, NB-IoT and LTE-M. In Proceedings of the International Conference on Wireless Communications Signal Processing and Networking (WiSPNET), Chennai, India, 19–21 March 2020; pp. 561–566. [Google Scholar]
- Augustin, A.; Yi, J.; Clausen, T.; Townsley, W.M. A Study of LoRa: Long Range & Low Power Networks for the Internet of Things. Sensors 2016, 16, 1466. [Google Scholar]
- Bouloukakis, G.; Georgantas, N.; Ntumba, P.; Issarny, V. Automated Synthesis of Mediators for Middleware-Layer Protocol Interoperability in the IoT. Future Gener. Comput. Syst. 2019, 101, 1271–1294. [Google Scholar] [CrossRef] [Green Version]
- Modi, V.; Kemp, D. (Eds.) Web Service Dynamic Discovery (WS-Discovery) Version 1.1; OASIS Standard: Burlington, MA, USA, 2009. [Google Scholar]
- Guinard, D.; Trifa, V.; Karnouskos, S.; Spiess, P.; Savio, D. Interacting with the SOA-Based Internet of Things: Discovery, Query, Selection, and On-Demand Provisioning of Web Services. IEEE Trans. Serv. Comput. 2010, 3, 223–235. [Google Scholar] [CrossRef] [Green Version]
- Sleman, A.; Moeller, R. SOA Distributed Operating Systems for Managing Embedded Devices in Home and Building Automation. IEEE Trans. Consum. Electron. 2011, 57, 945–952. [Google Scholar] [CrossRef]
- Zeng, W.; Zhang, S.; Yen, I.-L.; Bastani, F. Semantic IoT data description and discovery in the IoT-Edge-Fog-Cloud infrastructure. In Proceedings of the IEEE International Conference on Service-Oriented System Engineering, San Francisco, CA, USA, 4–9 April 2019. [Google Scholar]
- Al-Osta, M.; Bali, A.; Gherbi, A. Event Driven and Semantic based Approach for Data Processing on IoT Gateway Devices. J. Ambient Intell. Humaniz. Comput. 2019, 10, 4663–4678. [Google Scholar] [CrossRef]
- Regex NET. Available online: https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expressions (accessed on 21 October 2020).
- Huang, Z.; Zhao, W. The study of web service discovery: A clustering and differential evolution algorithm approach. In Proceedings of the IEEE 21st International Conference on High Performance Computing and Communications, Zhangjiajie, China, 10–12 August 2019; pp. 2618–2622. [Google Scholar]
- Obidallah, W.J.; Raahemi, B.; Ruhi, U. Clustering and Association Rules for Web Service Discovery and Recommendations: A Systematic Literature Review. SN Comput. Sci. 2020, 1, 27. [Google Scholar] [CrossRef] [Green Version]
Response Payload Size | Number of Responses | DB Access_Max Time |
---|---|---|
1 byte | 82 | 5 ms |
10 bytes | 80 | 5 ms |
100 bytes | 75 | 5 ms |
1K bytes | 42 | 20 ms |
10k bytes | 38 | 20 ms |
100k bytes | 20 | 50 ms |
1M bytes | 16 | 50 ms |
2M bytes | 7 | 100 ms |
Annotation | Description | Domain | Value |
---|---|---|---|
p | Pattern: request–response, datacentric and rule–server | String | REQRES, DATACENTRIC, RULESERV |
f | Time: milliseconds, seconds, minutes, hour | String | ms, s, m, h |
ch | Data ID (HELLO messages) | Integer | [00...99] |
r | treshold, average, tendency, maxmin | String | thrs, avg, tnd, max, min |
m | sensor model | String | Manufacturer ID |
RE Scope | S Scopes | RE | S |
---|---|---|---|
Send data on demand | p = REQRES | 24 ms | 7 ms |
Request type service frequency 5 m | p = REQRES + f = 5 m | 19 ms | 8 ms |
Req‒resp service | p = REQRES | 24 ms | 9 ms |
Hello, I am a req service | p = REQRES | 21 ms | 10 ms |
Send data every 30 m from DHT11 on channel 00 | p = DATACENTRIC + m = DHT11 + f = 30 m + ch = 00 | 50 ms | 27 ms |
Send every 1 h from SGP40 on ch 1 | p = DATACENTRIC + m = SGP40 + f = 1 h + ch = 01 | 84 ms | 32 ms |
Data frequency 30 m on channel 02 | p = DATACENTRIC + f = 30 m + ch = 02 | 64 ms | 19 ms |
Accept rules of threshold | p = RULESERV + r = thrs | 60 ms | 17 ms |
Accept rules of average | p = RULESERV + r = avg | 62 ms | 21 ms |
Req‒resp service and accept tendency rules | String_1: p = REQRES String_2: p = RULESERV + r = tnd | 113 ms | 78 ms |
Average rules, data every 30 m on ch 04 | String_1: p = DATACENTRIC + f = 30 m + ch = 04 String_2: p = RULESERV + r = avg | 135 ms | 89 ms |
1 | PROBE S Scopes | PROBE MATCH * Coherent with TYPE Field | RE | S |
---|---|---|---|---|
- | - | REQRES service | 4 ms | 3 ms |
Request every 1 h | p = DATACENTRIC + f = 1 h | 2 DATACENTRIC services | 17 ms | 9 ms |
Data every 1 h from SGP40 | p = DATACENTRIC + f = 1 h + m = SGP40 | 1 DATACENTRIC service | 20 ms | 10 ms |
Data from SGP40 | String_1: p = DATACENTRIC + m = SGP40 String_2: p = REQRES + m = SGP40 | 1 DATACENTRIC service | 27 ms | 21 ms |
Threshold service max 30 and min 14 | p = RULESERV + r = avg + arg = 30, 14 | 1 RULESERV service | 128 ms | 22 ms |
Avg service between A and B | p = RULESERV + r = avg + arg = A, B | 2 RULESERV services | 142 ms | 69 ms |
Data every 30 m and a thrs rule with max 31 and min 23 | String_1: p = DATACENTRIC + f = 30 m String_2: p = RULESERV + f = 30 m + r = thrs + arg = 31, 23 | 1 DATACENTRIC service + 1 RULESERV service | 167 ms | 96 ms |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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 (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Blanc, S.; Bayo-Montón, J.-L.; Palanca-Barrio, S.; Arreaga-Alvarado, N.X. A Service Discovery Solution for Edge Choreography-Based Distributed Embedded Systems. Sensors 2021, 21, 672. https://doi.org/10.3390/s21020672
Blanc S, Bayo-Montón J-L, Palanca-Barrio S, Arreaga-Alvarado NX. A Service Discovery Solution for Edge Choreography-Based Distributed Embedded Systems. Sensors. 2021; 21(2):672. https://doi.org/10.3390/s21020672
Chicago/Turabian StyleBlanc, Sara, José-Luis Bayo-Montón, Senén Palanca-Barrio, and Néstor X. Arreaga-Alvarado. 2021. "A Service Discovery Solution for Edge Choreography-Based Distributed Embedded Systems" Sensors 21, no. 2: 672. https://doi.org/10.3390/s21020672
APA StyleBlanc, S., Bayo-Montón, J.-L., Palanca-Barrio, S., & Arreaga-Alvarado, N. X. (2021). A Service Discovery Solution for Edge Choreography-Based Distributed Embedded Systems. Sensors, 21(2), 672. https://doi.org/10.3390/s21020672