LAUNCHMongoDB 8.3 is built for the sub-100ms retrieval & zero downtime AI demands. Read blog >
AI DATAStop fighting your data layer. Get the memory & retrieval agents need to scale. Read blog >

Clarifresh streamlines development and improves application performance with MongoDB Atlas

Photo of a girl inspecting fruit.
industry_enterprise

Industry

Computer Software

atlas_product_family

Product

MongoDB Atlas

MongoDB Search

atlas_for_edge

Use Case

Content Management

general_events_default

Customer since

2023

Clarifresh, a leading agriculture technology company, is revolutionizing the fresh produce industry with cutting-edge computer vision and digitization technologies. Their goal is to streamline the quality control process for fruits and vegetables, helping everyone from farmers and growers to distributors and retailers accurately determine the quality of their produce. With Clarifresh’s iOS and Android apps for quality control inspectors in the field, and a web app for managers, the company provides comprehensive tools for assessing everything from the size and color of grapes to the quality of their stems.

As Clarifresh rapidly scaled, its existing data infrastructure (which was built on Amazon RDS for MySQL) faced increasing limitations. The company needed a more flexible and scalable database solution, particularly one that could support a multi-cloud strategy. By transitioning to MongoDB Atlas—including using the local experience for MongoDB Search on Atlas with Docker—Clarifresh not only enhanced its agility and application performance but also created a better experience for its customers.

 

Outgrowing legacy relational infrastructure

Initially, Clarifresh used MySQL on Amazon RDS for its backend but moved to MongoDB Atlas to be able to operate in a multi-cloud environment. The company had an opportunity to expand into a new market, but in order to do so, they needed to incorporate Microsoft Azure into their cloud footprint. Clarifresh was able to migrate to MongoDB Atlas on Azure and Atlas on Amazon Web Services (AWS) over just a few short months to take advantage of a scalable, multi-cloud database with a distributed architecture.

Clarifresh logo
“We can iterate more quickly when we’re introducing new features on MongoDB because we’re not bound to a particular schema.”
Luke Thompson
Chief Architect, Clarifresh

Because of the intuitive nature of MongoDB’s document model, it was easy for Clarifresh’s development teams to make the switch from the relational approach they had been accustomed to. They migrated from using EC2 instances and MySQL to a containerized Java application with MongoDB Atlas running on two different clouds. In so doing, the company not only moved to a multi-cloud environment but also modernized and introduced more flexibility into the backend of their application infrastructure

And by moving to MongoDB Atlas, Clarifresh was able to accelerate its pace of innovation. “We can iterate more quickly when we’re introducing new features on MongoDB because we’re not bound to a particular schema,” says Luke Thompson, Chief Architect at Clarifresh. “It’s easier for developers to release new features than it was when we had more rigid schemas. Back then, every time we wanted to make a schema change, we had to go through a process to coordinate between developers and manage the database schema update alongside code updates. This sometimes involved downtime and reduced our service availability.”

 

Adopting MongoDB Search on Atlas

When Clarifresh was just getting started with MongoDB Atlas, they used a basic search implementation with MongoDB Query API to support their search requirements. The search experience within their application allowed end-users to look for specific terms—like the name of a given inspection report—and to filter by different parameters. The team at Clarifresh initially set this up with indexes for filter parameters and used $regex to search.

Clarifresh logo
“MongoDB’s release of local search with the Atlas CLI and Docker was really what tipped us into finally adopting MongoDB Search.”
Luke Thompson
Chief Architect, Clarifresh

But as their application scaled and their business grew, Clarifresh found that they had outgrown the simpler $regex search implementation and that MongoDB Search on Atlas was a better fit for their performance requirements and search complexity. Once Clarifresh adopted Atlas Search, which is built for multiple parallel index intersections, search performance improved significantly. For example, some searches with the original implementation took up to 15 seconds to execute; following the switch to Atlas Search, search time for those searches dropped to 167 milliseconds. In addition to these more extreme examples at the limit, search performance also improved across the board, with the mean search time taking 103 milliseconds prior to adopting Atlas Search and 56 milliseconds after, an improvement of 46%. The standard deviation also decreased since there was more consistency for search times overall.

Figure 1. Comparing Clarifruit's query performance before and after the adoption of MongoDB Atlas Search.
Figure 1 — Comparing Clarifresh's query performance before and after the adoption of MongoDB Search on Atlas
Figure 2. Request numbers in buckets of 100ms before and after the adoption of MongoDB Atlas Search
Figure 2 — Request numbers in buckets of 100ms before and after the adoption of MongoDB Search on Atlas

 

Supporting local search requirements

The creation of a local experience for search use cases with the Atlas CLI and Docker enabled Clarifresh to finally make the switch to MongoDB Search. Developers at Clarifresh were accustomed to building and testing code on their local laptops. Thompson says, “We do work offline occasionally,” Thompson says. “But more frequently, we want to be able to run experiments and quickly iterate and test our code locally. It’s easier to do that if you don’t have a dependency on a remote database.”

Now Clarifresh’s developers can easily build and test new features with MongoDB Search on their local machines and have confidence that they will sufficiently mirror behavior in production. Development and testing are also simpler and easier for developers throughout the full software development lifecycle. Say, for example, the team at Clarifresh is building a new feature and it wants to add a MongoDB Search index. With the local experience for MongoDB Search on Atlas on Docker, they can make a local copy of a test data set, try different MongoDB Search indexes, and compare the differences without impacting other developers by using shared resources and without incurring any costs. “MongoDB’s release of local search with the Atlas CLI and Docker was really what tipped us into finally adopting MongoDB Search,” Thompson said.

 

Conclusion

By switching to MongoDB Atlas, including using the local MongoDB Search on Atlas experience on Docker, Clarifresh enhanced its scalability, performance, and development agility, empowering it to better serve its expanding customer base. The move from MySQL to MongoDB Atlas was a game-changer, enabling faster iteration, more reliable search performance, and the flexibility to scale across clouds. With advanced features like MongoDB Search on Atlas and a strong foundation for future enhancements, Clarifresh is well-positioned to continue leading in the agriculture technology industry.

 

To learn more about MongoDB Search on Atlas, please visit the product page. To learn how to create a local MongoDB Atlas deployment using Docker, read our documentation.

Take the next step

Get access to all the tools and resources you need to start building something great when you register today.
Get StartedTalk to an expert
Illustration of a database.