<div dir="ltr"><div>Ok, vtkSMLiveInsituLinkProxy::NextTimestepAvailable calls PushUpdatedState, again pushing from client to server. I pasted the code below for convenience.</div><div>I don't get it, where the communication in the opposite direction is initiated. I have tried before, but the RMI and Qt signals+events usage makes it impossible to follow the sequence of procedure calls.</div><div><br></div><div><pre class="gmail-hl" style="color:rgb(0,0,0);font-size:10pt;font-family:"Courier New",monospace"><span id="gmail-l_211" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 211 </span><span class="gmail-hl gmail-kwb" style="color:rgb(131,0,0)">void</span> <span class="gmail-hl gmail-kwc" style="font-weight:bold">vtkSMLiveInsituLinkProxy</span><span class="gmail-hl gmail-opt">::</span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">NextTimestepAvailable</span><span class="gmail-hl gmail-opt">(</span>vtkIdType timeStep<span class="gmail-hl gmail-opt">)</span></span>
<span id="gmail-l_212" class="gmail-hl gmail-fld gmail-hl gmail-arrow_unfold" title="Click to fold 12 lines (level 1)" style="width:42px;display:inline-block;padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 212 </span><span class="gmail-hl gmail-opt">{</span></span>
<span id="gmail-l_213" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 213 </span> <span class="gmail-hl gmail-kwa" style="font-weight:bold">this</span><span class="gmail-hl gmail-opt">-></span>TimeStep <span class="gmail-hl gmail-opt">=</span> timeStep<span class="gmail-hl gmail-opt">;</span></span>
<span id="gmail-l_214" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 214 </span> <span class="gmail-hl gmail-slc" style="color:rgb(131,129,131);font-style:italic">// Mark all extract producer proxies as dirty.</span></span>
<span id="gmail-l_215" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 215 </span> <span class="gmail-hl gmail-kwc" style="font-weight:bold">vtkInternals</span><span class="gmail-hl gmail-opt">::</span><span class="gmail-hl gmail-kwc" style="font-weight:bold">ExtractProxiesType</span><span class="gmail-hl gmail-opt">::</span>iterator iter<span class="gmail-hl gmail-opt">;</span></span>
<span id="gmail-l_216" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 216 </span> <span class="gmail-hl gmail-kwa" style="font-weight:bold">for</span> <span class="gmail-hl gmail-opt">(</span>iter <span class="gmail-hl gmail-opt">=</span> <span class="gmail-hl gmail-kwa" style="font-weight:bold">this</span><span class="gmail-hl gmail-opt">-></span>Internals<span class="gmail-hl gmail-opt">-></span>ExtractProxies<span class="gmail-hl gmail-opt">.</span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">begin</span><span class="gmail-hl gmail-opt">();</span></span>
<span id="gmail-l_217" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 217 </span> iter <span class="gmail-hl gmail-opt">!=</span> <span class="gmail-hl gmail-kwa" style="font-weight:bold">this</span><span class="gmail-hl gmail-opt">-></span>Internals<span class="gmail-hl gmail-opt">-></span>ExtractProxies<span class="gmail-hl gmail-opt">.</span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">end</span><span class="gmail-hl gmail-opt">(); ++</span>iter<span class="gmail-hl gmail-opt">)</span></span>
<span id="gmail-l_218" class="gmail-hl gmail-fld gmail-hl gmail-arrow_unfold" title="Click to fold 1 line (level 2)" style="width:42px;display:inline-block;padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 218 </span> <span class="gmail-hl gmail-opt">{</span></span>
<span id="gmail-l_219" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 219 </span> iter<span class="gmail-hl gmail-opt">-></span>second<span class="gmail-hl gmail-opt">-></span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">MarkModified</span><span class="gmail-hl gmail-opt">(</span>iter<span class="gmail-hl gmail-opt">-></span>second<span class="gmail-hl gmail-opt">.</span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">GetPointer</span><span class="gmail-hl gmail-opt">());</span></span>
<span id="gmail-l_220" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 220 </span> <span class="gmail-hl gmail-opt">}</span></span>
<span id="gmail-l_221" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 221 </span></span>
<span id="gmail-l_222" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 222 </span> <span class="gmail-hl gmail-kwa" style="font-weight:bold">this</span><span class="gmail-hl gmail-opt">-></span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">PushUpdatedState</span><span class="gmail-hl gmail-opt">();</span></span>
<span id="gmail-l_223" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 223 </span></span>
<span id="gmail-l_224" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 224 </span> <span class="gmail-hl gmail-kwa" style="font-weight:bold">this</span><span class="gmail-hl gmail-opt">-></span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">InvokeEvent</span><span class="gmail-hl gmail-opt">(</span><span class="gmail-hl gmail-kwc" style="font-weight:bold">vtkCommand</span><span class="gmail-hl gmail-opt">::</span>UpdateEvent<span class="gmail-hl gmail-opt">);</span></span>
<span id="gmail-l_225" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 225 </span><span class="gmail-hl gmail-opt">}</span></span>
<span id="gmail-l_226" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 226 </span></span>
<span id="gmail-l_227" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 227 </span><span class="gmail-hl gmail-slc" style="color:rgb(131,129,131);font-style:italic">//----------------------------------------------------------------------------</span></span>
<span id="gmail-l_228" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 228 </span><span class="gmail-hl gmail-kwb" style="color:rgb(131,0,0)">void</span> <span class="gmail-hl gmail-kwc" style="font-weight:bold">vtkSMLiveInsituLinkProxy</span><span class="gmail-hl gmail-opt">::</span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">PushUpdatedState</span><span class="gmail-hl gmail-opt">()</span></span>
<span id="gmail-l_229" class="gmail-hl gmail-fld gmail-hl gmail-arrow_unfold" title="Click to fold 17 lines (level 1)" style="width:42px;display:inline-block;padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 229 </span><span class="gmail-hl gmail-opt">{</span></span>
<span id="gmail-l_230" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 230 </span> <span class="gmail-hl gmail-kwa" style="font-weight:bold">if</span> <span class="gmail-hl gmail-opt">(</span><span class="gmail-hl gmail-kwa" style="font-weight:bold">this</span><span class="gmail-hl gmail-opt">-></span>StateDirty<span class="gmail-hl gmail-opt">)</span></span>
<span id="gmail-l_231" class="gmail-hl gmail-fld gmail-hl gmail-arrow_unfold" title="Click to fold 14 lines (level 2)" style="width:42px;display:inline-block;padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 231 </span> <span class="gmail-hl gmail-opt">{</span></span>
<span id="gmail-l_232" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 232 </span> <span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">vtkSMLiveInsituLinkProxyDebugMacro</span><span class="gmail-hl gmail-opt">(<<</span> <span class="gmail-hl gmail-str" style="color:rgb(255,0,0)">"Push new state to server."</span><span class="gmail-hl gmail-opt">);</span></span>
<span id="gmail-l_233" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 233 </span> <span class="gmail-hl gmail-slc" style="color:rgb(131,129,131);font-style:italic">// push new state.</span></span>
<span id="gmail-l_234" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 234 </span> vtkPVXMLElement<span class="gmail-hl gmail-opt">*</span> root <span class="gmail-hl gmail-opt">=</span> <span class="gmail-hl gmail-kwa" style="font-weight:bold">this</span><span class="gmail-hl gmail-opt">-></span>InsituProxyManager<span class="gmail-hl gmail-opt">-></span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">SaveXMLState</span><span class="gmail-hl gmail-opt">();</span></span>
<span id="gmail-l_235" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 235 </span> <span class="gmail-hl gmail-kwc" style="font-weight:bold">std</span><span class="gmail-hl gmail-opt">::</span>ostringstream data<span class="gmail-hl gmail-opt">;</span></span>
<span id="gmail-l_236" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 236 </span> root<span class="gmail-hl gmail-opt">-></span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">PrintXML</span><span class="gmail-hl gmail-opt">(</span>data<span class="gmail-hl gmail-opt">,</span> <span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">vtkIndent</span><span class="gmail-hl gmail-opt">());</span></span>
<span id="gmail-l_237" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 237 </span> root<span class="gmail-hl gmail-opt">-></span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">Delete</span><span class="gmail-hl gmail-opt">();</span></span>
<span id="gmail-l_238" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 238 </span></span>
<span id="gmail-l_239" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 239 </span> vtkClientServerStream stream<span class="gmail-hl gmail-opt">;</span></span>
<span id="gmail-l_240" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 240 </span> stream <span class="gmail-hl gmail-opt"><<</span> <span class="gmail-hl gmail-kwc" style="font-weight:bold">vtkClientServerStream</span><span class="gmail-hl gmail-opt">::</span>Invoke <span class="gmail-hl gmail-opt"><<</span> <span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">VTKOBJECT</span><span class="gmail-hl gmail-opt">(</span><span class="gmail-hl gmail-kwa" style="font-weight:bold">this</span><span class="gmail-hl gmail-opt">) <<</span> <span class="gmail-hl gmail-str" style="color:rgb(255,0,0)">"UpdateInsituXMLState"</span></span>
<span id="gmail-l_241" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 241 </span> <span class="gmail-hl gmail-opt"><<</span> data<span class="gmail-hl gmail-opt">.</span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">str</span><span class="gmail-hl gmail-opt">().</span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">c_str</span><span class="gmail-hl gmail-opt">() <<</span> <span class="gmail-hl gmail-kwc" style="font-weight:bold">vtkClientServerStream</span><span class="gmail-hl gmail-opt">::</span>End<span class="gmail-hl gmail-opt">;</span></span>
<span id="gmail-l_242" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 242 </span> <span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">vtkSMLiveInsituLinkProxyDebugMacro</span><span class="gmail-hl gmail-opt">(<<</span> <span class="gmail-hl gmail-str" style="color:rgb(255,0,0)">"Push new state to server--done"</span><span class="gmail-hl gmail-opt">);</span></span>
<span id="gmail-l_243" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 243 </span> <span class="gmail-hl gmail-kwa" style="font-weight:bold">this</span><span class="gmail-hl gmail-opt">-></span><span class="gmail-hl gmail-kwd" style="color:rgb(1,1,129)">ExecuteStream</span><span class="gmail-hl gmail-opt">(</span>stream<span class="gmail-hl gmail-opt">);</span></span>
<span id="gmail-l_244" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 244 </span></span>
<span id="gmail-l_245" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 245 </span> <span class="gmail-hl gmail-kwa" style="font-weight:bold">this</span><span class="gmail-hl gmail-opt">-></span>StateDirty <span class="gmail-hl gmail-opt">=</span> <span class="gmail-hl gmail-kwa" style="font-weight:bold">false</span><span class="gmail-hl gmail-opt">;</span></span>
<span id="gmail-l_246" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 246 </span> <span class="gmail-hl gmail-opt">}</span></span>
<span id="gmail-l_247" class="gmail-hl gmail-fld" style="padding-left:1.5em"><span class="gmail-hl gmail-lin" style="color:rgb(85,85,85)"> 247 </span><span class="gmail-hl gmail-opt">}</span></span></pre></div></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br> <table style="border-top:1px solid #d3d4de">
<tr>
<td style="width:55px;padding-top:18px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
<td style="width:470px;padding-top:17px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virenfrei. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" style="color:#4453ea">www.avast.com</a> </td>
</tr>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 27, 2017 at 9:09 PM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Catalyst live-session is managed this custom engineering from both the<br>
client and the server side. Hence it's not a mechanism that arbitrary<br>
filters can use to communicate events from server to client. If you're<br>
interested in how Catalyst live sessions manages this, start by<br>
looking at vtkSMLiveInsituLinkProxy and vtkLiveInsituLink classes.<br>
Following the code path for NEXT_TIMESTEP_AVAILABLE might be helpeful.<br>
<br>
Utkarsh<br>
<br>
On Thu, Nov 23, 2017 at 12:57 PM, Kolja Petersen<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:petersenkolja@gmail.com">petersenkolja@gmail.com</a>> wrote:<br>
> Can anybody answer my question?<br>
> When Catalyst receives the next timestep update from some simulation every<br>
> few seconds or minutes, it sends its data to the pvserver process. The<br>
> pvserver somehow notifies the Paraview client, which will display the new<br>
> data.<br>
> If Utkarsh's comment is correct that no events can be forwarded from server<br>
> to client, then how does Paraview know that it should display the next<br>
> timestep?<br>
><br>
> I need to implement a very similar use case, for which a better<br>
> understanding of the communication between the Catalyst session, the<br>
> pvserver and the Paraview client is of high importance.<br>
> Thanks<br>
> Kolja<br>
><br>
> On Wed, Nov 22, 2017 at 7:54 PM, Kolja Petersen <<a href="mailto:petersenkolja@gmail.com">petersenkolja@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Oh, well, but how is Catalyst forwarding new time step information from<br>
>> server to client?<br>
>> Time step updates can occur at any time. Which event mechanism notifies<br>
>> the client?<br>
>> Thanks<br>
>> Kolja<br>
>><br>
>> On Wed, Nov 22, 2017 at 6:57 PM, Utkarsh Ayachit<br>
>> <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>> wrote:<br>
>>><br>
>>> This is not a use-case supported in ParaView. We don't forward events<br>
>>> from server to client.<br>
>>><br>
>>> On Wed, Nov 22, 2017 at 12:53 PM, Kolja Petersen<br>
>>> <<a href="mailto:petersenkolja@gmail.com">petersenkolja@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Hello,<br>
>>>> I would like to invoke a callback on a proxy in a pvpython session from<br>
>>>> a server-side method.<br>
>>>><br>
>>>> In my server-side class "vtkCustom" I have a method<br>
>>>> void vtkCustom::SetData(int i){<br>
>>>> ...<br>
>>>> this->InvokeEvent(1999,NULL);<br>
>>>> ...<br>
>>>> }<br>
>>>><br>
>>>><br>
>>>> On the client side, I create a proxy to a vtkCustom object, register an<br>
>>>> observer and set the "Data" property, which should invoke eventid=1999:<br>
>>>> ...<br>
>>>> custom=pxm.NewProxy("<wbr>myextensions","Custom")<br>
>>>> pxm.RegisterProxy("<wbr>myextensions","Custom",custom)<br>
>>>><br>
>>>> def fun(obj,event):<br>
>>>> print "CALLBACK",obj,event<br>
>>>><br>
>>>> custom.AddObserver(1999,fun)<br>
>>>> vtk.vtkSMPropertyHelper(<wbr>custom.GetProperty("Data")).<wbr>Set(42)<br>
>>>> ...<br>
>>>><br>
>>>> The observer function "fun" on the client is never invoked, although the<br>
>>>> server-side invokes that event. I'm misunderstanding some concept of<br>
>>>> Paraviews event mechanism for sure. Can you help me correct my steps?<br>
>>>> Thanks<br>
>>>> Kolja<br>
>>>><br>
>>>><br>
</div></div><div class="HOEnZb"><div class="h5">>>>> Virenfrei. <a href="http://www.avast.com" rel="noreferrer" target="_blank">www.avast.com</a><br>
>>>><br>
>>>> ______________________________<wbr>_________________<br>
>>>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>>>><br>
>>>> Visit other Kitware open-source projects at<br>
>>>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
>>>><br>
>>>> Please keep messages on-topic and check the ParaView Wiki at:<br>
>>>> <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/<wbr>ParaView</a><br>
>>>><br>
>>>> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
>>>><br>
>>>> Follow this link to subscribe/unsubscribe:<br>
>>>> <a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview</a><br>
>>>><br>
>>><br>
>><br>
><br>
</div></div></blockquote></div><br></div>