From: Dominik R. <ra...@vr...> - 2011-12-09 06:29:23
|
Hi I forgot to reply to the lists, so here a Fwd of my reply. Regards Dominik -------- Original-Nachricht -------- Betreff: Re: [vistavrtoolkit-general] Problem with VistaMsgChannel - performing to slow Datum: Wed, 07 Dec 2011 21:34:13 +0100 Von: Dominik Rausch <ra...@vr...> An: Mat...@dl... Hi The concept you used is mostly suited for communication of external applications with the Vista application, as is done in the AliceBobDemo. When trying to distribute events in cluster mode, there are better alternatives (especially since one usually only wants to send data to the slaves, but not receive answers). Depending on your application, you have different options: Directly use the MsgPort provided by the VistaSystem (as shown in the AliceBobDemo) to send external events to the Vista-App, which triggers an event on both master and slaves. However, if I understand you correctly, you want to trigger the actions from within the main vista app. You can emit your own VistaExternalMsgEvent, which is then not only Handled on the master, but also transmitted and processed on the clients. Just create one and set a VistaMsg with a Custom MsgTicket, and do the processing in the VistaEventHandler::HandleEvent callback. This is probably the easiest way to go, but has one drawback: there may be ordering issues when emitting the ExternalMsgEvent from a SystemEvent-callback, since on the master the event is emitted and handled immediately, but on the slaves this happens after the system event that is currently being processed. Keep that in mind, and try to emit the event right in the end of your custom SystemEvent-Handling You could also use the DataTunnels and use DataLaVista to sync the data - however, this is probably a little overkill. Plus, I'm not too familiar with DLV, so I can't help you much here. Another alternative was added with the recent merge-back of the CLUSTERMODE_TEST branch (not in 1.12, but in trunk). It allows to request a VistaNetworkSync object from the ClusterMode, which allows syncing data (i.e. transmitting it to from master to slaves) in a way that you don't have to care about cluster layout etc. Hope this helps :) Regards Dominik Dipl.-Inform. Dominik Rausch Virtual Reality Group, RWTH Aachen University Lehrstuhl für Informatik 12 (Hochleistungsrechnen) Rechen- und Kommunikationszentrum Seffenter Weg 23, 52074 Aachen Tel. +49 241 80 29732 ra...@vr... www.vr.rwth-aachen.de Am 07.12.2011 19:06, schrieb Mat...@dl...: > Hi all, > > I encountered a Problem regarding the TCP connection. > > I am using Vista 1.12.0 from the tag. > > My intention is to create a master/slave setup where the Master is > sending data to the slave via TCP. > > The Master is establishing a TCP connection using the > "VistaConnectionIP" and using a "VistaMessageChannel" with this > connection to transfer the data to the slave. > The Data is written in a "VistaPropertyList" and transfered using the > "WriteMsg (int iMethodToken, const VistaPropertyList > &rList,VistaPropertyList &rAnswer)" method. > The order to send the Data is triggered by an InteractionEvent on the > Master's input devices (60+ events/second). > > The Slave on the other hand is using the MSGPORT to enable the master > to connect to him. The messages ( VistaCommandEvent's) are parsed by a > Class the is derived from the "VistaEventHandler". > > The communication struct is based on the VistaDemo 17 (Alice, Bob). > > > The problem: > > The master is blocked by the "WriteMsg" method. Without this messaging > the master uses to have ~160 frames per second, but when the Messaging > is enabled this is reduced to 10 for 1 slave, 5 for 2 slaves and 3.3 > for 3 slaves. Therefore the Slaves also receive the reduced amount of > events. > > I have already tried the following things: > > - Disable the blocking of the connection: > This has lead to the slaves getting only 5 Events and then releasing > the port, so that the connection collapsed. The master went back to > ~160 frames/second, but the slave did not receive any more messages. > > - Disabled setting the answer of the slave > Did not chance anything. > > > Have you any suggestions to avoid this performance loss? > > Thanks for your help. > > Best regards > Matthias > > > ------------------------------------------------------------------------------ > Cloud Services Checklist: Pricing and Packaging Optimization > This white paper is intended to serve as a reference, checklist and point of > discussion for anyone considering optimizing the pricing and packaging model > of a cloud services business. Read Now! > http://www.accelacomm.com/jaw/sfnl/114/51491232/ > > > _______________________________________________ > vistavrtoolkit-general mailing list > vis...@li... > https://lists.sourceforge.net/lists/listinfo/vistavrtoolkit-general |