I would like to use RemoteView to show CFD simulations results. Results are processed by pvserver, which already has a reader for the data format, and the client application should control pvserver to set up what is shown in RemoteView via vtk.js
So far, I’m able to start pvserver with a python script, load data, and visualize in RemoteView.
However, it is not clear to me how the client can select what is being shown (e.g., what fields, with what color map and data range). In other words, how can pvserver be dynamically controlled from the client? Is there an API and some documentation on how to do so?
Since you have the RemoteView working, you already have wslink fully setup (which is not gRPC).
From there, you can register more server side (Python) methods to be callable from the client which is exactly what is shown in the vue based template example. If you ignore the vue side of that example, you have the JavaScript code that is needed to make server call.
I understand that you can export methods when starting pvserver using @exportRpc (sorry for my typo, I wrote gRPC out of habit). Am I correct in thinking I must export all the methods the client will call first in python, or can existing vtk methods be added from the client?
The server needs to list every methods that he wants to client to have access to.
After that, the client can call any of them dynamically.
Usually on the server side, you create some kind of facade that will allow you to create a few set of methods that can dynamically call many other methods on existing objects.
With the ParaView backend, you can easily update proxies via pre-existing protocols.