# VTK Remote Server with C++

**URL:** https://discourse.vtk.org/t/vtk-remote-server-with-c/6218
**Category:** Web
**Created:** [July 21, 2021, 4:16pm UTC](https://discourse.vtk.org/t/vtk-remote-server-with-c/6218 "2021-07-21T16:16:07Z")
**Posts on this page:** 9
**Page:** 2

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 12, 2021, 4:38pm UTC](https://discourse.vtk.org/t/vtk-remote-server-with-c/6218/21 "2021-08-12T16:38:18Z")

</div>

You have a mixed version that I was talking earlier. Neither VTK or ParaView can run using aiohttp. We are still working toward that but it looks like you need to downgrade wslink\<1.

---

<div class="post-metadata">

### Author: ![Tran\_Phong](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tran_phong/32/3749_2.png) [@Tran\_Phong](https://discourse.vtk.org/u/Tran_Phong)
#### Post date: [August 12, 2021, 6:18pm UTC](https://discourse.vtk.org/t/vtk-remote-server-with-c/6218/22 "2021-08-12T18:18:03Z")

</div>

Yes, sorry about posting the error, I accidentally ran Paraview whilst in virtual environment of VTK. But the performance is quite terrible. With vti file of 200 Mb, client is quite lagging when requesting 2D images from server. Do you have any hint to boost the performance. Here is the file that I am using: [209.64 MB file on MEGA](https://mega.nz/file/Zt5kGBIR#1nnwVkA4cx4mT3-uKUkcRk2E5EoP1AN1WN1lrN5HPyU) . Server is running fine without error log. The issue is only performance.

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 12, 2021, 7:17pm UTC](https://discourse.vtk.org/t/vtk-remote-server-with-c/6218/23 "2021-08-12T19:17:56Z")

</div>

1. What ParaView are you using (osmesa, egl, desktop) on which OS?
2. What kind of GPU do you have?
3. Are you doing volume rendering or geometry rendering?

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 12, 2021, 7:21pm UTC](https://discourse.vtk.org/t/vtk-remote-server-with-c/6218/24 "2021-08-12T19:21:31Z")

</div>

That example toggle between remote rendering and local rendering which could hammer the network when sending the geometry. If you want **Remote rendering** , you need to try the proper example such as `py-web-vue/examples/02_contour/vtk-remote-rendering`.

---

<div class="post-metadata">

### Author: ![Tran\_Phong](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tran_phong/32/3749_2.png) [@Tran\_Phong](https://discourse.vtk.org/u/Tran_Phong)
#### Post date: [August 12, 2021, 8:04pm UTC](https://discourse.vtk.org/t/vtk-remote-server-with-c/6218/25 "2021-08-12T20:04:10Z")

</div>

I am using this package : ParaView-5.9.1-1476-gf2172c1-osmesa-MPI-Linux-Python3.9-x86\_64 downloaded from Paraview page. I am using Ubuntu 20 desktop with no GPU. And I am doing volume rendering. For your question " If you want **Remote rendering** , you need to try the proper example such as `py-web-vue/examples/02_contour/vtk-remote-rendering`", I tried it but in browser I cannot rotate the object like I did in “02\_contour/pv-toggle-rendering” . Since I am new to this VTK/ Parview, applogize me for such silly questions, but my main objective is : server is responsible for 3D rendering, client is just display 2D images. And client is able to rotate object, cut object … (somehow it visualize like [Overview | itk-vtk-viewer](https://kitware.github.io/itk-vtk-viewer/docs/index.html), but this itk-vtk js is client side (which handles all task: volume rendering, rotate, cut …))

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 12, 2021, 8:33pm UTC](https://discourse.vtk.org/t/vtk-remote-server-with-c/6218/26 "2021-08-12T20:33:53Z")

</div>

ParaView-5.9.1-1476-gf2172c1- **osmesa** -MPI-Linux-Python3.9-x86\_64: osmesa == very-slow rendering.

You should use another binary if you want fast rendering. If you have X running, you can use the full ParaView binary otherwise EGL is the best option but will require that you have an nvidia GPU with the proper driver installed on your machine.

---

<div class="post-metadata">

### Author: ![Tran\_Phong](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tran_phong/32/3749_2.png) [@Tran\_Phong](https://discourse.vtk.org/u/Tran_Phong)
#### Post date: [August 13, 2021, 9:24am UTC](https://discourse.vtk.org/t/vtk-remote-server-with-c/6218/27 "2021-08-13T09:24:40Z")

</div>

Thanks a lot Sebastien,

Using **ParaView-5.9.1-1512-g16e57c9-MPI-Linux-Python3.9-x86\_64** gives much better performance. My ubuntu laptop (8Gb RAM, core i3, and no nvidia GPU) can handles 1Gb of vti file, and client can display the 2D images and can rotate the object although it’s still lagging (but much better than my previous post). I have another question, how can I get rid of displaying the application (as image below) when running app.py ? Says if I run the server in a docker or a remote Ubuntu server (which only work via terminal), how can the server works without x-running ?

![image](https://discourse.vtk.org/uploads/default/original/2X/f/f8d22f265e8fddec3df514463dc7cc3c8b6b28b5.png)

---

<div class="post-metadata">

### Author: ![Tran\_Phong](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tran_phong/32/3749_2.png) [@Tran\_Phong](https://discourse.vtk.org/u/Tran_Phong)
#### Post date: [August 13, 2021, 9:30am UTC](https://discourse.vtk.org/t/vtk-remote-server-with-c/6218/28 "2021-08-13T09:30:38Z")

</div>

Thanks a lot Sebastien,

Using **ParaView-5.9.1-1512-g16e57c9-MPI-Linux-Python3.9-x86\_64** gives much better performance. My ubuntu laptop (8Gb RAM, core i3, and no nvidia GPU) can handle 1Gb of vti file, and client can display the 2D images and can rotate the object although it’s still lagging (but much better than my previous post). I have another question, how can I get rid of displaying the application (as image below) when running app.py ? Says if I run the server in a docker or a remote Ubuntu server (which only work via terminal), how can the server work without x-running ?

![image](https://discourse.vtk.org/uploads/default/original/2X/f/f8d22f265e8fddec3df514463dc7cc3c8b6b28b5.png)

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 13, 2021, 4:33pm UTC](https://discourse.vtk.org/t/vtk-remote-server-with-c/6218/29 "2021-08-13T16:33:49Z")

</div>

You need the EGL binary with the nvidia-runtime for your docker and an nvidia gpu. That is the way we deploy vtk/paraview web application in the cloud with docker.

[Previous page](https://discourse.vtk.org/t/vtk-remote-server-with-c/6218.md?page=1)
