Results 1 to 4 of 4

Thread: Multiple ice_response to a single AMI callback

  1. #1
    kishore is offline Registered User
    Name: Kishore Mulchandani
    Organization: Sony Pictures Imageworks
    Project: Color and Lighting - Distributed Rendering
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    15

    Multiple ice_response to a single AMI callback

    Is it possible to use make multiple ice_response calls from the server side
    in response to a single ami call?

    I have a situation where I want to send log messages as they are being generated back through the callback object, but on my second ice_response
    call I get an "Ice::Exception raised by AMI::callback"? I know it kind of breaks
    the paradigm to be returning multiple times for a single method call.

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Kishore,

    If on the server side you dispatch a request with AMD, you can only provide one response to this request (a "success" response or an exception). Passing a second response to the AMD callback results in undefined behavior, e.g. in C++ you may get a crash.

    Also note that the server is totally unaware of the type of invocation used by the client (synchronous or AMI); likewise, the client is totally unaware of the type of dispatch used by the server.

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  3. #3
    kishore is offline Registered User
    Name: Kishore Mulchandani
    Organization: Sony Pictures Imageworks
    Project: Color and Lighting - Distributed Rendering
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    15
    makes sense. thanks. Wondering if there are other mechanisms better suited
    to what I am trying to do. In the distributed rendering system I want to
    communicate the renderers logs back to the client.

    So far my client is not a "server" so doesnt expose any objects. All communication from the server to object is in response to a method
    call.

    Is there another way I can send the log messages back from
    the server without say creating a listener object on the the client side and
    making a server make calls to it?


    thanks

  4. #4
    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
    From a fundamentals point of view there are only two ways a client can find out about new changes:

    #1: The client can pull new changes from a server (polling).
    #2: The server can push new changes onto a client (pushing).

    If you don't want to poll then you have to push. There are no other alternatives.

    As to why you don't want to make your client a server I don't know... If you are worried about security, or firewalls or the like you should look at bi-directional connections.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 03-26-2010, 07:27 AM
  2. AMD callback - using arguments after ice_response()
    By Andrew S in forum Help Center
    Replies: 4
    Last Post: 01-15-2009, 04:23 AM
  3. multiple threads, single connection problem
    By ywtsang in forum Help Center
    Replies: 6
    Last Post: 07-15-2008, 12:12 PM
  4. C#: callback (ice_response) problem
    By kwaclaw in forum Bug Reports
    Replies: 3
    Last Post: 11-12-2007, 04:13 PM
  5. when is an AMI callback finished?
    By rbx in forum Help Center
    Replies: 1
    Last Post: 03-02-2004, 06:53 AM

Posting Permissions

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