Reducing carbon emissions with IoT for freight

Softhouse helped local Swedish company Yellowfish revolutionize how companies monitor and manage their freight assets, such as containers and wagons, drastically improving efficiency. Today they’re a thriving international business. In this post, Christian Lundgren of Softhouse shares his experience building transformational technology.

Christian Lundgren has been part of the expert team at Softhouse for a decade now, and among his many contributions is his long-standing involvement with Swedish company Yellowfish and their service Fleetmonitor. As a trusted advisor and collaborator at Yellowfish, Christian has helped build an extensive software architecture from the ground up and helped run and maintain it for ten years – work that has required collecting, storing and analyzing millions of data points and resulted in dramatically improved efficiency, reduced carbon footprint and emissions, and a whole new way of managing the logistics of unpowered freight containers.

Getting from point A to point B can be tricky, but for Yellowfish’s demanding clients it can involve  dangerous goods, strict temperature requirements, and sensitive materials. To get the perfect piece of chocolate to your local grocery store, manufacturers have had to move ingredients, unfinished and finished products efficiently and with great care: any sudden change in temperature could ruin the product.

When these kinds of sensitive products are moved locally they’re often shipped in trucks, where the container is connected to a power supply that allows for rudimentary monitoring, but Yellowfish wanted to go above and beyond and provide even more sophisticated management and analytics for the unpowered containers that get hauled on railroads and larger freight ships. Rather than just providing measuring equipment and a simple monitoring UI, Christian helped Yellowfish build Fleetmonitor to be a complete end to end solution, where Yellowfish takes ownership of making sure that the relevant measurements are made, stored, and presented in a timely fashion.

This involved building a robust and input-agnostic ingestion engine that allows for a simple modular approach to taking in data in the format of the client’s preferred hardware partner. Everything from XML to JSON has to be handled by the ingestion engine, and stored away for immediate real-time analysis by the client – and in some cases, the client’s clients.

These requirements have put extreme demands on the responsiveness and flexibility of the architecture – millions of data points have to be accessible to clients with poor internet connectivity, and ingested from all over the world. Getting the right information to the right person at the right time is incredibly important, and as a part of a 2014 re-architecture Christian and his colleagues at Softhouse helped Yellowfish bring the average time of a query down from 9-20 seconds to lightning fast 50 milliseconds.

“Initially we had depended on the MySQL database to serve the consumer’s queries, but when we re-built the UI in 2014 we also made a switch to using Lucene,” explains Christian.

At the time a query in the multi-tenant environment would already run over millions of data points, and even though the data volume has tripled since then, we have managed to cut the query time by several orders of magnitude.

Christian and his colleagues at Softhouse also had to build an extensive admin backend to allow Yellowfish to handle the complex demands of serving their clients, with the tricky requirement that some of their clients wished to supply Fleetmonitor as a service to their clients in turn. The real-life implication for Yellowfish and their clients have been remarkable. Fleets have been made more efficient, increasing their effective capacity, and in some cases the clients have been able to dramatically reduce the size of their fleet, and society benefits from the reduction in emissions and the smaller carbon footprint. One client reduced the amount of empty containers being shipped between locations by a whopping 80%, and increased the fleet’s capacity by 10% while simultaneously reducing the transport costs by 20%.

That Yellowfish has worked with Christian and his colleagues at Softhouse for a decade shows how powerful it can be to bring experts to bear on your problem, and the results speak for themselves. These kinds of use cases, popularly called the Internet of Things, are becoming increasingly more popular and are solving decades old problems with new technology and fresh ideas.

“When we started building this 10 years ago the term Internet of Things was not even a thing, so the team at Yellowfish has been rightfully resistant to the term – we solved a real use case together before there even was a word for what we were doing, and some of the team members at Yellowfish have been tinkering with similar solutions since the late 90s,” says Christian, when asked about if he thinks of IoT as a trend.

When Christian joined the project he was fresh out of school and quickly realized that what he had learned in school was decades out of date. He felt tremendous anxiety that first summer, but since then this project has taught him basically everything he knows.

”I learned how to handle databases, how to build modern web applications, using both SOAP and REST architectures, and how to design and build micro-services,” says Christian, explaining how much he learned from his mentors and colleagues, and the client. “The most fun and challenging thing about this job is having demanding clients working on meaningful problems.”

The partnership with Yellowfish is a perfect example of our motto Softhouse makes you grow, and how we strive to help our community, our clients and our colleagues grow with every project. When our clients make money by saving the environment, and our colleagues grow by being at the absolute spearhead of emerging technology, we call that another job well done.