IOT Messaging – Should we Head for the Cloud or P2P?

October 27, 2015

A clash of worlds.

IOT

With the gazillions of devices said to be part of the IOT world, how they interact and speak to each other is going to be important. When we talk about the Internet of Things, there are generally 3 network architectures that are available:

  • Star topology
  • P2P
  • Hubs and spokes

1# – Star Topology

The star topology means that each device gets connected to the data center – the cloud service. This is how most of our interent works today anyway – when you came to this website here, you got connected to my server and its hosting company to read this post. When you chat on Facebook, your messages goes through Facebook’s data centers. When your heat sensor has something to say… it will probably tell it to its server in the cloud.

Pros

  • We know how it works. We’ve been doing it for a long time now
  • Centralized management and control makes it easier to… manage and control
  • Devices can be left as stupid as can be
  • Data gets collected, processed and analyzed in a single place. This humongous amounts of data means we can derive and deduce more out of it (if we take the time to do so)

Cons

  • Privacy concerns. There’s a cloud server out there that knows everything and collects everything
  • Security. Assuming the server gets hacked… the whole network of devices gets compromised
  • As the number of devices grows and the amount of data collected grows – so do our costs to maintain this architecture and the cloud service
  • Latency. At times, we need to communicate across devices in the same network. Sending that information towards the cloud is wasteful and slower

2# – P2P

P2P means devices communication directly with each other. No need for mediation. The garage sensor needs to open the lights in the house and start the heating? Sure thing – it just tells them to do so. No need to go through the cloud.

Pros

  • Privacy. Data gets shared only by the devices that needs direct access to the data
  • Security. You need to hack more devices to gain access to more data, as there’s no central server
  • Low latency. When you communicate directly, the middleman isn’t going to waste your time
  • Scale. It is probably easier to scale, as the more devices out there doesn’t necessarily means most processing power required on any single device to handle the network load

Cons

  • Complicated management and control. How do these devices find each other? How do they know the language of one another? How the hell do you know what goes in your network?
  • There’s more research than real deployments here. It’s the wild west
  • Hard to build real smarts on top of it. With less data being aggregated and stored in a central location, how do you make sense and exploit big data analytics?

3# – Hubs and Spokes

As with all technology, there are middle ground alternatives. In this case, a hubs and spokes model. In most connected home initiatives today, here’s a hub device that sits somewhere in the house. For example, Samsung’s SmartThings revolves around a Hub, where all devices connect to it locally. While I am sure this hub connects to the cloud, it could send less or more data to the cloud, based on whatever Samsung decided to do with it. It serves as a gateway to the home devices that reduces the load from the cloud service and makes it easier to develop  and communicate locally across home devices.

Pros

  • Most of what we’d say is advantageous for P2P works here as well
  • Manageability and familiarity of this model is also an added bonus of this model

Cons

  • Single point of failure. Usually, you won’t build high availability and redundancy for a home hub device. If that device dies…
  • Who’s hub will you acquire? What can you connect to it? Does that means you commit to a specific vendor? A hub might be harder to replace than a cloud service
  • An additional device is one more thing we need to deal with in our system. Another moving part

But there’s more

In the recent Kranky Geek event, Tim Panton, our magician, decided to show how WebRTC’s data channel can be used to couple devices using a duckling protocol. To keep things short, he showed how a device you just purchased can be hooked up to your phone and make that phone the only way to control and access the purchased device.

You can watch the video below – it is definitely interesting.

YouTube video

To me this means that:

  1. We don’t discuss enough the network architectures and topologies that are necessary to make IOT a reality
  2. The result will be hybrid in nature, though I can’t say where will it lead us

You may also like

Comment

Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}