Separating Data APIs and Business Logic with an API Gateway
Chonghua Yin
Head of Data Science | Climate Risk & Extreme Event Modeling | AI & Geospatial Analytics
Today, I conversed with a friend about separating data APIs from business logic. Coincidentally, my friend is a wine enthusiast. This inspired me to use wine as a metaphor—specifically, the distinction between raw wine ("original wine") and the wine we enjoy in stores.
Raw Wine as Data APIs
In the wine world, "original wine" is a high-quality, unrefined product directly from fermentation and distillation, often with an alcohol content of 65% to 68%. It’s stored and sometimes graded but rarely sold directly. Instead, it forms the foundation for finished wines crafted through blending, dilution, and fine-tuning.
Similarly, data APIs are like raw wine—high-quality and carefully prepared to meet exacting standards. They provide essential, reliable data that serves as the backbone for applications. While not tailored for specific business needs, this data remains a solid foundation for further refinement.
API Gateway as the Winemaker
The API Gateway plays the role of the winemaker, transforming high-quality raw wine into finished products. By combining and processing data from APIs, the Gateway creates tailored outputs to meet various market demands. For example:
领英推荐
Why This Separation Matters
Separating data APIs from business logic, much like separating raw wine from the finishing process, brings several benefits:
Conclusion
As wineries transform high-quality raw wine into market-ready products, separating data APIs from business logic allows organisations to create flexible and scalable solutions. The raw data remains versatile and dependable, while the Gateway ensures it’s tailored to meet customer needs. Does this sound familiar? It feels remarkably similar to microservices architecture, doesn’t it?
Next time you sip a glass of wine, consider the journey from high-quality raw wine to finished product—and how your data systems might benefit from a similar approach.