Re: Invoking methods from multiple threads - connection policy

Toralf Lund <[email protected]> Tue, 18 Jan 2011 15:10:37 +0100
Newsgroups gmane.comp.gnome.orbit.general
Message-ID <[email protected]>
Toralf Lund wrote:
> Frank Rehberger wrote:
>   
>> Quoting "Toralf Lund" <[email protected]>:
>>
>>   
>>     
>>> Frank Rehberger wrote:
>>>     
>>>       
>>>> Toralf,
>>>>
>>>> if I remember correctly, there are at least these two options:
>>>> ORBIT_THREAD_HINT_PER_REQUEST
>>>> ORBIT_THREAD_HINT_PER_CONNECTION
>>>>
>>>> I would recommend the second one (per-connection), if it comes to   
>>>> near-real-time processing, to avoid priority inversion.
>>>>
>>>>       
>>>>         
>>> It seems to me that if I use this in conjunction with a  
>>> multi-threaded client, I essentially get single-threaded behaviour  
>>> for CORBA calls (there will only be one thread on the server-side)  
>>> if the CORBA object is shared between the threads on the client  
>>> side. That's if the client is implemented the ORBit2 way, i.e. all  
>>> operations on an object is sent across the same socket or whatever,  
>>> regardless of which thread they come from. This is why some other  
>>> ORBs will set up separate links for separate threads.
>>>     
>>>       
>> that is true, if the threads in your process have different  
>> priorities, using mutliple outbound connections (per thread) to same  
>> server would make a difference.
>>   
>>     
> I'm not quite sure what you mean here.
>
> The issue I'm facing is that to guarantee that there is one server-side 
> thread for each client-side thread, I need a separate connection in each 
> of the client-side threads, and with ORBit2 that also means one 
> CORBA_Object per thread, based on duplicate calls to 
> CORBA_ORB_string_to_object() or similar.
Actually, it's a bit harder than that, or perhaps impossible without 
modifying ORBit2 itself. Having duplicate object lookups doesn't really 
help, as the object is still shared "behind the scenes".

- Toralf


This e-mail, including any attachments and response string, may contain proprietary information which is confidential and may be legally privileged. It is for the intended recipient only. If you are not the intended recipient or transmission error has misdirected this e-mail, please notify the author by return e-mail and delete this message and any attachment immediately. If you are not the intended recipient you must not use, disclose, distribute, forward, copy, print or rely on this e-mail in any way except as permitted by the author.