简体   繁体   English

Corba-唯一的用户ID

[英]Corba - Unique user ID

Writing a simple multi client <-> server system in Corba. 用Corba编写一个简单的多客户端<->服务器系统。

I am stuck on unique identification of the client. 我被困在客户的唯一身份上。 Is there a mechanism in Corba, like some POA policy that would allow a unique user id to be generated by the server and carried along with all that clients communication. Corba中是否有某种机制,例如某些POA策略,该策略将允许服务器生成唯一的用户ID,并与所有客户端通信一起携带。

Basically I have the system setup so I manually do this unique user ID. 基本上,我具有系统设置程序,因此我手动执行此唯一的用户ID。 Client connects, server generates a key which is sent to the client and stored on both ends. 客户端连接,服务器生成一个密钥,该密钥发送到客户端并存储在两端。 A similar setup that you might employ in many environments. 您可能会在许多环境中使用的类似设置。 What I am asking is if Corba has its own mechanism for this that I can leverage. 我要问的是,Corba是否有自己可以利用的机制。

CORBA doesn't have any inbuilt client ID mechanism that you can use, unfortunately. 不幸的是,CORBA没有可以使用的任何内置客户端ID机制。 The main reason why CORBA never specified it is because it's difficult to define what a "client" really is: is it a process or a thread? CORBA从未指定它的主要原因是因为很难定义“客户端”的真正含义是:它是进程还是线程? Is it an entire tier or a single application instance? 是整个层还是单个应用程序实例? What about clients in the same process as the server? 在与服务器相同的过程中客户端又如何呢? In addition, certain developers might want different behavior spanning any of those options. 另外,某些开发人员可能希望跨越这些选项中的任何一种都具有不同的行为。

Personally, I think that your approach of having the server dictate an ID for the client is fine, but keep in mind that it's basically a "session ID" approach, and that can be tough to scale horizontally. 我个人认为,让服务器为客户端指定ID的方法不错,但请记住,它基本上是“会话ID”方法,很难横向扩展。 Make sure that you absolutely, positively need to ID your clients, because something as simple as client authentication via IIOP/TLS might not do the trick just fine. 确保绝对肯定需要标识您的客户端,因为像通过IIOP / TLS进行客户端身份验证之类的简单操作可能并不能解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM