PeerLogic Web Services

From Expertiza_Wiki
Jump to navigation Jump to search

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.

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
  • After doing so, 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.

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.