Can an embedded web server solve for the IoT?

August 26, 2016

Blog

Can an embedded web server solve for the IoT?

Can an embedded web server really be an alternative to building an entire Internet of Things (IoT) infrastructure? Depending on what you are trying to...

Can an embedded web server really be an alternative to building an entire Internet of Things (IoT) infrastructure? Depending on what you are trying to achieve, the tool you are evaluating and the size of the code that links your web server to the hardware, it absolutely can. We are going to dive into a few scenarios and tips on what to look out for when choosing this development path.

Gain efficiencies in cost and development time

For many IoT applications, embedding a HTTP/WebSocket server on a device is enough to get the job done. Oftentimes, this solution can be faster, simpler and more cost-effective. Just be aware that a bare web server will still need additional code to link it to the hardware.

The prerequisite for this generally is that the solution you choose is not just an embedded web server, but also hits on networking library functionalities. A comprehensive solution should provide you with the ability to serve Web GUI on devices, implement RESTful services, RPC (e.g. JSON-RPC), asynchronous WebSocket communication, and handle telemetry data exchange amongst other functionalities.

When these prerequisites are met, your embedded web server can solve remote access by creating a dashboard server, enable predictive maintenance as well as data collection and monitoring on a one-to-many level, or offer real-time and server-side data push.

A solution like this can look after all of these IoT functionalities with less complexity and investment than a full-scale IoT infrastructure.

When is an embedded web server not enough?

So why bother with an IoT infrastructure at all? Simply put, if you want to go beyond the basic functionality, you do need a full solution. Remember, an embedded web server is part of a full IoT infrastructure and not the full hog.

Depending on the IoT platform you are evaluating, you will find solutions for Over-the-Air Updates that are vital to keep the product and data security up to date. There are specific solutions for device management as well as solutions that offer industry-specific applications for farming, healthcare, Industrial IoT, and more.

Seven elements to watch out for when evaluating options

If you find that an embedded web server could do the job well for you, then you have quite a few providers to choose from. Wikipedia alone lists more than 30 on their comparison page. I would recommend evaluating these using a number of criteria.

Try before you buy

Can you see and test the tool before you purchase? Although it is the simpler option, not every tool will work with your existing systems. You need to be able to test before you commit and have the option to clarify questions during this time.

Simplicity

Can the tool do the job well and do it simply? Is it plug and play? Ideally, you want to take existing code and be able to integrate it by adding some additional lines.

Look for clarity when checking out the embedding API. To make embedding easy, the source should be in a single file.

Size

If you are integrating with your existing product, you need to find a solution that is compact and lightweight enough to give you room to maneuver.

Security

Security is the hot topic in IoT and it is vital to get right. Use SSL/TLS and have an authentication mechanism in place should the units be accessed remotely.

Stability & Maturity

Go with a solution that your peers trust and that has been around the block a few times. Check GitHub and other communities to see how actively the project is contributed to and updated.

Flexibility

Choose a solution that is platform-agnostic. That way, if you want to make a move and develop on eCos, UNIX/Linux, Windows, MacOS, or take things into the app space with iPhone or Android, your selected solution will let you do this.

Support

Ideally, you want a solution that is simple and straightforward enough that you won’t need support. However, especially if this is a first time integration project, the option to actually pick up the phone and talk to someone directly is comforting and will ensure you can move your project forward quickly.

Making the call

Making the call for the right solution really starts with understanding your own needs. Take an honest look at capabilities in terms of the level of complexity that can be handled and maintained. This will also help you decide on the type of partner you choose and the level of support needed.

Developing an IoT-enabled product does not necessarily mean that you need a full IoT infrastructure. An embedded web server with networking library capabilities may be the simpler and more cost-effective option.

Sergey Lyubka is the co-founder and CTO of Cesanta. He is the author of Mongoose Embedded Web Server and his innovations are implemented by tech pioneers such as NASA, Samsung, and Ubisoft.

Sergey Lyubka, Cesanta
Categories
IoT