Cube Blog

How FeedMe used Cube.js to redesign their reporting system

Author avatarRay PaikAugust 11, 2021User Stories
How FeedMe used Cube.js to redesign their reporting system
Show Original

Based in Malaysia, FeedMe was founded in 2019 and provides a Point of Sale (POS) system for the food and beverage industry across South East Asia. In addition to POS equipment that you see in restaurants, FeedMe provides reporting to their customers. The reporting ranges from sales reports, marketing analytics, inventory management, and others.

FeedMe wanted to provide a robust reporting system that allowed users to generate their own custom reports. However, their previous solution that was based on SQL queries and JavaScript to process data across MongoDB, CouchDB, and BigQuery was becoming increasingly difficult to maintain and scale. FeedMe uses CouchDB in their client POS systems that can work either online or offline. CouchDB data is then fed into the BigQuery data lake for reporting. FeedMe’s backend systems are written in JavaScript, so they wanted to use JavaScript to process data from MongoDB and BigQuery.

Taking a phased approach to deploy Cube.js

The FeedMe team found Cube.js through Google searches as they were looking for a solution that can help them develop a data schema standard. They soon learned that Cube.js could help simplify their data processing and decided to take a phased approach to deploy Cube.js.

In the first phase, they only focused on migrating part of their data schema using Cube.js’ Dynamic Schema Creation. They found this process to be relatively straightforward and spent about two weeks to complete this first phase.

In the next phase, the team spent another three weeks migrating the rest of their data schema and then implementing more advanced features such as pre-aggregations and Cube Store. The FeedMe team liked the more flexible caching mechanism in Cube.js since they can customize refreshKey and rollup definitions. With Cube.js pre-aggregations and Cube Store, FeedMe’s BigQuery cost is down by about ⅔. (Before Cube.js, they could only rely on BigQuery’s built-in cache.)

Also, without pre-aggregations, it could take several minutes for their customers to query several months of sales data which wasn’t ideal. When the data is cached and pre-aggregated, a similar query would take less than 10 seconds.

How FeedMe is using Cube.js

At FeedMe, Cube.js is deployed via Docker along with Kubernetes, and they use Chart.js for visualizations. You will find more details in the architectural diagram below.

Architecture Diagram Screenshot

Cube.js has been in production at FeedMe since May 2021, and below is a sample screenshot of a sales dashboard.

Sales Dashboard Screenshot

The following screenshot shows a dashboard called the daily Close Up summary.

Close Up Summary Screenshot

Working with the Cube.js community

The FeedMe team used the Cube.js documentation as an onboarding tool to get familiar with Cube.js and its features in the early days. They also liked the collaborative nature of the Cube.js community, especially on Slack, as they were navigating different features such as rollupJoin, pre-aggregations, and Cube Store.

They also provided feedback to the Cube Dev team when they discovered an issue with pre-aggregations. Enhancements to the rollupJoin and pre-aggregations will further streamline how the FeedMe team provides custom reports for their users while maintaining their BigQuery costs.

Interested in joining FeedMe's success with Cube.js?

Explore Cube.js examples & tutorials and get started today. To jumpstart your efforts, please join us on Discourse & Slack, follow us on Twitter, and get engaged with the growing Cube.js community.

Cube.js Digest

Subscribe for the Cube.js news, releases, and latest posts.