Home Help Center

asynchrone / oneway

shimrodshimrod Member pascal ogilOrganization: personnalProject: personal project ( mmorpg ) ✭✭
Hi,

I don't have any problem! :D
Just a question about good practice.
I have a client and a server in bidirectionnal model.
I have some methods to update some data on the server, which don't need some return code, or otherthing. The rythm of update is strong, and if a call is lost, I don't care.

To avoid some latence time waiting the answer, I declare, in my slice file, the method "ami".
["ami"] void setIceInformation(int tx,int ty,int tdirection, int tetat);

Oki, so my questions. It is more benefit to use asynchronous method, or to declare the proxy oneway to call the method, or the both?

thank you

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    You can't do both. I would use a oneway proxy to invoke these methods, it's more efficient than AMI since with oneway there's no responses (you also don't have to create AMI callbacks.

    Cheers,
    Benoit.
  • shimrodshimrod Member pascal ogilOrganization: personnalProject: personal project ( mmorpg ) ✭✭
    ok.
    I will use asynchronous method, when I send transaction, and I want to know if it has been commited.
    I will use oneway when I send information without return.

    thanks for answer.
  • shimrodshimrod Member pascal ogilOrganization: personnalProject: personal project ( mmorpg ) ✭✭
    I have some good results globally using oneway proxy.
    But for a particular method, when calling with a oneway proxy, server received almost 2/10 messages.
    It is fewer than expected. Is there some parameter to fit to have better results?

    For this method, I used back some doubleway proxy, maybe I will change it to asynchronous method.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Unless the connection is closed by the server, oneway requests shouldn't be lost. See this FAQ.

    If you're sure that the connection isn't being closed (you can enable network tracing to diagnose this with the Ice.Trace.Network property set to 2), I recommend enabling protocol tracing on the server to see if the requests are correctly received. To enable protocol tracing, you should use the Ice.Trace.Protocol property set to 2 for example.

    Cheers,
    Benoit.
  • shimrodshimrod Member pascal ogilOrganization: personnalProject: personal project ( mmorpg ) ✭✭
    Thanks
    Ok, my connexion is open, and server ready, cause other method using same proxy are going well.

    Strangely, I saw the call in my client trace network, but no trace of this call in my server trace.

    What I don't tell you, it is that the same proxy is used by two threads different. But I don't think that can engendrate side effects.
Sign In or Register to comment.