PSLab Remote Experiments
Introduction to the Virtual Lab
A virtual lab interface gives students remote access to equipment in laboratories via the internet without having to be physically present near the equipment. The idea is that lab experiments can be made accessible to a larger audience which may not have the resources to set up the experiment at their place. Another use-case scenario is that the experiment setup must be placed at a specific location which may not be habitable.
The PSLab’s capabilities can be increased significantly by setting up a framework that allows remote data acquisition and control. It can then be deployed in various test and measurement scenarios such as an interactive environment monitoring station.
Introductory blog posts
- Designing a remote access framework with PSLab
- Creating backend API methods using Python Flask Framework
- Execute python function calls remotely
- Deploying the API server and Webapp to separate domains automaticaly
- Creating better structured apps from user submitted scripts
- Adding a graph component to the frontend
The virtual lab will be hosted using Python-Flask, which is a BSD Licensed microframework for Python based on Werkzeug and Jinja 2 . It will use sqlalchemy to interface with databases containing user credentials and data. At present, postgresql will be used.
The repository has been integrated with Heroku, and modifications to the master branch are automatically deployed to pslab-stage.herokuapp.com after the CI build passes
The frontend code resides in a subdirectory called
frontend . It is Designed with EmberJS , and a production build is automatically deployed to pslab-remote.surge.sh by the CI if the build is successful.
- Install all packages in requirements.txt
- Change directory to the frontend sub-directory, and run
Running the app locally
This launches the API server on default port 8000
ember -s environment='development'
this launches the the emberjs webapp on port 4200
navigate to localhost:4200 in your web browser
- homepage hook
- SignUp hook
- SignUp database updation procedure
- SignIn hook
- SignIn database verification
- User script page hook
- Store, Edit, View, Delete user submitted code snippets
- Execute a function string
- Execute a code snippet
- Create object oriented apps
New Frontend based on EmberJS
- Home Page
- Navbar with bootstrap styling
- sign-up page
- sign-in page
- user-home.html. Feature to Create and Store code snippets. Execute function strings
- Create/Edit/Delete/Execute Python scripts. Embedded ace-js code editor.
- Display object oriented applications
- Plot data with the integrated JQplot library
This project was moved from another repository, and in order to browse the various issues and PRs, the following links may help