Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 09-28-2006
mcrystal mcrystal is offline
Registered User
 
Name: Mayer Crystal
Organization: Goldman Sachs
Project: N/A
 
Join Date: Feb 2005
Posts: 14
ICE connection lifecycle information/implementing recovery

Is there any mechanism for listening for connection lifecycle information (i.e. connection created, connection closed, attempting to connect, etc...)? I realize that this may be difficult since ice supports connectionless protocols. The case that I am specifically trying to handle is as follows:

1. I create a connection to a server using a tcp based protocol
2. I register a callback to recieve messages from the server (bi-directional connection)
3. The server goes down

What I would in theory like to be able to do now is to reconnect to another server proactively (not waiting for a client invocation) and, in addition, register for callbacks on the new server. So I guess one question that I have is that if the connection creation and the registration of a callback are independent, and re-connection is handled automatically by the ICE runtime, how do I know that I have to re-register my server callback with the new server? Additionally, since the reconnection might have taken some time, I would like to switch my client into a recovery mode so that I can request all the messages since the last one I received and buffer any new notifications until I know I have processed everything. Since there is no hook into the connection lifecycle, how would I figure out that I should switch into recovery mode and request all messages and buffer all 'live' messages?


Thanks,
Mayer
__________________
Mayer Crystal
Goldman Sachs (http://www.gs.com)
Reply With Quote
  #2 (permalink)  
Old 09-28-2006
marc's Avatar
marc marc is offline
ZeroC Staff
 
Name: Marc Laukien
Organization: ZeroC, Inc.
Project: The Internet Communications Engine
 
Join Date: Feb 2003
Location: Florida
Posts: 1,781
Ice does not support callbacks for connection closure. Please see this FAQ for details. Of particular importance is the last point: you do not always get a proper TCP notification for connection closure (for example, you won't get a TCP FIN message if someone just "cuts the cable"), therefore applications shouldn't depend on this.

The best solution is a separate thread that checks whether connections are still healthy (with periodic calls to ice_ping()), and notifies the relevant parts of an application if a connection is down.
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
Newbie problem, receiving Objects without information m4v3rick Help Center 6 11-13-2006 11:51 PM
Get information from the other side aroan Help Center 1 12-27-2004 01:32 PM
Db::del: DB_RUNRECOVERY: Fatal error, run database recovery dragzhb Help Center 8 10-24-2004 02:52 AM
Availability of Client Endpoint information to the sever object implementation Harvinder Comments 11 08-02-2004 06:38 AM
Background Information mick Comments 1 02-27-2003 07:27 AM


All times are GMT -4. The time now is 12:07 AM.


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