Questions Architecture Related Paraview-Web

Hello,
I’m trying to understand the architecture of Paraview, Paraview-web and Trame. My Main Focus is to Enable 3D Web Visualization. I have tried multiple Examples of Trame, Paraview Visualizer and ParaView-lite. I have Few questions specifically regarding ParaView-Web that are causing alot of confusion for me. Sorry, I’m newbie and my questions might be childish but I came here after reading documentation and asking questions that are not answered yet.

Q1: In Official ParaView-Web Documentation, it is mentioned A JavaScript Library for Building Web-based Applications and here mentioned that ParaViewWeb is a single Python script that could be executed by the provided python interpreter. is ParaView-lite a ParaView-Web Based application ? If Yes, then why it is not listed here.

image
Following Image is from pvw-lite.py Python Script. Is that’s what is discussed above as PVB Works as Python Script ?

Q2: If ParaView-web is JavaScript Library, Can we integrate it with any Web Frameworks like Django/Flask using Vue.js/React.js on Frontend? How to Connect ParaView-web backend with Django/Flask app ?

Regards,
Ans

Hi Ans,

Sorry for the confusion and I totally understand where you are coming from but history is against us here.

The confusing part is that we have paraviewweb a repository that contains old React widgets with the original infrastructure to talk back to a VTK/ParaView server which also contains many useful guide on VTK/ParaView Web (framework).
Nowadays, the client side (JS) is managed solely between vtk.js and wslink without the need of the paraviewweb repository/npm package.

And then we have the VTK/ParaView Web framework on which trame is based on. That is more a “marketing” name which is indeed built into VTK and ParaView on their Python side.

Finally the paraviewweb repository is technically in maintenance mode with no real update. And therefore contains some old and deprecated information.

ParaView-lite is indeed a ParaView-Web based application.

Nowadays, I will go to trame for any VTK/ParaView Web kind of solution. But then, if you want to develop your own web front end using Angular, React or else, I will still use trame on the server side and leverage vtk.js + wslink to talk to it.

I hope that clarify things a little better,

And thanks for asking such important question,

Seb

1 Like

Hi Sebastien,
Thank you for your quick response. Yes your answer clarified things that were confusing for me.

I have Few more questions, as now it is confirmed that Trame is actually ParaViewWeb, so my questions are regarding Trame.

Q1: Can you confirm Trame does not use ParaView and has no dependency on it? Can we create a Standalone 3D Visualization web application with Trame, with no dependency with ParaView ?

Q2: Is Trame is as scalable as ParaView ? Or it is designed for small to medium scale problems? According to my understanding, the scalability of Trame will depend on the scalability of the underlying ParaView system. Could you confirm this ?

Q3: Does Trame support both server and client rendering. It may also employ a hybrid scheme where only specific level of details is downloaded and rendered locally for a very large problem. I tried some Trame examples where I used VtkLocalView ,VtkRemoteView and VtkLocalRemoteView , is it the same thing we are talking about ?

Can you please provide reference to Any helpful resource to understand the working of Trame-server ?

Regards,
Ans

Q1: Trame does not have any hard dependency to VTK or ParaView but it can work very well with either of them.

Q2: When using ParaView as rendering engine, you have the same capabilities as ParaView. When using VTK, you are limited by the machine you are running on. So yes, the scalability depend on the engine an not trame.

Q3: Yes it can do both. And yes Vtk[Local/Remote]View are the various components to support those scenario. And those can either work with a ParaView view proxy or a VTK render window.

Q4: I’m not sure what you are asking about trame-server. Are you asking about the shared state, event calls, or something else? Everything rely on wslink like any VTK/ParaView Web server application.

1 Like

Hi seb, Thanks again for your quick response and clear answers.

I have one more question. Right now I’m using ParaView-5.11.0 Binary version. The ParaView-Visualizer bundled with this version is still ParaView-Web based ? and the ParaView-Visualizer here is trame based. Right ?


ParaView-Visualizer Cloned from here


Image from ParaView-Visualizer Bundled with ParaView 5.11.0. This is the ParaView-web Icon.

One more thing, while running this ParaView-Visualizer version, I’m unable to read any file and getting this following error:

Image 1:

Image 2:

The issue is related of the base-path directory provided as argument. On Windows you need to use a full path with the proper \ separator which is mentioned on the “old” visualizer here. (At least I think that is the issue)

Also keep in mind that the trame version of visualizer is not ready for prime time. It is more an Alpha version. That dev has been paused (for now) as we are getting a nice AsyncParaView engine and our focus right now is to create a GUI for it using trame.

Hi Seb, Thanks for your response.
I tried again by giving the full path and also by using proper separator “\” but the error is same.

Regards,
Ans

Either try with the windows native bash and not mingw64 or use \\ instead of of singe \

Hello seb,

I tried with \\ slashes instead of \ and also tried with windows command prompt / Power-shell.

Command 1:
Using Single Separator

pvpython -m paraview.apps.trame \
    --venv venv \
    --trame-app pv_visualizer \
    --data "C:\Users\Ans.Shakeel\visualizer-new version\paraview-visualizer\data" 

Command 2:
Using \\ separator

pvpython -m paraview.apps.trame \\
--venv venv \\
--trame-app pv_visualizer \\
--data "C:\Users\Ans.Shakeel\visualizer-new version\paraview-visualizer\data" \\
--port 8080

Command 3:
Using \\ separator in Data Path and commands

pvpython -m paraview.apps.trame \\
--venv venv \\
--trame-app pv_visualizer \\
--data "C:\\Users\\Ans.Shakeel\\visualizer-new version\\paraview-visualizer\\data" \\
--port 8080

But the error is still same.

Actually, it is showing the contents of the data directory that means it’s recognizing the Data directory. This error arises specifically when click to open a file or directory inside visualizer. Check attached image below:

Regards,
Ans

I give it another try by using windows native bash using double slash \\ and single slash \ but the error is still same.

/mnt/c/Program\ Files/ParaView\ 5.11.0/bin/pvpython.exe -m paraview.apps.trame \\  
--trame-app pv_visualizer \\  
--venv venv \\  
--data "/mnt/c/Users/Ans.Shakeel/visualizer-new\ version/paraview-visualizer/data"

Sorry I was focused on the file listing.

It is possible that when we pass the path to the reader, things get messed up with Windows path.
It should be easy to fix but I won’t manage to get to it any time soon.
If it is a pressing issue you can reach out to Kitware for support.

Hi seb, Thanks for making things more clear.

I was just wondering that how Trame is serving the Single Page application to localhost, I mean is there a Node js web Server running in the background for this purpose or any other python based web server like Flask, how trame is handling this ?

Trame is using Python aiohttp for file serving files and WebSocket handling.