tsgouros / ParaViewWeb-SimpleDemo

A bare-bones example for people who want to put together a ParaViewWeb application.
7 stars 1 forks source link

ParaViewWeb-SimpleDemo

A bare-bones example for people who want to put together a ParaViewWeb application.

Use this framework to start building a ParaViewWeb application. It has a lot of the basics in place -- how to create callable remote procedures on the python server and how to invoke them from the client. It also uses webpack for the client configuration and npm for its management.

This code is released under the Creative Commons zero license. Go wild.

Tom Sgouros
Center for Computation and Visualization
Brown University
March 2018.

What's going on

The Paraview server is a python-controlled server that runs a paraview session and is accessible remotely from a web client. Meanwhile, there is a web server to serve the client (we just use node.js). So there are three components here:

Invitation to newbies

This is undoubtedly a bad implementation of the client and server, since it was put together by someone who is not an expert. But hopefully it will serve as a good introduction for other people who are not experts. Please feel free to use this code however you wish. If there is some feature that I have not explained, feel free to offer a pull request with a better explanation in the comments.

Invitation to experts

This is undoubtedly a bad implementation of the client and server, since it was put together by someone who is not an expert. It is meant for people who are just trying this out and likely to struggle with the details of the RPC implementation at first.

If there are errors I have made, or features that you see missing here that cry out to be added, please feel free to fix or add them, and offer me a pull request with the features added. But remember, this is for beginners, so please be liberal with the comments. Please remember that anyone can see what your code is doing, but nobody can tell why it's doing it.

Building and running.

Try this:

$ python -m pip install autobahn twisted wslink
$ cd python
$ pvpython PVWSDServer.py -i localhost -p 1234

Over on the client, try this:

$ cd js
$ npm install
$ npm run build
$ npm start

Then cross your fingers and go to a browser and open localhost:8080.