Conception

in Help Center
Hi,
Using Ice is not easy, and conceive a good program neither...
I explain you what I want to do, and I hope some advice :rolleyes:
It's about a mmorpg. I got a server. Inside I got a server class ( inherited from an Ice interface), which accept Player connexion, with bidirectionnal stuff.
I got a world class, containing vector of Zone objects ( piece of world), containing vector of people object.
The client program ask every second ( what is the time elapsed has no importance), to the server a list of people for a determined Zone.
1) Every people object have to have an Ice::Identity.
2) Client contacts Server object like for newConnexion to ask list of people object
3) Server object creates a vector of ID and send back to the client ( Ice method vector<people *> Myserver::returnlist(string zone, Current &)....)
2 mains questions :
1) people objects have to registered to an adapter? Each object must have an adapter?
2) How the client can contact an server object with only its Ice::Identity?
Thanks a lot
Using Ice is not easy, and conceive a good program neither...

I explain you what I want to do, and I hope some advice :rolleyes:
It's about a mmorpg. I got a server. Inside I got a server class ( inherited from an Ice interface), which accept Player connexion, with bidirectionnal stuff.
I got a world class, containing vector of Zone objects ( piece of world), containing vector of people object.
The client program ask every second ( what is the time elapsed has no importance), to the server a list of people for a determined Zone.
1) Every people object have to have an Ice::Identity.
2) Client contacts Server object like for newConnexion to ask list of people object
3) Server object creates a vector of ID and send back to the client ( Ice method vector<people *> Myserver::returnlist(string zone, Current &)....)
2 mains questions :
1) people objects have to registered to an adapter? Each object must have an adapter?
2) How the client can contact an server object with only its Ice::Identity?
Thanks a lot
0
Comments
No, you can register multiple objects on one object adapter.
Why would you do that? You should have a proxy to the server object not just the identity.
2) In fact, I declare a function which return vector of identity. My client use myVector=myserverProxy->returnMeVectorOfIdentity();
So, I got a vector of identity. But, I mistake something in my conception, I think, but now I got identities, how do I contact the object from identity information?
Cheers,
Michi.
In dibir circumstance ( as shimrod said in his first post),to create a proxy, only the address and port of server is enough? if also need the remote address and port provide that a fixed proxy is wanted?
You must protect the server backend, and furthermore this protection must be built into the interfaces right from the beginning. You cannot shoe-horn in security after you have the application written.
For example, in the above set of interfaces if I am player X, and get hold of a proxy to player Y what prevents me from calling on this player and making player Y do something (such as attack the giant spider of leaping death)?
Maybe you are right. Actually I am not interested in MMO at all for the time being. What I want is to be confirmed about the fixed proxy issue because I am struggled with that.
Please allow me to repeat my question again and hope getting your advice. In bidir circumstance, I keep the client callback proxy in the server into a freeze. when the server restarts, I wish that the privious callback proxy could be unmarshalled out from freeze without needing the client's re-regiestering to the server.
However, this seems not feasible as Marc has pointed out because I can not acquire the same connection as before. That is, even thoght I can have the same identity, the same server IP, the same server Port, even the same client IP, I can not ensure to get the same client port therefore the same connection, and eventually fail to create the same fixed proxy as before.
Sorry for my this question. It has departured from the initial thread.
This may be a very simple question but it really swallowed me much time to understand it. I feel it is the two createproxy functions , ObjectAdapter's and Connection's , which have some subtle differenece between them and make me confused.
Hope getting your further calrifying.
Thanks in advance.
OrNot
Yes, Matthrew. You are right. My needed answer is now very claer: It is impossible to create a identical prxoy in bidir circumstance after the server restared.
Thank you very much.
OrNot
See you soon