PeerLogic Web Services: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:


==Documentation Videos (Start Here!)==
==Documentation Videos (Start Here!)==
If you are just starting out accessing the PeerLogic Web Services, a series of videos have been created to explain the general premise of the web services, demonstrate some of the information expressed below, and more. This is a good way to get a general overview of how the Web Services work. To view these videos, click [ here].
If you are just starting out accessing the PeerLogic Web Services, a series of videos have been created to explain the general premise of the web services, demonstrate some of the information expressed below, and more. This is a good way to get a general overview of how the Web Services work. To view these videos, click [https://expertiza.csc.ncsu.edu/index.php/PeerLogic_Web_Services:_Videos here].


==Getting Started on Updating the Server==
==Getting Started on Updating the Server==

Revision as of 00:38, 10 May 2022

Summary

The expertiza web services are a group of scripts and programs utilized by the expertiza website for performing various functions. These functions are hosted at peerlogic.csc.ncsu.edu and are externally called for the purposes of better performance, flexibility, and modularity.

This page is documenting all of these services, including where they are located, the code they utilize, and theoretical explanations of what they are performing.

The collection of the code for all of these web services can be found here.

Documentation Videos (Start Here!)

If you are just starting out accessing the PeerLogic Web Services, a series of videos have been created to explain the general premise of the web services, demonstrate some of the information expressed below, and more. This is a good way to get a general overview of how the Web Services work. To view these videos, click here.

Getting Started on Updating the Server

If for some reason, you need to modify, change, or update the code hosted at peerlogic.csc.ncsu.edu, you may follow these steps to do so.

  • Submit a request to CSC IT in order to be given access to the server. You can do this by emailing them at csc_help@ncsu.edu and cc'ing Dr. Gehringer so he may verify you have permission to do so.
  • Prepare the code you intend to add or modify in a GitHub repository. This will make it as simple as possible to transport your code to the web server.
  • The server can only be accessed from within the internal NCState network. In order to gain this access, create a VCL reservation here, and SSH or remote desktop into the VCL. For the purposes of this explanation, I will assume you are doing this using Unix for your VCL.
  • Now that you are within the network, you can access the server via the SSH command, using your unityid. You will also be asked to provide your password upon connecting to the server. The command to ssh is given below:
ssh <unityid>@peerlogic.csc.ncsu.edu
  • Once you have successfully connected to the server, you will be placed in a directory named after your Unity ID. Navigate up and out of this directory until you reach the top directory level (as far out as you can go).
  • Webservices are hosted within the directory opt/webservices, so navigate to that directory to make your changes.

Adding a New Web Service

  • If your intention is to add a new web service, you will need to edit one of the two startup scripts in /opt/webservices: runws_root.sh, and runws_user.sh.
  • runws_user.sh belongs to the "railsadmin" user and runs ruby 2.3.0p0. This file should be modified in order to start up any Ruby services.
  • runws_root.sh, meanwhile, is run by the root access user, and should be used for any Python scripts or anything needing root access.
  • Pick the appropriate script and add the code to start your application within
  • Then, move your service code into a new folder within the /opt/webservices directory. It is recommended to do this by downloading your project from GitHub directly into a directory within /opt/webservices, as sending or receiving files would be difficult due to the SSH stack necessary to access the server.
  • After doing all this, navigate back to the top directory and access /etc/nginx/nginx.conf
  • Within this config file, each service is assigned to a unique port on the machine. Your application must be configured to run on one of these ports, and on a port not already in use (please see the config file to see which ports are already in use).
  • To add your application to these url mappings, add this code to the config file, substituting the urls relevant to your service:
location ^~ /[URL_PATH_TOBE_EXPOSED_EXTERNALLY] {
        	proxy_pass [YOUR_SERVICE_LOCAL_URL];
}
  • Once this is done, start your service and set it up to run after you've finished ssh'ing by running the following command:
sudo nohup python _yourscript_.py &
  • Finally, reload nginx to update the changes to the config file using the following command:
sudo service nginx reload

IntelligentAssignment

IntelligentAssignment is a Python application which has the stated purpose of forming project groups by performing k-means clustering on their topics of interest.

Please see the extended documentation here.

This project was last updated in March of 2018.

The code for this project can be accessed here: https://github.com/peerlogic/IntelligentAssignment.

RainbowGraphService

RainbowGraphService is a primarily JavaScript application that visualizes the results of peer review criticisms.

Please see the extended documentation here.

This project was last updated in March of 2018.

The code for this project can be accessed here: https://github.com/ferryxo/RainbowGraphService.

AutoSummaryV1

AutoSummaryV1 is a Javascript application about explaining and summarizing reviews made by students.

Please see the extended documentation here: here.

This project was last updated in February of 2016.

The code for this project can be accessed here: https://github.com/peerlogic/AutoSummaryV1.

reputation_web_service

reputation_web_service is a Javascript application with extensive documentation, detailing the web service's use for determining user reputation.

Please see the extended documentation for this project here: here.

This project was last updated in April of 2016.

The code for this project can be accessed here https://github.com/peerlogic/reputation_web_service.

Peer-reviews-NLP

Peer-reviews-NLP is a Python-based program which is used to tag student reviews. It does so by performing NLP and identifying features such as the presence of suggestions, problems, and more. Currently, 5 options are known to be functioning and useful: volume, suggestions, suggestions_confidence, problems, and problems_confidence. It is actively used by expertiza to do review tagging using ML.

Please see the extended documentation here.

This project was last updated in March of 2018.

The code for this project can be accessed here: [1].


autometareviews0.1

This project is a Ruby application for the purpose of natural language processing, including sentiment analysis, volume, tone, etc.

This project was last updated in April of 2016.

The code for this project can be accessed here https://github.com/peerlogic/autometareviews0.1.

Other Resources

The following are older resources with a bit more depth into specifics, left here for the sake of not losing any information.

Original PeerLogic web service set up: here.

NLP Web Service Setup: here.