Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 01-27-2004
aaron aaron is offline
Registered User
 
 
Join Date: Jan 2004
Posts: 2
Contexts and threads

It is my understanding from skimming the documentation that in ICE you have two choices when using contexts:

1) explicit on each call
2) create a new "proxy" with embedded context, which is implicitly passed on each call

I am interested to know how to pass a unique context implicitly, in a multithreaded environment. For example, say I am running in a middle tier environment, like a servlet engine, serving many end users. Each of my threads has to pass on implicit context object identifying the end user (which will be different for each thread).

One (the only?) solution is to create a new proxy with embedded context for each thread. Is this feasible with regard to performance? Is creating these proxies cheap and side-effect free? Is there any other mechanism by which I can associate context by _thread_ and not by _proxy_ (for instance, let's say I want to use the same context for many types of proxies - any that I talk to during a given transaction).

Lastly, is there an IRC channel somewhere that I can talk directly to people using/working on ICE?
Reply With Quote
  #2 (permalink)  
Old 01-27-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
First of all, I'm not sure if you are using contexts for what they are intended. Contexts should contain information about a requests, such as routing information. A user id should be a regular parameter, not be embedded in the context.

In any case, creating proxies is cheap, client-side only, and free of side effects. We don't use thread-specific data for contexts, because it's simpler and more efficient to simply create a proxy with a new default context.

ZeroC does not maintain an IRC channel. For such a level of support, you would need a consulting contract with us.
Reply With Quote
  #3 (permalink)  
Old 01-27-2004
aaron aaron is offline
Registered User
 
 
Join Date: Jan 2004
Posts: 2
Thanks for the reply, that answers my question. The example I gave you was simplified. The case in which we do this is propagating multiple tiers of authentication in a single-signon scheme, which if we had to do in an explicit manner would horribly litter method signatures with extra (rather opaque) parameters that are of little interest directly to application developers. For example we have implemented hooks/frameworks for doing such in CORBA and also recently SOAP, so I was just curious about ICE (we are not using ICE at the moment, but I discovered it is a charming protocol so I thought I'd ask )
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
Create C# threads as background threads? bpolivka Help Center 19 01-31-2007 06:36 PM
Threads and Shutdown acbell Help Center 1 11-30-2006 06:16 AM
Precisely how are Ice threads implemented? ChrisC Help Center 8 12-22-2005 12:39 PM
Multiple threads smashing the stack Ric Help Center 8 06-09-2005 01:55 PM
Contexts ganzuoni Help Center 1 06-18-2003 03:47 PM


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