The Architectural Evolution of Fountain

Fountain Software Architecture that powers the MyChai™ brewing system
Fountain Software Architecture that powers the MyChai™ brewing system

This blog talks about how Chai Point evolved the architecture of Fountain, the homegrown tech platform which now powers our MyChai™ brewing system.

– Harsha Pai, Head of Engineering @ Chai Point

For years, we have been taught about the evolution of human beings. There have been many theories proposed, several debunked and a few accepted. The popular belief that every species have evolved over thousands of years is something that is universally accepted. In today’s competitive world, evolution has become a necessity, not just for survival but also for achieving planned, sustainable growth. 

We at Chai Point are focussed on providing a great cup for our customers and our tech platform Fountain enables us to leverage the best of technology to do so. From its humble beginnings, Fountain has evolved in many ways. From being a solution which enabled efficient store operations to a full blown platform which drives the pursuit of business goals and enables the organization to increase its financial value by many folds, Fountain has indeed come a long way. And today, Fountain is at the heart of the company’s MyChai™ brewing system which is powered by the hardware and software capabilities that Fountain provides.

Darwin, in his theory of evolution spoke about “natural selection” and “survival of the fittest” – attributing the survival of a species directly to its ability to adapt to its environment and thereby evolve into a superior species ready to take on the rest of the world. I find a lot of similarities between Darwin’s theory and the evolution of software. In a sense, Software evolution is also about adaptability and the constant focus to “be the fittest” in order for it to thrive under the competition from other “species” of Software.

So what does evolution actually mean in the context of Fountain? The fundamental base of any software system is its architecture. The architecture comprises of various components which form the building block of the system or the platform. When Fountain took birth, the architecture of Fountain was limited to handling a specific set of use cases, primarily catering to store operations for a brick and mortar retail store. As the business grew, it became quite imperative that the architecture had to be evolved to be able to meet the new challenges that the business  was facing. This is when the team of engineers from Fountain, working out of the head office in Bangalore took it upon themselves to think beyond the current challenges and design an architecture which would be future ready. At the end of the day, a software system basically enables the access and exchange of information and the ones that are successful simply do this in the most simplistic and efficient way. This idea of simplicity and efficiency became the cornerstone of the approach to design a new architecture for Fountain.

The intention of sharing this information is to ensure that start-ups who are seeing a high growth are able to think ahead of time and ensure that their software architecture is future ready. There is no company which starts off with a single business goal and continues with the same goal for the rest of its lifetime. The start-up grows and goals become multi fold, business expands and the appetite to do more only keeps on increasing. If software engineering teams focus only on providing solutions for the most important business goal at a given time, they often end up in playing catch up. This game of catch up not just leads to engineers investing time in firefighting but also slows down your ability to deliver new features in time. Taking a step back to think about the big picture often helps. You may end up investing a lot of time at the start to build the future ready architecture but the investment is worth it.

At Chai Point, our leaders have always been transparent in sharing the business goals and the larger picture with everyone. As engineers, we all knew what were the important business goals to be achieved for the next two years. The organization’s picture of success was well defined. And this enabled us to plan for the future. I would urge all engineering leaders to ask questions to the organization leaders which would give you a clear indication of the picture of success. It is an important factor to build a scalable, reliable and future ready architecture

Once we had the picture of success, we came up with following architecture and design principles:

  • Maintain anonymity in all information exchanges i.e., keep things loosely coupled.
  • All payloads to be self-descriptive without the need of any additional information or lookups.
  • Guaranteed relay and delivery of messages to ensure that there is no data loss at all times.
  • High throughput
  • Low latency
  • Work in complement to existing components

Fountain’s new architecture caters to scale and is highly fault tolerant. This is achieved by embracing an event driven architectural pattern which works on the publisher-subscriber model. The key evolution was to no longer just be a request-response based system but to add the element of being event driven which complements the existing components. The beauty of evolution is that it tends to add new features to help existing ones to adapt to the changing environment – just like how Darwin explained and it was apt to do the same with Fountain. Today, with simple components such as events, brokers and processors Fountain ensures that the foundation to enable further evolution is already in place. Furthermore Fountain now has the ability to:

  • Do multicast communication: A feature that is massive when it comes to talking to the thousands of machines that dispense the best Chai in town.
  • Do real time messaging and handling of events: A must-have in today’s day and age when everyone wants real time updates. This is working really well with our aggregators and our backend partner systems.
  • Do Asynchronous communication: An aspect which has boosted our fault tolerance capabilities where we no longer have to deal with API failures.

Another aspect that the team consciously decided was to use more and more cloud native components. Powered by AWS, Fountain runs on the latest stack of native services provided by AWS. We realized that our solution is most powerful and valuable when it is cloud based and it was a no-brainer for us to pursue native services on AWS to minimize our capital investment costs. So whether it’s leveraging the API gateways, serverless functions, container services or even data warehousing capabilities – we have opted to use native services provided by AWS. This has made our systems more efficient and cost effective. We no longer worry about uptime and maintenance overheads – another element of evolution which has given us excellent benefits. We are working on making our database serverless as well, and this will truly take us to the epitome of never having to worry about the infrastructure of our data layer.

Today when we design new solutions, our architecture caters to them seamlessly. The building blocks which hold the foundation together no longer need to be shifted every time we have to adapt to a new business requirement. The thought and effort that the team has put in to look beyond the current needs has helped Fountain to truly be a Software as s Service solution in the F&B industry. Fountain currently is serving 700,000 cups a day and the architecture can scale to serve many more as we grow. The power of Fountain driving the hardware and software capabilities of the MyChai™ brewing system is what makes us the world’s largest beverage platform.

3 thoughts on “The Architectural Evolution of Fountain”

  1. This is brilliant! Such a fantastic innovative company. Can’t be more excited to see what is in store in the coming years.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top