My office is currently working on distributed (micro) services, as part of this we obviously have Service Discovery between these services so that they are aware of each others locations (when they need to be).
It has been discussed that we could additionally have what I have coined Object Discovery, where instead of Service A asking for Service B to make the request to
/endpoint/foo- we could instead have a discovery procedure for Foo itself so that you just directly ask for the object (with our discovery resolving what that object means through Service B/endpoint).
This seems like a step too far to me, and although it could be a good helper, because the API for Service B guarantees the interface for
/endpoint/foo already, the arguments for having this additional Discovery layer (decoupling, which I don't particularly see it as) seems like superfluous abstraction to me.
It just seems like it would be rife with namespace conflicts, and make it more difficult to read a Service and reference that Service's APIs that it consumes when they're a few layers deep behind a centralised Discovery layer.
Am I wrong? Is this a known pattern?