VTK.js as a server

I have been going through some tutorials using Paraview Web Lite and using VTK.js with a VTK server (with python wrappers). I was wondering if it would be possible to use VTK.js as the server?

What are your thoughts on this?

Vtk.js is really meant for rendering VTK data so having vtk.js on the server may not make much sense on the server side. Also vtk.js was really meant to be used with a browser not really with node and a webgl canvas.

Could you explain what would be the benefit of such approach?

To me a better approach would be to use VTK/C++ compiled as WASM so you can run it on the server side to do remote rendering or on the client side to do local rendering. (Same code but several runtime target)

Thank you for your fast reply.
I was following the tutorial:

And reading this:

I am very new to VTK and my questions may miss the entire point. I am primarily a web developer so I would prefer to work with JS wherever possible.

Taking this into consideration I was thinking if “VTK.js is a re-implementation of VTK/C++ in JavaScript…” could it run on a server? It also says “vtkWeb drives the C++ implementation of VTK through a web server via its Python wrapping” so I was just thinking if VTK.js is a re-implementation of the C++ VTK could it also run through a web server?

Maybe what I would like is to have a Javascript/TS wrapping instead of Python.

On other thoughts I was thinking if it would be possible to break the pipeline using VTK.js, where every step could be done on the server until it actually calls WebGL, like a multiplayer game where calculations are made on the server and clients just update the view. With this approach I would have to control the communications between client/server, and use/build something like wslink.

I thank you very much for your time replying, I am new to this world and I am trying to understand what is possible and what is not.

I see, so yes vtk.js is a “rewrite” of VTK/C++ but only for the rendering part, not really the pipeline and processing part of it.

1 Like