An Introduction to Internet of Things (IoT)
IoT is the new buzz word that is an ecosystem of computer devices, automated/digital machines, objects, which hold unique identifiers and has the ability to transfer data over the network without involving human-to-human or human-to-computer interaction. The purpose of IoT is to have a fully connected world in which all objects are interoperable with one another regardless of manufacturer, specific device characteristics or functionality.
IoT and NodeJs
The key feature of any IoT driven application is to collect data, communicate, analyze and act accordingly on it. NodeJS makes a perfect choice for the above-mentioned features. Devices like sensors, beacons, transmitters, motors have a tendency of generating a large volume of data thereby generating a large number of requests. Node.js is well equipped to handle the requests through streams and is known for its speed, scalability and efficiency, making it a key player for data- intensive real-time applications. Moreover, it makes NodeJS well suited for IoT, which relies on data intensive real-time traffic.
Distributed Services Architecture
Distributed Services Architecture (DSA) is an open source IoT platform that facilitates device inter-communication, logic and applications at every layer of the IoT infrastructure. It allows for purpose-built products and services (i.e. DSLinks) to interact with one another in a decentralized manner.
Image Courtesy: http://iot-dsa.org/get-started/how-dsa-works
This architecture enables a network architect to distribute functionality between discrete computing resources. A network topology consisting of multiple DSLinks running on edge devices connected to a tiered hierarchy of brokers allows the system to be scalable, resilient to failure and take advantage of all computing resources available to it from the edge, the datacenter, the cloud and everything in between.
Core Components of DSA
DSA consists of three core components: DSBroker, DSLink and nodeAPI. The DSBroker acts as a router for incoming and outgoing streams and the DSLinks that are connected to the DSBroker act as originators of the data streams. The architecture allows DSBroker to connect to another DSBroker to form a scalable and distributed event stream processing network that impersonates neural connections in the human brain. The communication protocol between DSA nodes is facilitated by the nodeAPI, which ensures node compatibility and bi-directional control and monitoring ability between connected components.
- Broker: Brokers manage security, links, subscriptions, and node permissions. Other entities in the system can operate only as permitted by a broker
- DSLink: DSLinks create, publish, and interact with data. DSLinks, which connect to brokers, can subscribe to data in the DSA system, to receive data whenever the data changes. You can download DSLinks from IOT-DSA on Github
- Node: General term for the components connected by DSA. Node can be brokers, DSLinks, metrics, actions, attributes, or folders containing other nodes
- Metric: A metric is a key/value pair. The value can be any of the data types listed in Supported Data Types, including an arbitrary value map
- Data Node: Data nodes enable data to be stored on the broker's host server
- Action: An action is an invocable command that can affect an entity
- Attribute: An attribute is metadata for the selected entity, represented as a key/value pair
Upstream and Downstream Connections
A downstream entity requests permission and an upstream entity grants or refuses that permission. A broker is always upstream from its DSLinks. It could either upstream or downstream from another broker. Upstream and downstream connections are important concepts to understand when one configures permissions for multiple servers or brokers on one server.
IoT Use Case: Tracking Children Movement and Door Open Events from Mobile App
IoT-based solution goes a long way when it comes to monitoring child’s movements and raising alerts based on anomalies in daily activity. Family members will have a mobile application that would enable them to monitor children’s movement and set alert reminders. The movement of the child will be monitored through the data collected from a set of sensors installed at home. With the help of the mobile application, the family members will be able to create or change simple rules, which set alerts or reminders based on the activity of the children.
The system architecture includes a gateway device attached to various sensors, which constantly collects, filters and uploads all necessary data changes to a cloud application. The cloud application will have analytics components to learn children activity patterns, detect and alert on anomalies from normal routine.
- Local Setup at home contains a set of Motion Sensors, Responder DSLink(NodeJS) and DSBroker
- Cloud Setup contains DSBroker and DSLink(NodeJS) with Kafka integration
- Local DSLink will connect to sensor and reads the live sensor data and update the sensor values into the broker
- Motion : true; Motion : false
- Once the sensor and broker are ready to publish the motion sensor data, the Local DSLink will create upstream connection between local DSBroker and cloud DSBroker
- Cloud DSLink will subscribe for events from cloud DSBroker
- Data science algorithms consume the data from Kafka to analyse the anomaly detection
- As part of child monitoring, parents will have mobile app to see live sensor values
Innominds is a trusted innovation acceleration partner focused on designing, developing and delivering technology solution in specialized practices in Big Data & Analytics, Connected Devices, and Security, helping enterprises with their digital transformation initiatives. We build these digital practices on top of our foundational services of UX/UI, application development and testing for technology companies. From ideas to commercialization, Innominds provides great ideas, engineering talent and proven technology solutions that help our clients succeed in today’s highly competitive market.
Interested! For any demos or POCs, please write to us at firstname.lastname@example.org and know more about our offerings.