CASE STUDY: FARO SCANNER PRODUCTION GMBH
About Faro Scanner Production GmbH
FARO develops and markets portable CMMs (coordinate measuring machines) and 3D imaging devices to solve dimensional metrology problems and provide 3D documentation solutions.
Their 3D documentation software SCENE is specifically designed for FARO laser scanners. SCENE processes and manages scanned data easily and efficiently by using automatic object recognition as well as scan registration and positioning. SCENE further generates high-quality colourised scans very quickly, while providing the tools for automated target-less scan positioning. Mongoose as part of SCENE provides a simple, reliable and fast HTTP server for their user interface.
Manuel Caputo, Software Developer at FARO, is part of the R&D team developing SCENE software: “My expertise lies in the infrastructure space, specifically the Chromium browser that is used to render the HTML UI inside our application and the embedded HTTP backend that provides the interface to the existing C++ core.”
He is the lead for the Mongoose integration.
Background to SCENE development
SCENE, like any great software, is in ongoing growth and development. “We are working on a future version of our software that will provide a new user interface that uses HTML components. This new HTML UI will access the existing C++ functionality using an HTTP interface. This will separate the core of the application from the front end, very much like in a typical modern web application. The web server that provides the HTTP interface is an embedded instance of Mongoose. The UI uses WebSocket connections and normal HTTP calls to communicate with the backend and fetch UI resources. Mongoose provides a simple, reliable and fast HTTP server which gives us more time to do actual application development instead of reinventing the wheel by implementing yet another HTTP server,”
Manuel tells us. Part of the project has already been completed and without Mongoose it wouldn’t have been possible.
What FARO wanted to achieve
The goal for this project was to provide a modern, simple and easy to understand user interface for their desktop application by using modern HTML5 and HTTP technology under the hood. “If the user doesn’t even notice that he is using an application based on web technologies, then we’ve achieved our goal. With Mongoose, we’ve done just that.”
There are future plans to provide an HTTP API for external developers that can be used to script their application and provide a customised experience via third party plugins and apps that are integrated into the application.
Why Mongoose was the right option
Manuel and the FARO team required an embeddable HTTP server that runs as part of their existing C++ codebase. When examining different HTTP server libraries written in C or C++, Manuel compared them using the following priorities:
- External dependencies / Easy embedding / Build system
- Simple and clean API
- Licensing & costs
- WebSocket and SSL support
- Platform portability
- Development is still ongoing & Professional support
- Size of the implementation
- Threading model
The main solutions he examined where Civetweb, Libonion, Libwebsockets, Libmicrohttpd, and Mongoose. Manuel goes into detail on his decision-making process: “I built a prototype and Mongoose just fulfilled all the requirements best. The big influences on the decision were that Mongoose is in continuous development, offers simple integration and easy API. Paid vs free soon became a discussion around which solutions offer the most value. Mongoose clearly won here.”
We wanted to dive a bit deeper into Manuel’s statement of the simple integration and asked about the implementation process: “Really easy. Just drop the two files into the MSVC solution, adjust a few compiler options and you are done. The first working HTTP request was possible in mere minutes. The API is very simple and made the integration an easy job.”
But FARO did come up against some challenges during the implementation around porting. They were able to solve for this by adding their own code to the open source embedded web server software of Mongoose. The additional support FARO purchased with Mongoose meant that our skilled engineering team was at hand to answer questions and assist with this challenge.
Mongoose was already shipped successfully with FARO’s last few releases of SCENE (5.5, 5.4 and 5.3). While we are not yet powering the complete UI, Mongoose is used for new functionality that is already implemented in HTML and of course for testing of the new UI. “As far as we know, there was not a single SCENE crash or bug that originated in the Mongoose code,”
Our final question to Manuel was whether there is anything he’d like others to know about working with the embedded web server Mongoose and the additional Cesanta support: “A professional team that works hard to please its customers. Bugs are fixed fast, GitHub issues and emails are answered quickly. Feature requests and wishes may be declined, but not without an explanation why. And you can always fix problems on your own since everything is open source.”
TRY MONGOOSE - DOWNLOAD SOURCE CODE