Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 04-08-2008
aozarov aozarov is offline
Registered User
 
Name: Arie Ozarov
Organization: hi5 Networks
Project: SOA
 
Join Date: Mar 2008
Posts: 39
Can I safely skip AMD invocation style response

I have a service which is defined with AMD + AMI invocation style.
Client side invocation is wrapped and protected with a timeout based bail-out.
Server invocation is included with the same timeout value as an argument.
As I am using AMD I would like to disregard queued calls or service response if its time-to-live expired (as the client will not use its result). Is it safe to do so (and not return anything and not to throw any exceptions). It should be safe from the application perspective but would like to make sure that it will not cause any "leaks" in the ice framework (server side or client side).
Thanks,
Arie.
Reply With Quote
  #2 (permalink)  
Old 04-09-2008
aozarov aozarov is offline
Registered User
 
Name: Arie Ozarov
Organization: hi5 Networks
Project: SOA
 
Join Date: Mar 2008
Posts: 39
Question

I didn't get any reply so maybe my question is not clear.
In other words, I would like to know if an AMD based Servant call can be discarded and never replied to (using the AMD_XXX_YYY callback) to some requests without any side-effects of loosing resources (memory,connection,..) on either the client side or server side. In the client the invocation is done via AMI dispatching style (and waiting to the callback is protected by application level timeout).
Thx,
Arie.
Reply With Quote
  #3 (permalink)  
Old 04-09-2008
bernard's Avatar
bernard bernard is offline
ZeroC Staff
 
Name: Bernard Normier
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Palm Beach Gardens, FL
Posts: 816
Hi Arie,

You need to provide a response to the AMD callback; otherwise, when would Ice release this callback?

In your case, you could for example respond with an Ice::Timeout exception. If the client didn't timeout as expected, it will get an UnknownLocalException.

Best regards,
Bernard
__________________
Bernard Normier
ZeroC, Inc.
Reply With Quote
  #4 (permalink)  
Old 04-09-2008
mes's Avatar
mes mes is online now
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
Hi Arie,

The Ice run time does accumulate state for each twoway request in a client. Furthermore, the Ice run time maintains counters for outgoing and incoming requests that it uses to ensure that a communicator shuts down gracefully. For example, during shutdown Ice waits for all pending outgoing and incoming requests to complete; if a server fails to send a response, it can adversely affect both the server and its clients.

At present there is no way for a client to inform the Ice run time that it is no longer interested in a reply, and neither is there a way for a server to discard a request.

One workaround is for a client to send oneway requests, and for servers to send callback requests to deliver the results. This would avoid the issues I mentioned above, but it does change the semantics somewhat.

Take care,
Mark
Reply With Quote
  #5 (permalink)  
Old 04-09-2008
aozarov aozarov is offline
Registered User
 
Name: Arie Ozarov
Organization: hi5 Networks
Project: SOA
 
Join Date: Mar 2008
Posts: 39
Thanks you both, I assumed handling/releasing of the Clients callbacks may have an issue, but wanted to get affirmation. Also, wasn't sure if there is anything on the Server side that needs to be released - but now I can see the server side effect. As for client AMI callbacks, it would definitely be nice if a cancel method was provided. BTW, will passing the callback via the request be as efficient (resource,speed) as client side, AMI, callbacks?
Reply With Quote
  #6 (permalink)  
Old 04-09-2008
mes's Avatar
mes mes is online now
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 971
Quote:
Originally Posted by aozarov View Post
BTW, will passing the callback via the request be as efficient (resource,speed) as client side, AMI, callbacks?
I assume you're asking about sending a callback proxy as a parameter of a oneway request. Doing this will definitely increase the size of the client's requests; whether this increased size actually matters will depend on the application. The size of a proxy is determined by factors that are outside the control of the Ice run time, such as the object identity in the proxy, the host names for the endpoints, and so on. It's not unreasonable to expect the addition of a callback proxy to increase the message size by 100 bytes or more. For many applications this is irrelevant, but it may be important to you.

Hope that helps,
Mark
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
response timeout? David Help Center 3 06-21-2006 05:03 AM
How to minimize the response time? rwxybh Help Center 4 01-15-2006 10:25 PM
To be cool like Matthew's hair style OrNot Comments 0 10-04-2005 12:12 PM
how to match different request-response in ami call? timeguest Help Center 1 10-28-2004 08:25 AM


All times are GMT -4. The time now is 08:56 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.