Results 1 to 10 of 10

Thread: Conception

  1. #1
    shimrod's Avatar
    shimrod is offline Registered User
    Name: pascal ogil
    Organization: personnal
    Project: personal project ( mmorpg )
    Join Date
    Sep 2005
    Posts
    34

    Question Conception

    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

    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
    Pascal Ogil ( France )
    Independant Developper
    project on non commercial MMORPG stuff : ShimWorld

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    1) people objects have to registered to an adapter? Each object must have an adapter?
    No, you can register multiple objects on one object adapter.

    2) How the client can contact an server object with only its Ice::Identity?
    Why would you do that? You should have a proxy to the server object not just the identity.

  3. #3
    shimrod's Avatar
    shimrod is offline Registered User
    Name: pascal ogil
    Organization: personnal
    Project: personal project ( mmorpg )
    Join Date
    Sep 2005
    Posts
    34
    1) It was what I m thinking. In this way, Do i can attach my object to a main Adapter ( servermain's one)?

    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?
    Pascal Ogil ( France )
    Independant Developper
    project on non commercial MMORPG stuff : ShimWorld

  4. #4
    michi's Avatar
    michi is offline Registered User
    Name: Michi Henning
    Organization: Triodia Technologies
    Project: I have a passing interest in Ice :-)
    Join Date
    Feb 2003
    Location
    Brisbane, Australia
    Posts
    1,055
    If you have an identity, you can create a proxy for it at any time provide that you either know the endpoint (address and port) at which the server is running, or, if the server uses IcePack, you know the adapter name. Check out the documentation for createProxy() and the chapter on IcePack.

    Cheers,

    Michi.

  5. #5
    OrNot is offline Registered User
    Name: Bin.Li
    Organization: GE Healthcare
    Project: Enterprise solution
    Join Date
    Jun 2005
    Location
    Shanghai
    Posts
    181
    hi, michi,

    If you have an identity, you can create a proxy for it at any time provide that you either know the endpoint (address and port) at which the server is running
    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?
    Last edited by OrNot; 10-26-2005 at 08:15 PM.
    ------------------------------------------
    ornot2008@yahoo.com
    --------------------------------------------

  6. #6
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    If you are really developing an MMO you don't want the client & the server backend to talk directly. You will always want to use glacier2, and therefore this is a non-issue.

    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)?

  7. #7
    OrNot is offline Registered User
    Name: Bin.Li
    Organization: GE Healthcare
    Project: Enterprise solution
    Join Date
    Jun 2005
    Location
    Shanghai
    Posts
    181
    hi,Matthrew,
    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
    ------------------------------------------
    ornot2008@yahoo.com
    --------------------------------------------

  8. #8
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    I don't really understand what you are asking. If the client doesn't re-register you want the server to be able to talk with it? That's not possible, since the bi-directional connection originates with the client -- therefore the client *must* re-register in order for the server to talk with it.

  9. #9
    OrNot is offline Registered User
    Name: Bin.Li
    Organization: GE Healthcare
    Project: Enterprise solution
    Join Date
    Jun 2005
    Location
    Shanghai
    Posts
    181
    @#$$&&*&
    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
    ------------------------------------------
    ornot2008@yahoo.com
    --------------------------------------------

  10. #10
    shimrod's Avatar
    shimrod is offline Registered User
    Name: pascal ogil
    Organization: personnal
    Project: personal project ( mmorpg )
    Join Date
    Sep 2005
    Posts
    34
    Thanks... I will experiment soon. Reply my feedback next...

    See you soon
    Pascal Ogil ( France )
    Independant Developper
    project on non commercial MMORPG stuff : ShimWorld

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •