2. General Architecture
- The FIWARE backend IoT Device Management GE enables creation and configuration of IoT Agents (left part of Figure 1) that connect to sensor networks (ETSI M2M, MQTT, IETF CoAP, etc). IoT Agents solve the issues of heterogeneous environments where devices with different protocols approach to a common data format. IoT Agents act as mediators/translators between the protocols that devices use to send or receive information (HTTP Ultralight, MQTT, OMA Lightweight M2M), and a common language and data model across all the platform: FIWARE Next Generation Service Interfaces (NGSI) .
- The FIWARE Context Broker GE (center) to gather, publish, query and subscribe-to in-time IoT-enabled context information at large scale, in order to be used by hosted applications. The Context Broker implements the OMA NGSI-9/10 API  and it relays internally on the E-SilboPS component for all the publish/subscribe communication features. E-SilboPS provides the Context Broker with an elastic content-base publish/subscribe (CBPS) system specifically designed to support context-aware sensing and communication in IoT-based services.
3. Related Work
- Access Point (AP)
- dispatches incoming subscriptions to the correct matcher and broadcasts notifications to all matchers.
- Matchers (M)
- store incoming subscriptions in the internal structure, match notifications against subscriptions, and dispatch the local result set to the Exit Point layer.
- Exit Point (EP)
- collects all partial results sets coming from the Matcher layer, which it merges in the final results set and then sends the notification to all Connection Points found in this set.
- Connection Point (CP)
- represents the system entry and exit point; it handles the connection with clients and sends the received notifications to the interested subscribers; it forwards subscriber subscriptions and publisher notifications to the Access Point.
5. The Algorithm
5.1. Access Point Scaling
- Access Point layer:
- start or stop instances according to the new configuration.
- Matcher layer:
- no action.
- Exit Point layer:
- no action.
5.2. Matcher Scaling
- Access Point layer
- When receiving a Start Scale-In/Out message with a new matcher selector:
- Continue to broadcast notifications to all current matchers
- Buffer subscriptions in a queue
- Send Start Scale-In/Out message to all (old+new) matchers with the new matcher selector to be used
- When receiving a Change-Ready message:
- If in the scale-out phase, the notifications are no longer sent. (The notifications sent after change view could enter the new matcher instance, being matched sooner than other notifications from other matchers and reaching the Exit Point before the last notification of the previous group.)
- The Change-Matcher-On-Exit Point message is sent to all old matchers
- The Change-Matcher-Ready is sent to all (old+new) matchers
- The current selector is exchanged for the new selector received from Access Point
- While waiting Exit Point Matcher-Updated sends enqueued subscriptions to matchers
- When receiving a Exit Point Matcher-Updated message:
- If it is in scale-out phase, flush enqueued notifications
- Resume sending notifications
- Signal Scale-End to the Distributed Coordinator
- Matcher layer
- When the Matcher has received a Start Scale-In/Out message with a new matcher selector from all Access Points:
- Notifications continue to pass through the matcher using current matching algorithm (No subscriptions can arrive because they are buffered at Access Point layer.)
- Snapshot matcher’s Subscription Map
- Map snapshotted subscriptions set with new matcher selector and store the result in Map<Slice, Map<ConnectionID, Set<Subscription>>>
- Send the new mapping to each matcher and to itself
- When receiving a Add-Matcher-State message:
- The subscription set is added to the new matcher state
- When all Add-Matcher-State messages have been received, the Change-Ready message is sent to Access Point through the Distributed Coordinator
- When receiving Change-Matcher-On-Exit Point:
- Forward it to all Exit Points
- When receiving a Change-Matcher-Ready message:
- Swap matcher state for new one
- Start processing notifications and subscriptions
- Exit Point layer
- When receiving a Change-Matcher-On-Exit Point message:
- The new number of matchers is read from the DC and used as the current limit for notifications
- Exit Point-Changed is sent to DC
5.3. Exit Point Scaling
- Access Point layer
- When receiving Exit Point-Scaling:
- Forward Exit Point-Scaling to all matchers
- Matcher layer
- When receiving first Exit Point-Scaling:
- Read from the DC the number of Access Point and Exit Point instances
- Create the new Exit Point selector
- Start enqueueing notifications from that Access Point slice
- When receiving subsequent Exit Point-Scaling:
- Notifications from that Access Point slice are enqueued
- When receiving last Exit Point-Scaling:
- The new Exit Point selector is adopted and all enqueued notifications are flushed
- DONE message is sent to the DC to signal the end of current matcher reconfiguration
- Exit Point layer
- Instances are added or removed according to the new configuration
7. Future Work
Conflicts of Interest
- Memos, V.A.; Psannis, K.E.; Ishibashi, Y.; Kim, B.G.; Gupta, B. An Efficient Algorithm for Media-based Surveillance System (EAMSuS) in IoT Smart City Framework. Future Gener. Comput. Syst. 2017, (in press). [Google Scholar] [CrossRef]
- Laleh, T.; Mokhov, S.A.; Paquet, J.; Yan, Y. Context-Aware Cloud Service Brokerage: A Solution to the Problem of Data Integration among SaaS Providers. In Proceedings of the Eighth International C* Conference on Computer Science & Software Engineering, C3S2E ’15, Yokohama, Japan, 13–15 July 2015; ACM: New York, NY, USA, 2008; pp. 46–55. [Google Scholar]
- OpenStack. Available online: https://www.openstack.org/ (accessed on 6 September 2017).
- OpenNebula. Available online: https://opennebula.org/ (accessed on 6 September 2017).
- An, K.; Pradhan, S.; Caglar, F.; Gokhale, A. A Publish/Subscribe Middleware for Dependable and Real-time Resource Monitoring in the Cloud. In Proceedings of the Workshop on Secure and Dependable Middleware for Cloud Monitoring and Management (SDMCMM ’12), Montreal, QC, Canada, 3–5 December 2012; ACM: New York, NY, USA, 2012; pp. 3:1–3:6. [Google Scholar]
- Pavloski, M.; Gelenbe, E. Mitigating for Signalling Attacks in UMTS Networks. In Proceedings of the 29th International Symposium on Computer and Information Sciences, Information Sciences and Systems 2014—ISCIS 2014, Krakow, Poland, 27–28 October 2014; pp. 159–165. [Google Scholar]
- Alhamazani, K.; Ranjan, R.; Mitra, K.; Rabhi, F.A.; Jayaraman, P.P.; Khan, S.U.; Guabtni, A.; Bhatnagar, V. An overview of the commercial cloud monitoring tools: Research dimensions, design issues, and state-of-the-art. Computing 2015, 97, 357–377. [Google Scholar] [CrossRef]
- Google Pub/Sub. Available online: https://aws.amazon.com/sns/ (accessed on 6 September 2017).
- AWS Simple Notification Service. Available online: https://cloud.google.com/pubsub/docs/overview (accessed on 6 September 2017).
- Microsoft Azure Service Bus Messaging. Available online: https://azure.microsoft.com/en-us/documentation/articles/service-bus-messaging-overview (accessed on 6 September 2017).
- Mühl, G.; Fiege, L.; Pietzuch, P. Distributed Event-Based Systems; Springer: Secaucus, NJ, USA, 2006. [Google Scholar]
- Shen, H. Content-Based Publish/Subscribe Systems. In Handbook of Peer-to-Peer Networking; Shen, X., Yu, H., Buford, J., Akon, M., Eds.; Springer: Boston, MA, USA, 2010; pp. 1333–1366. [Google Scholar]
- Carzaniga, A.; Wolf, A.L. Forwarding in a content-based network. In Proceedings of the 2003 Conference on Applications, Technologies, Architectures, and Protocols for Computer Communications (SIGCOMM ’03), Karlsruhe, Germany, 25–29 August 2003; ACM: New York, NY, USA, 2003; pp. 163–174. [Google Scholar]
- Barazzutti, R.; Felber, P.; Fetzer, C.; Onica, E.; Pineau, J.F.; Pasin, M.; Rivière, E.; Weigert, S. StreamHub: A Massively Parallel Architecture for High-performance Content-based Publish/Subscribe. In Proceedings of the 7th ACM International Conference on Distributed Event-based Systems (DEBS ’13), Arlington, TX, USA, 29 June–3 July 2013; ACM: New York, NY, USA, 2013; pp. 63–74. [Google Scholar]
- Ma, X.; Wang, Y.; Qiu, Q.; Sun, W.; Pei, X. Scalable and elastic event matching for attribute-based publish/subscribe systems. Future Gener. Comput. Syst. 2014, 36, 102–119. [Google Scholar] [CrossRef]
- Li, M.; Ye, F.; Kim, M.; Chen, H.; Lei, H. A Scalable and Elastic Publish/Subscribe Service. In Proceedings of the 2011 IEEE International Parallel Distributed Processing Symposium (IPDPS), Anchorage, AK, USA, 16–20 May 2011; pp. 1254–1265. [Google Scholar]
- Barazzutti, R.; Heinze, T.; Martin, A.; Onica, E.; Felber, P.; Fetzer, C.; Jerzak, Z.; Pasin, M.; Rivière, E. Elastic Scaling of a High-Throughput Content-Based Publish/Subscribe Engine. In Proceedings of the 2014 IEEE 34th International Conference on Distributed Computing Systems (ICDCS ’14), Madrid, Spain, 30 June–3 July 2014; IEEE Computer Society: Washington, DC, USA, 2014; pp. 567–576. [Google Scholar]
- Vavassori, S.; Soriano, J.; Lizcano, D.; Jiménez, M. Explicit Context Matching in Content-Based Publish/Subscribe Systems. Sensors 2013, 13, 2945–2966. [Google Scholar] [CrossRef] [PubMed]
- FIWARE Internet of Things (IoT) Services Enablement Architecture. Available online: https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Internet_of_Things_%28IoT%29_Services_Enablement_Architecture (accessed on 6 September 2017).
- NGSI-9/NGSI-10 Information Model. Available online: https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/NGSI-9/NGSI-10_information_model (accessed on 6 September 2017).
- FIWARE NGSI Open RESTful API Specification. Available online: https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FI-WARE_NGSI_Open_RESTful_API_Specification (accessed on 6 September 2017).
- Mashup FIWARE Lab: Madrid Air Quality. Available online: https://mashup.lab.fiware.org/testuser/madrid-air-quality (accessed on 6 September 2017).
- Esposito, C.; Castiglione, A.; Palmieri, F.; Ficco, M.; Choo, K.K.R. A Publish/Subscribe Protocol for Event-Driven Communications in the Internet of Things. In Proceedings of the 2016 IEEE 14th International Conference on Dependable, Autonomic and Secure Computing, 14th International Conference on Pervasive Intelligence and Computing, 2nd International Conference on Big Data Intelligence and Computing and Cyber Science and Technology Congress (DASC/PiCom/DataCom/CyberSciTech), Auckland, New Zealand, 8–12 August 2016; pp. 376–383. [Google Scholar]
- Herbst, N.R.; Kounev, S.; Reussner, R. Elasticity in Cloud Computing: What It Is, and What It Is Not. In Proceedings of the 10th International Conference on Autonomic Computing (ICAC 13), San Jose, CA, USA, 26–28 June 2013; USENIX: San Jose, CA, USA, 2013; pp. 23–27. [Google Scholar]
- Stoica, I.; Morris, R.; Karger, D.; Kaashoek, M.F.; Balakrishnan, H. Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications. In Proceedings of the 2001 Conference on Applications, Technologies, Architectures, and Protocols for Computer Communications (SIGCOMM ’01), San Diego, CA, USA, 27–31 August 2001; ACM: New York, NY, USA, 2001; pp. 149–160. [Google Scholar]
- Eager, D.L.; Zahorjan, J.; Lozowska, E.D. Speedup Versus Efficiency in Parallel Systems. IEEE Trans. Comput. 1989, 38, 408–423. [Google Scholar] [CrossRef]
- Apache ZooKeeper. Available online: https://zookeeper.apache.org/ (accessed on 6 September 2017).
- Lehrig, S.; Eikerling, H.; Becker, S. Scalability, Elasticity, and Efficiency in Cloud Computing: A Systematic Literature Review of Definitions and Metrics. In Proceedings of the 11th International ACM SIGSOFT Conference on Quality of Software Architectures (QoSA ’15), Montreal, QC, Canada, 4–8 May 2015; ACM: New York, NY, USA, 2015; pp. 83–92. [Google Scholar]
- Chandy, K.M.; Lamport, L. Distributed Snapshots: Determining Global States of Distributed Systems. ACM Trans. Comput. Syst. 1985, 3, 63–75. [Google Scholar] [CrossRef]
- SilboPS. Available online: https://github.com/conwetlab/silbops (accessed on 6 September 2017).
- Lazowska, E.D.; Zahorjan, J.; Graham, G.S.; Sevcik, K.C. Quantitative System Performance: Computer System Analysis Using Queueing Network Models; Prentice-Hall, Inc.: Upper Saddle River, NJ, USA, 1984. [Google Scholar]
- Amdahl, G.M. Validity of the Single Processor Approach to Achieving Large Scale Computing Capabilities. In Proceedings of the Spring Joint Computer Conference ( AFIPS ’67 (Spring)), Atlantic City, NJ, USA, 18–20 April 1967; ACM: New York, NY, USA, 1967; pp. 483–485. [Google Scholar]
- Gustafson, J.L. Reevaluating Amdahl’s Law. Commun. ACM 1988, 31, 532–533. [Google Scholar] [CrossRef]
- Shapley, L.S. A value for n-person games. Contribution to the Theory of Games. Ann. Math. Stud. 1953, 2, 28. [Google Scholar]
- Roth, A.E. The Shapley Value: Essays in Honor of Lloyd S. Shapley; Cambridge University Press: Cambridge, UK, 1988. [Google Scholar]
- Karp, A.H.; Flatt, H.P. Measuring Parallel Processor Performance. Commun. ACM 1990, 33, 539–543. [Google Scholar] [CrossRef]
- Mao, M.; Humphrey, M. Auto-scaling to Minimize Cost and Meet Application Deadlines in Cloud Workflows. In Proceedings of the 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC ’11), Seatle, WA, USA, 12–18 November 2011; ACM: New York, NY, USA, 2011; pp. 49:1–49:12. [Google Scholar]
- Mao, M.; Humphrey, M. A Performance Study on the VM Startup Time in the Cloud. In Proceedings of the 2012 IEEE Fifth International Conference on Cloud Computing (CLOUD ’12), Honolulu, HI, USA, 24–29 June 2012; IEEE Computer Society: Washington, DC, USA, 2012; pp. 423–430. [Google Scholar]
- Mao, M.; Humphrey, M. Scaling and Scheduling to Maximize Application Performance within Budget Constraints in Cloud Workflows. In Proceedings of the 2013 IEEE 27th International Symposium on Parallel and Distributed Processing (IPDPS ’13), Boston, MA, USA, 20–24 May 2013; IEEE Computer Society: Washington, DC, USA, 2013; pp. 67–78. [Google Scholar]
- Galloway, J.M.; Smith, K.L.; Vrbsky, S.S. Power aware load balancing for cloud computing. In Proceedings of the World Congress on Engineering and Computer Science, San Francisco, CA, USA, 19–21 October 2011; Volume 1, pp. 19–21. [Google Scholar]
- Galloway, J.M.; Smith, K.; Carver, J. An Empirical Study of Power Aware Load Balancing in Local Cloud Architectures. In Proceedings of the 2012 Ninth International Conference on Information Technology—New Generations (ITNG ’12), Las Vegas, NV, USA, 16–18 April 2012; IEEE Computer Society: Washington, DC, USA, 2012; pp. 232–236. [Google Scholar]
- Nguyen, P.; Nahrstedt, K. Resource Management for Elastic Publish Subscribe Systems: A Performance Modeling-Based Approach. In Proceedings of the 2016 IEEE 9th International Conference on Cloud Computing (CLOUD), San Francisco, CA, USA, 27 June–2 July 2016; pp. 561–568. [Google Scholar]
- Internet of Food & Farm 2020, an European Union’s Horizon 2020 Research and Innovation Programme under Grant Agreement 731884. Available online: https://www.iof2020.eu/ (accessed on 6 September 2017).
- Poultry Chain Management Use Case of IoF2020. Available online: https://www.iof2020.eu/trials/meat/poultry-chain-management (accessed on 6 September 2017).
© 2017 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/).