Trame connect to remote pv?

Hello again,

Okay, here’s the question in a nutshell: how do I use simple.Connect within a trame application?

I have used ParaView (both the GUI and pvpython) to do a remote host connection with simple.Connect(host, port). I guess I’m just getting confused how to implement that within a trame application/views. I want trame to be running locally, but connect to a remote ParaView server. Is is simply…

from paraview import simple
simple.Connect(host, port)
# do more stuff with simple
view = simple.Render()

# trame uses view to do local server/browser stuff
# not sure about paraview.VtkRemoteView or paraview.VtkLocalView

Kinda just confused with the multiple options and things like the vtk/paraview server.

Thanks in advance,

Yes, that is what you would do. Just call simple.Connect(...)

The Remote/Local rendering is just about which part does the rendering the C++ (server) or the JavaScript (browser). Regardless of the rendering aspect, the computation happen on the server side. Either on the same machine or via the standard client/server architecture of ParaView.

The confusing part is that you can have 2 layers of client/server here. One from ParaView itself and another one between the web server and the browser.

Ah. Okay, I think I understand now…but I’m going to confirm. To reference, I’m using locally conda-based install of Trame+ParaView and just using the example in the Trame tutorial. I have an install of ParaView (C++) on a remote Ubuntu server.

  • Without remote host connect: I can run the local/remote rendering because the conda install I have actually included ParaView (C++) and the difference in renderings would be between the browser (local = JS/Vtk) and the “remote” server (ParaView/C++)? There is still the whole client/server of running a local server and connecting via the client for the UI.
  • With a remote host connection: I could simply add simple.Connect(host, port) above the simple.Cone() call and it will use the connection established to create/show/render using the host’s ParaView (C++) server. I have to still do a vtkRemoteView in order to have Trame to communicate/control any changes in state from the browser. And the second client/server is still the one running localhost.

Right? As an application, if I wanted to see data files that are on the remote Ubuntu server, I’d have to give those arguments to the pvserver instead of via Trame locally (read: the would require me to run a pvserver that points to a data location relative on the remote server)?

Hi Brent,

Your trame application is client-server. Let’s say it’s called and leverages ParaView like the ones on the tutorial page tutorial-paraview. You run it locally like

localhostname$: pvpython ./ --venv .pvenv. --server --port 1234

Then you open your browser and point to the URL http://localhost:1234/

This uses the ParaView pvpython (or ParaView) on your local machine for all ParaView work and can be used in local rendering (deliver the geometry to the browser for rendering) or remote rendering (deliver a rendered image to the browser). It’s your local machine so the local vs remote rendering is a bit confusing.

Now, You run it remotely on that Ubuntu server ( with all the data you want actually to visualize like$: pvpython ./ --venv .pvenv. --server --port 1234

Then you open your browser on your local machine (localhostname) and point to the URL

This uses the ParaView pvpython (or ParaView) on the remote Ubuntu machine for all ParaView work but is visualized in your browser on localhostname and can be used in local rendering (deliver the geometry to the browser for rendering) or remote rendering (deliver a rendered image to the browser). It’s the remote Ubuntu machine, so the local vs remote rendering is a bit clearer but is the server delivering geometry to the browser (local rendering) or a rendered image (remote rendering).

Finally, if you use simple.Connect(host, port) within your, then your server will have another server running ParaView that you must start in advance on the remote Ubuntu machine. I think this is unnecessary and confusing unless there is a solid use case that requires this setup. For your visualization work on the remote Ubuntu machine, I would use the setup.

I may still not understand your use case, but hopefully this helps.


I’ve actually done those first two examples you mentioned. However, my use case IS unique in that I have a colleague that I want to connect to a ParaView server (similar to that I will manage/start in advance, but develop entirely on their local machine using Trame alone (with the conda install of ParaView). Thank you for the clear explanation and I hope this helps with understanding my use case.