adiruch na chiangmai - stock.ado

Anti-food-waste app Karma taps up Google Cloud to power global expansion plans

Swedish startup Karma is on a mission to help consumers and businesses across the globe fight food waste, and it has enlisted the Google Cloud Platform to help it achieve its goal

This article can also be found in the Premium Editorial Download: CW Europe: CW Europe: Amsterdam reins back datacentre developments over environmental concern

Food waste is a known contributor to climate change, and it is a problem Swedish startup Karma is helping consumers and businesses tackle through its food rescue apps.

The first of these apps is a consumer-facing offering that connects users to food retailers in their area that have surplus stock that they can buy at a reduced price so it does not go to waste. 

The second app is for Karma’s retail partners, and sees the firm providing them with granular feedback on the stock level changes they can make to reduce the amount of surplus food they have each day, as well as providing a means of selling on any excess that does accrue.

The fact that it can advise its retailers in this way is an important point of competitive difference for Karma, the firm’s brand manager Charlotte Humphries tells Computer Weekly, and it is down to the way it processes its sales data.

“It’s really important to us as a way to stand out and be distinct versus the other potential food waste companies that are out there as well,” she says. “We have a direct competitor that is not able to do such a thing because they don’t sell item by item on the app. They sell a ‘mystery bag of food items’ for less at the end of the day.

“By selling item by item and by using machine learning, we’re able to offer a solution that actually stops the symptoms of food waste through redistribution, and the cause of food waste, which is overproduction,” she adds.

The company is in the process of building out its presence in the UK and France, having already established itself in its native Sweden. It claims to have saved more than four million meals from going to waste since its launch in 2016.

Enabling growth

Karma did not initially start out as an app solely dedicated to addressing the issue of food waste, Elsa Bernadotte, the firm’s co-founder and chief product officer tells Computer Weekly.

“Like most good ideas, it started out in 2015 as a not-so-good idea, and for the first eight to nine months we used to say it was a failure. At that time, it was a deals platform, and a bit like a crowdsourced Groupon [service],” she says.

“By selling item by item and by using machine learning, we’re able to offer a solution that actually stops the symptoms of food waste through redistribution, and the cause of food waste, which is overproduction”
Charlotte Humphries, Karma

The company soon reached a “sink or swim crunch point” with the app, which prompted a decision by the team to make more of one of its best-performing features – its meal deals – and seize on that to tackle food waste. Three weeks after that decision was made, Karma in its current form was born.

“Once we started looking deeper into the environmental implications of food waste, and we understood just how vast and monumental the problem of food waste really was and still is, it then became our ambition to solve one of the world’s largest climate issues using technology,” says Bernadotte.

After several years of steady growth in Sweden, the company secured additional investment through a funding round that would pave the way for the company to expand its operations to the UK and France in late 2018.

But before the company could do that, it needed to address some shortcomings in the app’s underlying infrastructure that had emerged, which had the potential to stunt Karma’s international growth and its ability to innovate. This, in turn, prompted the firm to embark on a shake-up of its infrastructure.

The source of its technology issues lay in its reliance on a simple-to-use bare metal infrastructure that required a lot of expensive manual handling and maintenance. So much so that keeping it up and running required three full-time DevOps engineers, which is a sizeable overhead for a startup to bear, says Karma product manager Koen Brörmann.

“When we started expanding internationally, our infrastructure became a bottleneck – from a scalability, innovation and delivery perspective. We had a large DevOps team of three people dedicated to maintaining that,” he says. “What we had was working, but there was so much manual work involved that it felt prohibitively slow.”

For example, if the company wanted to ship an update to the application, that would require logging into a remote server, pulling in new code, followed by a manual restart of the program using a node process manager.

“We had a really bifurcated setup where you had a DevOps team and an engineering team, and we wanted to move to a situation where our engineers are also responsible for the delivery and maintenance of the infrastructure,” adds Brörmann.

“We wanted a setup that would not only allow us to move really fast [from an innovation perspective], but also give our engineers ownership.”

Up in the clouds

With the help of its newly acquired investors, the company set about scouring the market for a public cloud provider that could help it simplify the management of its infrastructure operations, before deciding on the Google Cloud Platform (GCP).

The migration took around 12 months, with Brörmann crediting a company decision made prior to the move to transition its application over to a microservices-based architecture with helping make the shift to GCP a very smooth process.

“In about six months, we were 80% done [with the migration] and the last 20% took another three to six months, but we were able to move over fairly quickly due to our microservices setup,” he says.

As part of the migratory process, the firm set about replicating the app using the Google-developed open source container-based technology Kubernetes, which in turn led to Google Kubernetes Engine (GKE) forming the core of its revamped infrastructure.

GKE is billed by Google Cloud as a fully managed Kubernetes service that provides enterprises with an autopilot-like mode of operation, which the Karma team said helped it achieve its goal of simplifying its operations management processes.

It has since sought to automate the management of its infrastructure further by leaning on Google Cloud Functions and Google Cloud Run, while the migration also saw it start tapping into Google BigQuery to aid the management of its app databases.

“I was really excited about BigQuery because I come from a traditional background where there was a whole data management team, and if I had a request, I had to send it to them, they would write a query, get the data and give that to me,” says Brörmann.

“So I was excited to be able to manage all that data live and get access to it directly myself – and 80% of the team can get the data they want too. That has allowed us to move even faster than we did before, while remaining data-driven,” he adds.

As an example of this, Brörmann cites how quickly the company was able to expand the takeaway functionality of its apps in response to the onset of the Covid-19 coronavirus pandemic in spring 2020 to include delivery options as well.

“We were able to pivot to delivery super fast. I was blown away by how fast we had something not just built, but rolled out and [live] the next day,” he says.

A proactive approach

The move to GCP also brought uptime improvements, and the Google team is proactive in helping Karma’s engineers find new ways to expand the functionality of its apps so the company can do more to help its retail partners address the causes of food waste, adds Brörmann.

To this point, he shares an example whereby Google’s engineers provided the Karma team with a walkthrough of how using its BigQuery ML tool would enable the startup to create and deploy machine learning (ML) models using standard SQL database queries that would help retailers tweak their stock levels to prevent food waste.

“We knew that BigQuery ML was available, but we hadn’t found a way to use it at that point, so Google approached us and said, ‘We can do a small slide deck presentation and walk you through what the opportunities are’,” says Brörmann.

“We had three of our engineers talk to one of the Google people about that, and based on that talk we started using BigQuery ML, which has opened up a lot of avenues for us with prediction and prevention of food waste, which are areas we want to do more with in the future.”

Specifically, BigQuery ML is currently being used by Karma to provide its retail partners with an indication of how high or low their foot traffic is likely to be in the coming days so they can prepare more or less food depending on what the data tells them.

Looking ahead, the company is hoping to do more with the GCP portfolio of artificial intelligence (AI) and machine learning tools to refine its operations further, which includes tapping into its Vision AI image recognition tool to enable restaurant partners to upload their menu data to the app far more quickly.

“We want to scale faster and add more businesses to the platform, so we’re experimenting with using Vision AI so our partners can take pictures of the menu and all the data from that will be in the app within 10 seconds, whereas at the moment that takes 30 minutes or so,” says Brörmann.

The Karma team also has aspirations to take the brand worldwide, which is something that will be made far easier by the fact Google has datacentre regions in the US, Europe and Asia too.

“With Google, you don’t really have to worry about it not having availability in other countries, so that’s definitely a load off our mind for the future,” adds Brörmann.

Read more about Google Cloud Platform deployments

Read more on Infrastructure-as-a-Service (IaaS)

CIO
Security
Networking
Data Center
Data Management
Close