.net& GRPC,如何根据客户选择保持某些连接?
我有一个GRPC远程服务(.NET 6)和桌面客户端应用程序(.NET6/Winforms)。 远程服务需要与3个不同的SQL数据库(相同的结构,不同的数据)一起使用。 客户端应用程序允许用户根据简单的客户端组合选择(仅在首次运行时间)选择要使用的数据库。
我想以某种方式使其正常工作,该服务将始终知道来自客户端X的任何请求都需要在数据库Y上处理(以前在客户端中以初始运行中的客户选择)。
实现此类功能的最佳方法 /实践是什么?
I have a gRPC remote service (.NET 6) and a desktop client app (.NET6/WinForms).
The remote service needs to work with 3 different SQL databases that are 1:1 clones (same structure, different data).
The client app allows users to choose which database to work with based on simple client combobox selection (only once at first run time).
I want to make it work in a way, where the service will always know that any request coming from client X needs to be processed on database Y (previously selected in the client on initial run).
What would be the best way / practice to achieve this kind of functionality?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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