Architecture and deployment of the PDQ webapp - ProofDrivenQuerying/pdq GitHub Wiki
The git repository contains the code for a REST api that wraps some of the PDQ functionality, some demonstration webservices that are used as datasources for testing the PDQ runtime, and a web-based GUI that makes use of both the REST API and the demonstration services. Here we comment on how these can be installed for those who are interested in modifying any of them. Currently the PDQ demo is running at http://pdq-webapp.cs.ox.ac.uk, using a server with tomcat running on port 80 (locally it is also available from port 8080).
We need 3 webapps on this server:
- The
pdqWebapp
project usually deployed as "webapp". This contains example web service implementations used by unit tests and both GUIs. react-rest
is the backend for the Web-GUI. This contains web services that will be used by the java scripts in the UI.react-ui
this is the new GUI. The tomcat by default redirects to this Web-App, so the http://pdq-webapp.cs.ox.ac.uk should redirect you there.
Deployment of each server can be different, but the the two webservices are simple. Create a war file and copy it to the tomcat's webapps
folder.
Creating a war file for the pdqWebapp
is usually done by eclipse (export -> WAR file
) the react-rest
can be packed using maven
commands (install and build should create a WAR file).
The react-ui
is the hardest to build and deploy.
It is very sensitive to Java versions and such, so make sure you have the exact same JDK.
The install
+ build
commands should create a deployable output, but it is not a WAR file and it doesn't contain the WEB-INF
folder, so those have to be copied from the current deployment.
The deployed page is sensitive to its own name, so it have to be called react-ui
, otherwise it won't work.
The package.json
file describes the location for the backend, I had success using "proxy": "http://localhost:8080/pdq-react-rest"
config settings.
When the backend cannot be found by the UI you get an empty page with no errors just the PDQ logo.