Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-05-2007
kishore 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.
Reply With Quote
  #2 (permalink)  
Old 06-05-2007
bernard's Avatar
bernard bernard is online now
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 817
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.
Reply With Quote
  #3 (permalink)  
Old 06-05-2007
kishore 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
Reply With Quote
  #4 (permalink)  
Old 06-05-2007
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,061
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.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ice AMI Callback Object Lifetime eric.hill Help Center 2 11-22-2006 01:05 PM
Callback on legacy client without callback support causes deadlock? timeguest Help Center 1 07-30-2005 08:12 AM
Ice and single threaded libraries Nis Baggesen Help Center 4 03-22-2005 05:25 AM
when is an AMI callback finished? rbx Help Center 1 03-02-2004 07:53 AM
single stream for two-way communication? vukicevic Help Center 2 05-19-2003 04:17 PM


All times are GMT -4. The time now is 11:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.