Now a days there is lot of brouhaha over Internet of Things, a special version of internet where things can communicate. This bug was inserted into me by Giga Om. If you ask any so called experts what Internet of Things is they will start giving you a view of future where traffic lights are controlled over the internet by signals sent from vehicle density sensors, a Refrigerator ordering milk when its over.
The applications of Internet of Things are varied, but Internet of Things at its core is simple. The main issue with Internet of Things is protocol which machines must understand, a target which is impossible for for-profit companies. In order for Internet of Things to succeed A Nest product must work nice with GE Product, Philips product, which is impossible. The Internet of Things device work like dual function devices. The devices can act push devices or receive devices, whereas majority of protocols work like server, responding when some human client asks. Before jumping into Internet of Things, its necessary know the layers of TCP/IP stack and the responsibilities of each layer.
The TCP/IP Layer and Responsibilities of Each Layers
The 4 layers of TCP/IP model are:
Link Layer [Wikipedia]
Internet Layer [Wikipedia]
Transport Layer [Wikipedia]
Application Layer [Wikipedia]
The Link Layer is bottom most layer in TCP/IP Suite. Its combination of Physical and Data Link Layer of OSI Model.The main responsibility of this layer is to send the frames reliably from host(current device) to device at other end of line. The device at other end can be router, PC, mobile etc… The line can be physical line like DSL, Ethernet,ISDN etc.. or wireless lines like Wi-Fi, Bluetooth, GPRS etc..
The Internet Layer sits above Link Layer. This layer corresponds to Network layer in OSI Model. The main responsibility of this layer is to send the packets across vast network of devices called as “The Internet”. If I enter www.google.com in my browser, its responsibility of internet layer to contact Google. The IP(Internet Protocol) works at this layer.
The Transport Layer sits above Internet Layer. The main aim of this layer is to provide end to end connection reliability. The TCP gives impression of fixed path for information flow. This layer also provides for buffer control, where sender and receiver communicate at mutually acceptable speeds. The protocol of this layer provide for ports to allow multiple application layer protocols to send data.
The Application layer is topmost layer of TCP/IP as well as OSI Model. Its this layer which interacts with users. There are huge array of Application Layer protocols. Bit Torrent, HTTP/HTTPS, FTP, SMTP are some of the famous ones. If one wants to write a protocol for Internet of Things, its this layer which protocol has to function.
My thoughts on Internet of Things Protocol(IoT Protocol)
The Internet of Things is more over like ‘skynet’ of terminator series. Though humans have lot of independent thinking which enables them to even understand ambiguous statements, computers are not intelligent enough and all of them needs to talk same language(protocol) to understand each other. With companies promoting their proprietary shits like Health Kit, Android Auto, Car Play its impossible for IoT to take off because of the incompatibility between the two.
With grand ambition of bringing almost all forms of machine under this umbrella, there are certain use cases which are apparently visible. And certain mannerism required from device receiving and sending the commands. The list of expectations from the protocol are.
Interoperability: the protocol must be able to send messages to devices which not made by same manufacturer and also push different class of device like Fridge, TV, Car, Traffic Light, etc…
Push / Pull operations: The device must be able to Push events to other device like bell ringing events to devices having speakers etc.. It should also ask device to respond to its queries, like smartphone asking temperature sensors to report temperature inside an enclosure they are monitoring.
Command Groups: Like the processors have command sets which are specialised in works they do like Encryption, Media Encoding, etc.., the protocol is supposed to have command sets for things like traffic and vehicles, health, home automation, power and electricity, defence and offence, etc..
Other Protocol compatibility: The way when a command is executed the operating systems gives way to command program to do what ever it wants with users, this protocol must only send command to concerned device and relinquish control to users. For example if user send command to TV to play a video present on home NAS Box, the protocol must establish connection between TV and NAS Box and let the video streaming protocol to do the work of video playback.
In this way the protocol must act like operating system. Keeping track of all resources and devices on network and let the other protocols do the user Interfacing functions.
The simplest IoT protocol that comes to my mind is made of 3 parts.
The first part can be text like Push/Pull which indicates handling devices what it expects. whether message is pushed to it cause an event has fired(like bell ringing), or pull indicating that I need to do some thing and I need data from you(like smartphone asking for temperature data).
The second part is Command Identifier. The Java like package system is suitable in this case. for example commands like ‘auto.horn’ or ‘home.bell_ring’ are more easier to understand and manage.
The third part is option list which is optional. Here one can adopt lot of schemes. Ideal is bundles of key value pairs, which will allow the data type of ‘value’ to be anything it wants – Boolean, numeric, character, data structure or other. There can 0 to N Key Value pairs in option bundle. For example options like temptype=’celcius’ for command asking temperature ,activate=’true’, protocol=’streaming video’ ,setGear=’3’ are good. Here setGear is key and 3 is value.
This is what I think about Internet of Things and how the protocol should work. The way computers took out the problems of calculation from our backs, this IoT will take out the needs to control the machines all the time. Article is licenced under creative commons hence don’t hesitate building one such open source protocol mentioned. I would like hear out your ideas, do share it in comments.