4 ms·
Not sure I understand why in-memory joins are wrong by default, especially in a large system with more than one data store. Let's say you call UserService::bat
by strken 7y ago
Not sure I understand why in-memory joins are wrong by default, especially in a large system with more than one data store.
Let's say you call UserService::batchGetUsers(userIds) to get a list of users from a service backed by a MySQL DB, call WidgetService::widgetsForUser(userId) to get a list of a user's widgets from a separate service backed by a Redis cache and another MySQL DB, and return them. What's the problem here? Lack of transactions? Unnecessary fields sent down the wire? Something else?
- emerongi 7y agoThere is no problem, the same way GraphQL does not automatically allow arbitrary queries. The parent author holds some very stubborn beliefs about how systems are built (his/her way is the correct way!), which is great for discussion, but probably not the best example on how to actually build big systems.