3 ms·
> Shared data structures? Common library? Services have an API. If you are sharing data structures and a common "core" library across services, yes, you are off
by rcme 3y ago
> Shared data structures? Common library? Services have an API. If you are sharing data structures and a common "core" library across services, yes, you are officially doing it wrong. From the architecture diagram it also looks like there's only one MongoDB instance, which, if you have multiple services talking to the same database[0], is also a major sign that you're doing it wrong.
Yes, and that API has types, e.g. protocol buffers. And also, sometimes you just want to change the API, and you want to make that as easy as possible.
- preseinger 3y agoAPIs defined with IDLs like protobufs make sense sometimes, but not always using an IDL means that consumers of your API need to depend on an IDL definition at the source level, which introduces coupling that is not always useful for example, talking to the stripe API doesn't require you to import a stripe.proto