Implementing a server that hosts playgrounds for the Storm(vogel) probabilistic model checker.
Software stack:
- Backend: Flask
- Frontend: Svelte
project-root/
├── backend/ # Flask backend
│ ├── app.py # Entry point for the backend
│ └── ... # Additional backend files
├── frontend/ # Svelte frontend
│ ├── src/ # Component source code
│ └── ... # Other frontend files
- See
server_installation_writeup.md
Note: For detailed steps you can also look into
server_installation_writeupin particular Step 1 and Step 2
- install docker: deamon and cli (or docker-desktop :) https://docs.docker.com/engine/install/ubuntu/ ) also install Gvisor: https://gvisor.dev/docs/user_guide/install/ To get the docker image we now only need to call this :
docker pull stormvogel/stormvogel- Install backend dependencies (probably want to use a pip or conda environment):
pip install requirements.txt- Create an environment file with a secret key in
backend/.env:
python3 -c "import secrets; print(f'FLASK_SECRET_KEY=\"{secrets.token_urlsafe(32)}\"')" > backend/.env- Install flask:
npm install <in-frontend-folder> npm run dev
- in backend folder:
python3 app.py <in-backend-folder> gunicorn --bind 127.0.0.1:5000 app:app (can also be used but does not set debug flag)
- in frontend folder:
npm run dev
-
Vitest frontend testing (unit)
- In frontend directory
- To get a coverage report of the frontend run:
npm run coverage
- To just test the frontend:
npm test -
Playwright frontend testing (integration)
- In frontend directory
npm run playwright
- You can also run the tests in ui mode:
npm run playwright:ui
-
Pytest backend testing (unit)
- In backend directory
pytest
-
Container closing is not entirely foolproof it doesn't account for abnormal session closing (like browser crash etc) also if the tabs stay open, so do the containers.
-
Development on firefox is not ideal There is some issue with running the server locally on firefox there seems to be some internal timeout that stops requests. We could not figure out why this happens it is certainly not our code.
-
The memory limit and cpu quota on the containers might need some tuning Depending on how much cpu you want to give each container, currently it is unboudned. You can change it in the starup container in sandbox.py. The memory limit can also be changed as it is qutie low (256MB) right now.
This project is licensed under the GPL-3.0 license.
- Storm model checker: Storm
- Stormpy python bindings: Stormpy
- Stormvogel: Stormvogel