Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 10-25-2004
nsns nsns is offline
Registered User
 
 
Join Date: Jul 2004
Location: Padova, Italy
Posts: 36
do i need the second communicator ?

Hi,

My application has to work as a server and as a client for another server
at the same time. Although these parts (server and client) are rather
independent there were some arguments to implement them
in the same process.
The first (server) part is Ice::Service and the second (client)
part is Ice::Thread. The structure of the second part is simple:

for(; {
sleep(some_time);
results = do_smth();
ice_objectPrx->report(results);
}


Can I use the communicator from the first part to construct 'ice_objectPrx' ?
Or I need to create new one (as I did) ?
If both possibilities are available, which are the better ?
Could you give me an advice on which properties of my application should
I pay attention to make the correct choice between these two alternatives ?

--
Cheers, Nikolai
Reply With Quote
  #2 (permalink)  
Old 10-25-2004
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
You can both use the same or different communicators. The main differences are:
  • If you use only one communicator, you can only have one configuration (i.e., set of properties).
  • If you use one communicator, collocated calls are optimized. With two communicators, calls from a proxy of one communicator to an Ice object implemented with the other will go over the wire, without any collocation optimization.
  • Two communicators consume more resources, as they are completely independent. For example, you have two sets of thread pools.
  • Two communicators completely separate two logical Ice clients or servers in the same process, meaning that if for example one of the two runs out of threads in one of the thread pools, it doesn't affect the other.

If you use a separate communicator, think of it as a separate logical process.
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
Can I remove a adapter from a communicator? lkw Help Center 2 11-03-2006 07:09 AM
Ice 3.1: Communicator.setDefaultContext() stephan Help Center 8 07-20-2006 04:40 PM
Bug in GC at Communicator::destroy() acbell Bug Reports 2 02-24-2006 12:23 AM
How to name 'communicator' code Help Center 3 06-12-2005 04:30 PM
Initialize the communicator? lisiliao Help Center 1 04-19-2004 11:42 AM


All times are GMT -4. The time now is 04:48 PM.


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.