[openrtm-users 03039] Re: multiple provider one consumer

György Persa persa @ sztaki.hu
2014年 5月 12日 (月) 21:30:18 JST


Hello everyone,

I made my experiments with the original RTM SimpleService example!
Results in pictures and modified source code can be found in attachment!

I started two piece of MyServiceProvider by manipulating the rtc.conf
between starts, to make them different console windows. In the original
setup the MyServiceConsumer called functions only one of the connected
MyServiceProviders. With the modified source code (applying the method
mentioned before) The Consumer call functions on all Provider (or we can
choose Provider from the map by connector_id as well).

So it seems, that the Consumer copies are containing some information about
which Provider to call. Can access it somehow?

Best regards,
György Persa


György Persa
*Software engineer*
Institute for Computer Science and Control
Hungarian Academy of Sciences
3D Internet-based Control and Communications Research Laboratory / 3DICC
*Project VirCA* (www.virca.hu)


On Fri, May 9, 2014 at 11:07 AM, György Persa <persa @ sztaki.hu> wrote:

> Hello Geoffrey,
>
> ​​Thank you for your answer,
> Those port are CorbaPort-s, "X" marked are holding Consumer and "O" marked
> are holding Provider of an interface, having one getter and one setter
> function. The component on the right (PoC_VirCA) is supposed to provide
> information for every other component by getters (it does), and utilize
> setter functions of connected components, thus update their state. But only
> if needed! We want to update only "subscribed" components, so want to
> define which active connection should be used for updating.
> But maybe my example was a little bit irrelevant in this context, sorry
> for that! There is a lot of part in code, which can lead to this (now I
> guess buggy) measurements.
>
> I meant only ask, what is the expected behaviour in the case of multiple
> provider one consumer. Is it suppose to call the remote function on every
> provider?
> Is it a way to choose which provider to use?
> For instance, in SimpleService example project, can I call function on a
> specific MyServiceProvider from MyServiceConsumer if there are multiple of
> them?
>
> Meanwhile, we have further experimental setups, which shows, that we can
> address providers, but it's a bit complicated. We defined
> ConnectionListener for the Consumer and when "on connected" call-back
> function is called, we store a copy(!) of the Consumer in an std::map,
> using the connection_id for key value. Later, we can use this map
> (containing copies of the same Consumer) for calling functions on specified
> connections.
>
> Next week I'll try to do the same method in SimpleService example and
> share the code. I hope that will be more clear!
>
> Best regards,
> György Persa
>
>
> György Persa
> *Software engineer*
> Institute for Computer Science and Control
> Hungarian Academy of Sciences
> 3D Internet-based Control and Communications Research Laboratory / 3DICC
> *Project VirCA* (www.virca.hu)
>
>
> On Thu, May 8, 2014 at 1:34 AM, Geoffrey Biggs <geoffrey.biggs @ aist.go.jp>wrote:
>
>> Hi György,
>>
>> Could you give some more details about how your components are
>> implemented and connected? Details such as what port types you are using to
>> connect them, what the connector profiles are, and so on will make it
>> easier to answer your question. If possible, could you provide your code?
>>
>> Geoff
>>
>>
>>  On 7 May 2014 18:50, György Persa <persa @ sztaki.hu> wrote:
>>
>>>  Hello everyone,
>>>
>>> Recently I made an experimental setup in our system, and it seems to me,
>>> that if I connect multiple provider to one consumer I can call function
>>> only one of the providers/implementations.
>>> In attached image I displayed the function call counts in console
>>> window. In the relation of one provider to multiple consumer function was
>>> called twice as much as in opposite direction. Thus I suggest, that when I
>>> connect multiple provider to one consumer only one of the providers is
>>> taking action.
>>> My questions are:
>>>
>>>    - Is it really the case? If I connect multiple provider to one
>>>    consumer only one of them will answer?
>>>    - Is it possible to declare which provider's function should be
>>>    called if a consumer has many of them (thus choose between
>>>    implementations)?
>>>    - Or can I access all the providers and call function on them
>>>    somehow?
>>>
>>> Thanks in advance!
>>> Best regards,
>>> György Persa
>>>
>>>
>>> György Persa
>>> *Software engineer*
>>> Institute for Computer Science and Control
>>> Hungarian Academy of Sciences
>>> 3D Internet-based Control and Communications Research Laboratory / 3DICC
>>> *Project VirCA* (www.virca.hu)
>>>
>>>
>>> _______________________________________________
>>> openrtm-users mailing list
>>> openrtm-users @ openrtm.org
>>> http://www.openrtm.org/mailman/listinfo/openrtm-users
>>>
>>>
>>
>> _______________________________________________
>> openrtm-users mailing list
>> openrtm-users @ openrtm.org
>> http://www.openrtm.org/mailman/listinfo/openrtm-users
>>
>>
>
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
URL: <http://www.openrtm.org/pipermail/openrtm-users/attachments/20140512/a24c70d9/attachment.html>
-------------- next part --------------
$B%F%-%9%H7A<00J30$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
$B%U%!%$%kL>(B: multiprovider_ns.jpg
$B7?(B:         image/jpeg
$B%5%$%:(B:     55000 $B%P%$%H(B
$B @ bL@(B:       $BL5$7(B
URL:        <http://www.openrtm.org/pipermail/openrtm-users/attachments/20140512/a24c70d9/attachment.jpg>
-------------- next part --------------
$B%F%-%9%H7A<00J30$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
$B%U%!%$%kL>(B: multiprovider_conn.jpg
$B7?(B:         image/jpeg
$B%5%$%:(B:     11384 $B%P%$%H(B
$B @ bL@(B:       $BL5$7(B
URL:        <http://www.openrtm.org/pipermail/openrtm-users/attachments/20140512/a24c70d9/attachment-0001.jpg>
-------------- next part --------------
$B%F%-%9%H7A<00J30$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
$B%U%!%$%kL>(B: multiprovider_print.jpg
$B7?(B:         image/jpeg
$B%5%$%:(B:     123353 $B%P%$%H(B
$B @ bL@(B:       $BL5$7(B
URL:        <http://www.openrtm.org/pipermail/openrtm-users/attachments/20140512/a24c70d9/attachment-0002.jpg>
-------------- next part --------------
$B%F%-%9%H7A<00J30$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
$B%U%!%$%kL>(B: multiprovider_modified_print.jpg
$B7?(B:         image/jpeg
$B%5%$%:(B:     341870 $B%P%$%H(B
$B @ bL@(B:       $BL5$7(B
URL:        <http://www.openrtm.org/pipermail/openrtm-users/attachments/20140512/a24c70d9/attachment-0003.jpg>
-------------- next part --------------
$B%F%-%9%H7A<00J30$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
$B%U%!%$%kL>(B: SimpleServiceConsumerExtended.zip
$B7?(B:         application/zip
$B%5%$%:(B:     16708 $B%P%$%H(B
$B @ bL@(B:       $BL5$7(B
URL:        <http://www.openrtm.org/pipermail/openrtm-users/attachments/20140512/a24c70d9/attachment.zip>


More information about the openrtm-users mailing list