While practicing System Design, I decided to create a hypothetical proximity service (like Google Maps) with a microservice architecture. Suppose we have 3 core categories of functionality:
- CRUD operations for new Businesses (Stores, Restaurants, etc.)
- CRUD operations for users
- Search for and retrieve a list of Businesses in an area based on geospatial data
I decided to design the following services:
- A Data Domain called
users_service
handling operations related to users - A Data Domain called
businesses_service
handling operations related to businesses - A Business Domain called
search_service
handles the search operation, which basically needs read-only permission.
All constitute together the following diagram that I created:
Now my question is:
Is it a good idea to supply a Business Domain with its own Read-Only replicas of Users
and Businesses
? What's my alternative? I don't want to leak the complex business logic of searching
into the businesses
Data Domain, but the searching
operation needs access to the location of the businesses and needs to perform SQL queries to do so.
Any related comment is welcomed.