[tao-users] TAO : rtorb private connection policy (LAURENT Julien) => update
LAURENT Julien
julien.laurent at fr.thalesgroup.com
Fri Jun 16 08:47:41 CDT 2017
Hello,
I still could not find why a private connection does not work in my context but I have found another way to solve my issue.
With the following option:
static Client_Strategy_Factory "-ORBTransportMuxStrategy EXCLUSIVE -ORBClientConnectionHandler RW"
I have a scheduling without a multiplexer thread as you can see on the image below.
[cid:image003.png at 01D2E6B7.E365D0F0]
Only the client thread and server thread are used in this two way operations (and so no risk of priority inversion). Nevertheless the communication chanel is still shared if I have more than one client as you can see below:
[cid:image006.png at 01D2E6B7.29466A90]
I assume that with a private connection I will obtain the same kind of scheduling but with more parallel execution.
The last problem of the RW configuration is that it applies for the whole client. I could want a multiplexed connection for 80% of the client calls and a private connection for a dedicated thread in the client processus.
I still hope to have an answer on the private connection policy ;-)
Best wishes
Julien Laurent
Real time software architect for Thales France
-----Message d'origine-----
De : tao-users [mailto:tao-users-bounces at list.isis.vanderbilt.edu] De la part de tao-users-request at list.isis.vanderbilt.edu
Envoyé : mercredi 7 juin 2017 15:10
À : tao-users at list.isis.vanderbilt.edu
Objet : tao-users Digest, Vol 130, Issue 1
Send tao-users mailing list submissions to
tao-users at list.isis.vanderbilt.edu<mailto:tao-users at list.isis.vanderbilt.edu>
To subscribe or unsubscribe via the World Wide Web, visit
http://list.isis.vanderbilt.edu/cgi-bin/mailman/listinfo/tao-users
or, via email, send a message with subject or body 'help' to
tao-users-request at list.isis.vanderbilt.edu<mailto:tao-users-request at list.isis.vanderbilt.edu>
You can reach the person managing the list at
tao-users-owner at list.isis.vanderbilt.edu<mailto:tao-users-owner at list.isis.vanderbilt.edu>
When replying, please edit your Subject line so it is more specific than "Re: Contents of tao-users digest..."
Today's Topics:
1. TAO : rtorb private connection policy (LAURENT Julien)
----------------------------------------------------------------------
Message: 1
Date: Tue, 6 Jun 2017 16:46:09 +0200
From: LAURENT Julien <julien.laurent at fr.thalesgroup.com<mailto:julien.laurent at fr.thalesgroup.com>>
To: "tao-users at list.isis.vanderbilt.edu<mailto:tao-users at list.isis.vanderbilt.edu>"
<tao-users at list.isis.vanderbilt.edu<mailto:tao-users at list.isis.vanderbilt.edu>>
Subject: [tao-users] TAO : rtorb private connection policy
Message-ID:
<16A21B33F78A8D4791060BD5C878B59D1745460A61 at THSONEA01CMS08P.one.grp<mailto:16A21B33F78A8D4791060BD5C878B59D1745460A61 at THSONEA01CMS08P.one.grp>>
Content-Type: text/plain; charset="utf-8"
Hello,
I have trouble with using a private connection policy as described below.
TAO VERSION: 2.4.3
ACE VERSION: 6.4.3
HOST MACHINE and OPERATING SYSTEM:
Linux, Redhat 5
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
Linux, Elinos 5.2, gcc 4.4.5 (cross compilation)
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]: config-linux.h
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual
C++)]:
optimize=1
debug=0
inline=1
platform_has_quixtream=1
ssl=0
cidl=0
exceptions=1
shared_libs_only=1
rt_corba=1
smart_proxies=1
interface_repo=1
interceptors=1
threads=1
prism=1
stdcpplib=1
no_hidden_visibility=1
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
TAO_ORBSVCS := NamingService
ifneq ($(ELINOS_BIN_PREFIX),)
ifneq ($(HOST_TAO_ROOT),)
TAO_IDL := $(HOST_TAO_ROOT)/TAO_IDL/tao_idl
TAO_IDLFLAGS += -g $(HOST_TAO_ROOT)/bin/gperf
TAO_IDL_DEP := $(HOST_TAO_ROOT)/TAO_IDL/tao_idl$(EXEEXT)
endif
endif
AREA/CLASS/EXAMPLE AFFECTED:
DOES THE PROBLEM AFFECT:
COMPILATION? NO
LINKING? NO
EXECUTION? YSE
OTHER (please specify)?
[Please indicate whether ACE/TAO, your application, or both are affected.]
SYNOPSIS:
The private connection policy does not seem to change the threading of a corba two-ways operation.
DESCRIPTION:
Our server side application is configured to use the default rtorb policy (reactor per lane policy with a pool of thread).
I tried to configure the client side with a private connection policy.
When we analyse the threading of an operation with return (call to "bool isStarted" from the client side to the server side) I have the following scheduling:
1) The operation call on the client side is done inside the client thread, we do not see any interaction with the orb thread => OK
2) The server receives and executes the operation in the thread created during the configuration of the POA (thread pool with one thread) => OK
3) The return operation involves two threads : the orb thread and the client thread => NOK => I expect the return operation to involve only the client thread with a private connection configuration
[cid:image001.png at 01D2DEE4.666C9EB0]
REPEAT BY:
My program has a client side which calls periodicaly "bool isStarted" on the server side. The client and the server are runned on two different processus on the same core.
I analyse the threading with LTTNG (profiler) by adding "open" instruction before and after the call on the client side, and during the execution of the operation on the server side. (the open allows me to easily filter the system events).
I do not understand why the return operation involves the orb thread!
With or without the private connection configuration does not change the execution.
Here is my code for configuring the private connection:
CORBA::ORB_var the_orb = ORBHelperClient::instance().getORB();
CORBA::Object_var rt_poa_obj = the_orb->resolve_initial_references("RTORB");
RTCORBA::RTORB_var w_rtorb = RTCORBA::RTORB::_narrow(rt_poa_obj.in());
if (CORBA::is_nil(w_rtorb.in()))
{
printf("Lwccm_FragmentRuntime : Can't manage to find RTORB \n");
return -1;
}
//Try to get a private connection
CORBA::PolicyList w_policies (1); w_policies.length(1);
w_policies[0] = w_rtorb->create_private_connection_policy();
CORBA::Object_ptr w_facetWithPrivateConnection = facet->_set_policy_overrides(w_policies, CORBA::SET_OVERRIDE);
CORBA::PolicyList_var w_inconsistent_policies;
CORBA::Boolean w_success = w_facetWithPrivateConnection->_validate_connection(w_inconsistent_policies);
if(! w_success)
{
printf("Lwccm_FragmentRuntime : Can't validate private connection \n");
}
else
{
printf("Lwccm_FragmentRuntime : PRIVATE CONNECTION !!! \n");
}
//END
IModing_ptr required_corba_facet = IModing::_narrow(w_facetWithPrivateConnection);
//THEN USE of required_corba_facet to call isStarted. This configuration is done in the main thread while the call is done in an another thread configured in SCHED_FIFO.
SAMPLE FIX/WORKAROUND:
No idea I try to understand what I should get.
Best wishes
Julien Laurent
Real time software architecture for Thales France
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.isis.vanderbilt.edu/pipermail/tao-users/attachments/20170606/b8c2d315/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 56646 bytes
Desc: image001.png
URL: <http://list.isis.vanderbilt.edu/pipermail/tao-users/attachments/20170606/b8c2d315/attachment.png>
------------------------------
Subject: Digest Footer
_______________________________________________
tao-users mailing list
tao-users at list.isis.vanderbilt.edu<mailto:tao-users at list.isis.vanderbilt.edu>
http://list.isis.vanderbilt.edu/cgi-bin/mailman/listinfo/tao-users
------------------------------
End of tao-users Digest, Vol 130, Issue 1
*****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.isis.vanderbilt.edu/pipermail/tao-users/attachments/20170616/9db2fae5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 42279 bytes
Desc: image006.png
URL: <http://list.isis.vanderbilt.edu/pipermail/tao-users/attachments/20170616/9db2fae5/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 41575 bytes
Desc: image003.png
URL: <http://list.isis.vanderbilt.edu/pipermail/tao-users/attachments/20170616/9db2fae5/attachment-0003.png>
More information about the tao-users
mailing list