Improving the Performance of Mobile IoT Applications

improving-performance-of-mobile-iot-applications

Over the last several years, smart home devices have found their way into homes across the world. The underlying technologies they communicate with may vary wildly, but almost all of them have one thing in common: the app interface. At Yonomi, we work with our customers to improve their mobile app experience for consumer IoT applications. Even if the rest of the product is rock solid, the app interface can make or break the experience for your users. One area that apps often struggle with is performance. Here are some techniques that can make a big difference for the performance of your IoT mobile app.

Making HTTP Work Smarter, Not Harder

Mobile devices have evolved into increasingly powerful tools, but still have constraints that require careful consideration - especially with communication. Inefficient communication has a snowballing effect on your user’s device. Requests may take longer and use more of their data (which might also be on a metered connection!) The radios on the device spend more time awake, using more energy than necessary. The processor spends more time awake, using more energy than necessary. The screen spends more time awake, because your user had to wait longer to complete their task.

Enter, HTTP. This article was delivered to you with it, and your next great connected device will likely use it. It’s popular for a reason: it’s easy to understand and work with, especially when you layer a concept like REST on top of it. There are several features and concepts it brings to the table that you can leverage with minimal engineering effort, and provide large impacts to a mobile app.

Leveraging Compression

Consider adding compression support to your HTTP backend, if you don’t already have it. JSON-encoded responses especially benefit from this, as they tend to contain lots of repeated data. Compression isn’t free though - it comes with a tradeoff of using less data in transport, with the penalty of additional processing on the sending and the receiving end. However, modern devices generally do not see a noticeable impact from this. If your connected device is resource constrained and cannot leverage compression, HTTP leaves the decision over compression up to the requester, so it can continue to use the same resources your mobile app does, without issue.

Adopting ETags

What’s an ETag? It’s short for an “entity tag”, and it acts like a fingerprint for any response you’ve received. Most mobile networking libraries support them out of the box, or only require a few lines of code. Implementation is mostly left to the server with this technique.

When a network request is made with your app, it’ll send the ETag along in the request headers. If nothing’s changed, instead of receiving a response like “200 OK” and content, the response will be a “304 Not Modified” and no content will be sent. The real response will be returned as expected by your HTTP library, but none of the work to actually send it the mobile client happened. This simple change can greatly improve responsiveness and reduce data usage in your app, especially on cellular connections where latency can vary.

Improving User Experience for Consumer IoT Apps is Simple

Techniques like response compression and ETags are just a few things you can do improve your app user experience. Auditing how your web servers respond to these portions of the HTTP standard can save you valuable time and effort required to adjust the entire baseline of performance for your application. If you’re not using HTTP, other modern and popular options often provide similar tools that you can use without having to build your own. At Yonomi, we use these techniques in the Yonomi One and ThinCloud platforms to reduce the footprint of our mobile apps, and even the platform itself.

 

Are you building a service or app for your industry?

Check out our Guide to Building a Smart Home Service to learn more about what it takes to get started..

Download Free Guide