微服务体系结构|终点和拆分实体
我正在研究一个由许多微服务(但一个数据库)组成的大项目, 例如,我们有代理商微服务和订单微服务 当我们选择订单时,该订单的一些数据是代理的姓名和电话,
现在问题是如何进行选择, 如果我使用常规getagent()
它的返回将返回我不需要的数据音调。 我只需要名字和电话。
在返回名称和电话的代理商上写一个新的终点, 不是开销吗? (将端点写入每个客户端属性组合),
情况有许多微服务。
那我该怎么办? 如果ODATA或GraphQl可以在这里提供帮助?
I'm working on a big project which is composed of many microservices(but one database),
for example, we have Agents microservice and Orders microservice
When we select an order some data of the order is an agent's name and phone,
Now the question is how to make the selection,
If I use a general GetAgent()
its returns a tone of data that I don't need.
I need just the name and the phone.
Write a new endpoint on Agents that return just name and phone,
Is it not overhead? (to write endpoint to every client property combination)
That situation is in many microservices.
So what can I do?
And if Odata or GraphQL can help here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论