A Belgium based high-tech company was rolling out an IoT based pluggable device to collect data from different household measurement devices. The device was designed to be used with a host of third party products that would collect building utility readings such as electricity, water, gas etc and upload the data to a back-end server. Tismo was brought on board to build a tool that would enable scalability and stress testing of the server.
Tismo understood that effective scalability and stress testing of the server could not be done using readily available simulations tools. This was due to the fact that they did not offer the degree of customizability necessary to properly mimic the complex functionalities of the IoT devices. It would require a custom built tool to simulate tens of thousands of IoT devices that would simultaneously upload data to the server.
Tismo’s task was to build a tool which would simulate the functionalities of the IoT devices. While performing scalability and stress testing of the server, the tool would also have to create several thousand instances of the virtual devices. Each virtual device instance would have to be capable of working independently, sending requests to the server.
Tismo developed an IoT device simulator tool using C# on ASP.NET framework to enable the scalability and stress testing of the server. The tool mimicked all functionalities of the pluggable IoT device, including communication with server, time update, firmware upgrade checks, configuration checks, status reporting, data logging, heartbeat request to check device availability, and actual usage reporting. Additionally, the tool supported ‘spreading functionality’, in that the virtual instances were activated at varying time intervals. This was configured to be similar to a real world scenario, and the sequence was programmed to be repeated to perform scalability and stress testing of the server. The capability of the tool to vary the number of simulated instances allowed the client to measure the performance of the server while scaling up or down, as per the number of requests.
The IoT device simulator tool developed by Tismo simulated a maximum of one million virtual instances of the IoT device. This allowed effective stress testing of the server. A configuration file was used to initialize the simulation. Skilled thread optimization was employed to create the large scale simulation without performance issues. The tool was designed to generate an identifier code corresponding to data from each utility meter and upload the data to the server via REST APIs over HTTPS. Log files were generated to capture the communicated data and server responses.
Tismo has extensive experience in designing scalable IoT architectures. The team recommended the addition of a feature that allowed the tool to be initialized from the command line. This implementation allowed the testing tool to be initiated and run automatically from software build automation tools. In effect, this feature supported automated testing of the server. The IoT device simulator tool also enabled debugging of server issues for future scalability needs.
The simulator developed by Tismo was able to closely replicate all the functionalities of the pluggable IoT device. The tool simulated one million instances, each with its own unique device identifiers. The tool mimicked a real world scenario, through ‘spreading functionality’ and enabled highly effective scalability and stress testing of the server.