Thursday 8 May 2014

Internet of Things Architecture

I've recently been thinking about the Internet of Things or more specifically home automation and control.

I'm not happy with either of the 2 main methods for accessing Things remotely.  The first method is to poke holes in your firewall and do port forwarding.  This is a really great and simple method for 1 device.  For example if you have a WiFi thermostat to control your heating, it can connect to your home network and the router can be configured so incoming connections to the appropriate port are forwarded to the device.

This method is fine if you are technically strong enough to do this.

There are some downsides to this.
  • If you have more than 1 device, you now need to manage multiple port mappings since the port can't be shared
  • Manufacturers are new to this and the software isnt always flexible enough to allowing user defined mappings
  • You are poking holes in your firewall - are the devices secure from hackers?
  • The home user needs to be technically competent to do the configuration

The alternative method is for the device to connect to the manufactuers service and you access the device via the manufacturer.  This method also has downsides
  • Some manufacturers charge for the service. I personally distrust connections to the "mothership".
  • You are locked in to the manufacturer. What if they do bankrupt - do you  lose your service?
  • You are reliant on the security of the manufacturer
  • They could be gathering personal data about you 
The other problem with the centralised method is scale. Firstly the service provider needs to understand how to scale these systems.  It would be really annoying to not be able to turn the heating on because they can't cope with load - OK maybe extreme but it could happen. Secondly these systems are proprietary  - I end up with a login for my home thermostat, another for my home lighting maybe another for the dishwasher.  It also means it won't be possible for my LG dishwasher to chat with my Sony TV if it ever needed to.

Given we have had high profile events like Sony Playstation network being shut down for days due to hacking, I generally distrust the central control method.  It's feasible a hacker could create a denial of service attack on the electricity grid by deciding to turn on all the dishwashers in the world at the same time causing a huge power surge in demand triggering brown-outs.

I'm not sure what the solution is but I can't help thinking Software Defined Networking has a role to play here. SDN is good at address abstraction and both of the scenarios above are basically address abstraction problems.  The challenge is to be able to address the devices in the home in an open non-proprietary manner.