Photo by Vanessa Bucceri on Unsplash

Microservices

Python Microservices: API, Object, and Storage Data Models

Distilled lessons from building microservices powering Slang Labs platform. Presented in a PyCon India 2019 tutorial.

Published in
14 min readApr 14, 2020

--

A data model organizes data elements and formalizes their relationships with one another. In database design, data modeling is the process of analyzing application requirements and designing conceptual, logical, and physical data models for storage. However, data storage is only one, albeit an important, aspect of microservices.

There are three related but distinct data models in a microservice for:

  • API Data Model for interactions: It defines the schema of data payload that can be sent to or is received from the endpoints of a microservice. Also known as communication or exchange data model.
  • Object Data Model for computations: It is designed for efficient business logic implementation. Also known as application data model or data structures.
  • Storage Data Model for persistence: It defines the schema of various, occasionally redundant, data stores and caches.

--

--

Cofounder @SlangLabs. Ex Amazon, Microsoft Research. I learn, do, and write about Machine Learning in production. https://www.ML4Devs.com