Unreliable messaging Distribution Discovery Physical objects Asynchrony Dealing with places Delay tolerance Challenges Power source? Data services Security Identifying Integrity Autonomy Usability Provenance Visualizing Trust Privacy Governance Decentralization Manipulating Others Owner s Sharing things Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 126
Decentralization Governance Causality Integrity Privacy Logging data Data streams Requirements Explicit modeling Accountability Vivid modeling Research Approach Autonomy respecting Asynchronous Normative basis Decoupled Sharing things Governance Enactment Supports tracing Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 127
Contract Net Protocol: 1 Announce Sensor Sensor Sensor advertise advertise advertise Sensor advertise Manager advertise Sensor advertise advertise advertise Sensor Sensor Sensor Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 128
Contract Net Protocol: 2 Bid Sensor Sensor Sensor bid Sensor bid Manager Sensor bid bid Sensor Sensor Sensor Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 129
Contract Net Protocol: 3 Award Sensor Sensor Sensor Sensor award Manager Sensor Sensor Sensor Sensor Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 130
Contract Net Protocol Evaluated Generic protocol Can apply recursively Supports important properties Robustness against sensor failure Robustness against connectivity failure Incorporating economic features Not well specified Confuses interaction and internal reasoning Limited to two-party interactions Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 131
Main Architectural Elements Things Middleware Applications Users Sensors Discovery Selection Storage User Interface Actuators Monitoring Reasoner Control IoT emphasizes ownership Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 132
Decentralization Calls for a Multiagent Architecture Each agent represents an autonomous party, contains a reasoner; interact within Org Org User Interface User Interface Knowledge Base Agent Agent Knowledge Base Stream Processing Stream Processing Adapter & Thing Adapter & Thing Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 133
Emerging Standards Support Decentralization in Principle Application Authentication Bootstrapping Service Capability Gateway Device Based on ETSI draft TS 102 690, May 2014, http://docbox.etsi.org/smartm2m/open/latest_drafts/ Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 134
Comparing Traditional Web and IoT Protocols From ReST to Constrained RESTful Environments (CoRE) HTTP Application layer MQTT CoAP TCP Transport layer UDP IPv4 IPv6 Network layer 6LoWPAN Zigbee Ethernet WiFi Information Resource Data link layer IEEE 802.15.4 Thing Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 135
Protocol: MQTT Née Message Queue Telemetry Transport OASIS standard as of November 2014, v3.1.1 Focused on machine-to-machine communications Asynchronous Data parsimonious Small set of primitives, including Publish Subscribe Create and cancel subscriptions Configure last will and testament (LWT) notifications Detect disconnections without a disconnect message Send configured LWT notifications Three QoS levels (separately specified by sender and receiver) 0 At most once; message: publish; no message ID needed 1 At least once; resend with dup bit until puback received 2 Exactly once; server stores, then forwards to receivers Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 136
CoAP: Constrained Application Protocol IETF RFC 7252, June 2014 Asynchronous Data parsimonious Supports URIs Supports resource discovery from server HTTP-like verbs: get, put, post, delete Small set of request and response types Communication patterns Caching Block transfer of large content QoS support (message types) Confirmable con: require acknowledgment Nonconfirmable non: do not require acknowledgment Duplicates to be ignored by receiver Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 137
CoAP Tooling: Copper Plugin for Firefox Commands Discovery Headers Payload Credit: Matthias Kovatsch, http://people.inf.ethz.ch/~mkovatsc/copper.php Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 138
AMQP: Advanced Message Queuing Protocol OASIS standard as of October 2012, v1.0 Protocol distinguish from an API such as JMS Decouples communications from destination address Long-lived conversations Variety of communication patterns Intercept Delegate Multiplex and demultiplex Upcoming improvements Traffic flow and QoS Decentralized deployment and governance Multiple underlying protocols Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 139
AMQP Exchange Space Abstraction Sensor Broker Broker Consumer Local Area Exchange Wide Area Exchange Local Area Exchange Based on work with Ocean Observatories Initiative, UCSD Scripps Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 140
XMPP: Extensible Messaging and Presence Protocol Originally meant for collaboration and content sharing Adapted and enhanced for IoT via XMPP Extension Protocols XEP-0323: Internet of Things Sensor Data, v0.4, March 2015 Describes protocols and data formats for variety of needs Request sensor reading and responses thereto Requests with multiple responses Requests to multiple things Discovery: what features (including services) a thing supports Different from discovery of a thing Specification of quality of data value (termed QoS), e.g., Missing, estimated, manually read, delayed, invoiced,... Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 141
XMPP: Extensible Messaging and Presence Protocol XEP-0347: Internet of Things Discovery, v0.3, November 2014 Uses JID or Jabber ID or an XMPP address for various resources Registries Provisioning servers Things Specifies protocols and data formats for Finding a registry Registering a thing: a thing registers itself Specifies secret data for registration May provide the same data via a sticker (QR-code) on a physical thing Public things remain searchable after being claimed Owner claiming a thing (by supplying the secrets) Only claimed, currently owned, things can be searched Removing a thing from a registry Disowning or relinquishing a thing Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 142
Cloud Storage Eliminate need to set up complex storage services from scratch Replication Load balancing On demand File system Content delivery networking Variety of data services NoSQL (and NewSQL) databases Alternative to ACID databases Tradeoff strong consistency for low latency Database Cloud Storage Data Sensors Memory cache Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 143
Cloud Services Querying and transforming data Structured Query Language (SQL) Rule engines Complex event processing (CEP) Streaming SQL Continuous queries SQL-interface for event processing MapReduce programming Hosting and executing custom programs Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 144
ETSI s Service Capability Layer On top of connectivity: holdall for functional, security, and governance aspects Communication Semisynchronous: quick ack followed by full answer Asynchronous Works on top of another protocol, e.g., HTTP and CoAP Service capabilities Registration Access control Authentication Data transfer Subscribe and notify Handling groups Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 145
Fog Computing Cisco s term for decentralized or ground-level variant of cloud computing Intermediary between things and the cloud (data centers) Place computing, storage, services near the edge Process data closer to where it originates Many devices talk to one another Improve latency and throughput Improves treatment of autonomy with gains in Local governance Security Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 146
Event-Driven Architecture Consume and produce event streams Event attributes: ID, timestamp, and content values Sensor 0 Sensor 1 Rule A (Alerts) Rule B (Threats) Sensor 2 Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 147
Linked Data Highlights Web-based identity and network URIs identify resources Deferencing a URI produces a resource description Resources link to other resources Web-based semantics Encoded in a Semantic Web language, such as the Resource Description Framework, RDF Exploit underlying architecture, e.g., Domain Name System and Web servers, to locate resources Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 148
Linked Data for IoT Sensor data is worthless unless linked to something else! Describe things Link thing descriptions to one another Enable thing discovery Describe the information produced by things Describe how to configure things Enable things to exchange semantic information Facilitate reasoning Promote interoperability Supported by standards that incorporate URIs CoAP, ETSI s Service Capability Layer Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 149
Publishsubscribe Asynchrony Selection Registering Streams Discovering Topics Realizing IoT Description Enactment QoS specification Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 150
Precision Quality Power profile Data volume Nearby devices Mobility Context awareness Device Location Performance Throughput Environment Vehicles Latency Sensed attribute Price Selection Criteria Semantic query Reputation Similarity Owner or operator Social Approach Economic Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 151
Content Quality of service Social relationships Ontologies Inputs Outputs Data types Protocols Normative expectations Interaction descriptions Semantic Descriptions Semantic service descriptions Preconditions Results Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 152
Sharing Reputation Maintaining Engendering History-Based Selection Estimating Trust Provenance Credibility Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 153
Notification dialogue Planning SWE common data model Observation Services Registry Sensor Web Enablement Standards Alert subscription Information models Sensor ML v2.0, Feb 2014 Observations and measurements Indoor geospatial markup, Dec 2014 Location, v1.2, Sep 2008 Associated topics Credit: OGC Network, http://www.ogcnetwork.net/ Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 154
Safety: Approved Access Unsafe Removed local conflict between accept and reject Approved Access Unsafe { role Requester, C o n t r o l l e r, Source parameter out ID key, out item, out outcome private token, v a l u e //REMOVED: r e s p o n d e d R e q u e s t e r C o n t r o l l e r : r e q u e s t [ out ID, out item ] C o n t r o l l e r R e q u e s t e r : a c c e p t [ in ID, in item, out token ] //, out responded C o n t r o l l e r R e q u e s t e r : r e j e c t [ in ID, in item, out outcome ] //, out r e s p o n d e d C o n t r o l l e r Source : ask [ in ID, in item, in token ] Source R e q u e s t e r : p r o v i d e [ in ID, in item, in token, out v a l u e, out outcome ] } controller can send both accept and reject Thus outcome can be bound twice in the same enactment Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 155
Liveness: Approved Access Minus Ask Omitted the ask message Approved Access Minus Ask { role Requester, C o n t r o l l e r, Source parameter out ID key, out item, out outcome private token, responded, v a l u e R e q u e s t e r C o n t r o l l e r : r e q u e s t [ out ID, out item ] C o n t r o l l e r R e q u e s t e r : a c c e p t [ in ID, in item, out token, out r e s p o n d e d ] C o n t r o l l e r R e q u e s t e r : r e j e c t [ in ID, in item, out outcome, out r e s p o n d e d ] // C o n t r o l l e r Source : ask [ in ID, in item, in token ] Source R e q u e s t e r : p r o v i d e [ in ID, in item, in token, out v a l u e, out outcome ] } If controller sends reject, the enactment completes If controller sends accept, the enactment deadlocks Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 156
Safety and Liveness Violations Approved Access Unsafe Approved Access Minus Ask R C S request accept ask reject provide R C S request accept provide Cannot occur Safety Violation Liveness Violation Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 157
IoT Hourglass: Few Platforms for Many Applications Benefit from the upper layers; excitement from the lower layer Consumers Providers Applications Platforms Infrastructure Devices Munindar P. Singh (NCSU) Service-Oriented Computing Fall 2015 158