Sale!

CPSC 476 Back-End Engineering Project 3 solved

Original price was: $35.00.Current price is: $30.00. $25.50

Category:

Description

5/5 - (4 votes)

Introduction
In this project, you will port the MiniTwit API to Cassandra, a wide-column NoSQL database.
Project Code
If you completed Project 2, you should build on that foundation (though you may choose to run
single instances of minitwit.py and mt_api.py rather than a load-balanced cluster). If
necessary, however, you may start from Project 1’s codebase.
Test Environment
You may use any platform for development and testing, and NGINX is partially supported on
Windows, but note that per the Syllabus the test environment for projects in this course is the
Ubuntu MATE VM for available from http://michael.shafae.com/#resources.
Install Cassandra using the instructions for installation from Debian packages. Note that
Cassandra is fairly resource-intensive, and you may notice a performance impact. If you are
running the Ubuntu MATE VM on a host machine with enough RAM, consider allocating
additional memory to the VM.
Starting and Stopping Cassandra
The Cassandra server will start as soon as the package is installed, but you may not want to
leave it running at all times. To stop the server, use the following command:
$ sudo systemctl stop cassandra
When you want to use Cassandra, you can start it again with
$ sudo systemctl start cassandra
You can check to see if Cassandra is running with
$ sudo systemctl status cassandra
Note that once the systemctl start command has been executed, it may take a few minutes
before Cassandra is ready to accept connections. If you run the cqlsh command immediately
you may receive an error message such as ‘Unable to connect to any servers’. If
systemctl status shows Cassandra running, wait a bit and try again.
Cassandra is configured to start automatically when the VM boots. If you plan to start and stop
Cassandra manually, you can use the following command to disable this behavior:
$ sudo systemctl disable cassandra
Note that the systemctl disable command only affects what will happen when the system
boots; it will not stop Cassandra if it is currently running.
Python Cassandra Driver
Install the DataStax Python Cassandra Driver, using the instructions provided. Do not install the
python-pycassa driver package included with Ubuntu; it does not support CQL.
Cassandra Flask Extension
You may wish to install and use the Flask-Cassandra extension to configure your Cassandra
connection, but this is not a requirement.
Database Population
You will need to update your initdb and populatedb Flask CLI commands to connect to
Cassandra and use CQL.
Cassandra Data Model
Create a single keyspace and at least one column family. (You may wish to create a separate
column family to store login information.) The data from the SQL followers table should be in
a column containing a collection.
The Data Modeling portion of the Cassandra documentation is, sadly, missing. But recall the
advice from Chapter 8 of the textbook: identify the access patterns for each MiniTwit API call,
then create additional indexes as necessary for any queries not based on primary key.
Submission
Turn in the code for your project by placing minitwit.py, Procfile, modified configuration
files from /etc/nginx, and any other relevant files in the project2/ subdirectory of the folder
that was you on Dropbox. If you needed to modify mt_api.py, include the updated code and
documentation. You may work alone, or make a single submission for a team of 2-3 students. If
you work in a team, make only one submission.
To complete your submission, print this sheet, fill out the spaces below, and submit it to the
professor in class by the deadline. Failure to follow the instructions exactly will incur a 10%
penalty on the grade for this project for all students on the team.
Project Submission
CPSC 476, Section 1
Project Number ____________________
Names of up to three students for this submission
1. _____________________________________________________________________
2. _____________________________________________________________________
3. _____________________________________________________________________
CSUF email of the Dropbox account containing the project files for this submission
________________________________________
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________
____________________________________________________________________________