From: Ulrich E. <doo...@kn...> - 2002-01-06 15:57:35
|
On Sunday 06 January 2002 14:35, Brian Rowe wrote: > --- Ulrich Eckhardt <doo...@kn...> wrote: > > client-server-communication > > ======================= > > > > used terms: > > ------------- > > > > Command: explained below > > This is actually called Action and its format is XML > like this: Yes, it is modeled in the action-class ... a fact I have been going against for quite some time: I think it is grossly misnamed. > > Commands and Perceptions: > > -------------------------------- > > > > For the sake of efficient handling, these IDs will > > probably be simple > > integral values. An implementation could even use a > > pointer to the Object as > > a unique identifier for it. However, the main > > requirement is that there is a > > way from the ID to the Object and vice-versa in the > > communication between > > client and server[1]. > > The id will be a unique number that is persistant > between sessions. > You say, it 'will be', just like reciting a dogma. A unique string would also be ok for what I described here, so why choose the former? The answer why this doc favors a numeric id is that it is faster to handle by computers. However, what external things require that it be a number and persistant between sessions (client or server sessions,btw?). > > When multiple Objects are controlled by the same > > Client, each command will > > need an identifier which Object should execute the > > command. Considering that > > one also needs meta-Commands, I see two ways to > > layout the Messages that are > > passed from Client to Server. > > Not really. You could use unique ports and tell which > message was for wich object that way. > Yes, indeed. This is feasible, but I think this solution is too complicated and limited. Consider that you get TCP-traffic, that is distributed to the ports, each port needs to be served by the Server, the Server then has to divide and combine those streams to see which client they came from. > And the Action messages already designate the source > object. Again a dogma. Why do they contain an Object-ID? For the described reasons. If there was only one Object controlled by the Client, there would be no need to transmit the ID. (I believe some very old code did so). |