Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 09-27-2004
vsonnathi vsonnathi is offline
Registered User
 
Name: Venkat Ramana
Organization: Amazon.com
Project: Prototype
 
Join Date: May 2004
Posts: 39
Question How to instantiate an ICE Object redundantly?

Hi,

I read the following in the documentation and could find any references to it later in the document

"A single Ice object can be instantiated in a single server or, redundantly, in
multiple servers. If an object has multiple simultaneous instantiations, it is still
a single Ice object."

Can someone please point or give some info on how to do this?

Thanks,
--Venkat.
Reply With Quote
  #2 (permalink)  
Old 09-27-2004
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,

It's really quite simple:
  • Two or more servers create a servant with the same identity
  • The proxy for the Ice object contains the endpoints for all of the servers
  • The client selects one of the endpoints at random when establishing a connection
  • In the case of a network error, the client automatically retries all of the endpoints when attempting to reestablish a connection
Take care,
- Mark
Reply With Quote
  #3 (permalink)  
Old 09-27-2004
vsonnathi vsonnathi is offline
Registered User
 
Name: Venkat Ramana
Organization: Amazon.com
Project: Prototype
 
Join Date: May 2004
Posts: 39
Hi,

Thanks for the info.

I have to maintain a cache (Search Engine results) for the service and would like to go to the same server for further requests for efficiency purposes. Can we do this with ICE - what I am looking for is for the first request go to a available server and from then on try going to the same server if available.

Thanks,
--Venkat.
Reply With Quote
  #4 (permalink)  
Old 09-27-2004
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,

Once established, Ice will continue to use a connection for subsequent requests. However, Ice may transparently close and reopen connections, and that could result in a new connection to a different server.

One way to implement your requirement is with a two-tiered system: the client uses a multi-endpoint proxy to send a request to a randomly-selected factory, and the factory returns a proxy for an object in a particular server (a "session" concept).

Take care,
- Mark
Reply With Quote
  #5 (permalink)  
Old 09-28-2004
ganzuoni ganzuoni is offline
Registered User
 
Name: Guido Anzuoni
Organization: Individual
Project: No specific project
 
Join Date: Jun 2003
Location: Italy
Posts: 46
Quote:
Originally posted by mes
Hi,

Once established, Ice will continue to use a connection for subsequent requests. However, Ice may transparently close and reopen connections, and that could result in a new connection to a different server.

One way to implement your requirement is with a two-tiered system: the client uses a multi-endpoint proxy to send a request to a randomly-selected factory, and the factory returns a proxy for an object in a particular server (a "session" concept).

Take care,
- Mark

Hi Marc,
it could be nice (i.e. transparent) if all the job could be done by a
Locator implementation.
This special Locator, for each findObjectById, could return a proxy obtained
merging the endpoints (in randomized order, round-robin ?)
of registered replicas.
Obviously, client-side Ice internal should not alter the order of
endpoints received by the Locator.
More, LocatorInfo should not cache endpoints. This is particularly
important in multi-threaded client such as servlet container.
In this way, the endpoint list attached to a reference is used
just for failover purposes and not for load-balancing, that is left
to the Locator.

But, maybe, I am missing a lot of other issues concerning connection
management....

Guido.
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
How to release object. laotee Help Center 12 08-30-2005 12:48 AM
Object Factories and object initialisation Nis Baggesen Help Center 1 09-30-2004 08:40 AM
thread per object Harvinder Comments 3 06-21-2004 05:12 PM
Object Replication? rstolle Help Center 3 03-29-2004 05:36 PM
Object Factory enzo Help Center 2 03-17-2004 02:29 PM


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