Project focusing on scalability and load testing for COSI 105B: Software Engineering at Scale at Brandeis University.
See it on Heroku. (edit: Since this project was completed, Heroku upgraded their Postgres servers and some incompatibility occurred with our project. We have not resolved it at this time and our application is currently down on Heroku.)
- Makes sure the login cookie is valid (if present)
- Shows the current homepage, depending on whether or not the user is logged in or not.
- Gets the 100 most recent tweets, from all users if not logged in, or from the users followees if they are logged in.
- Redirects to
/nanotwitter/v1.0/logout
if user is logged in. - Loads the root page with 100 most recent tweets of all users.
- Deletes the session cookie, then redirects to
/logout
- Gets a user and their tweets by their
:username
- Loads a user's home page, displaying their most recent 100 tweets
- Returns
404
if no user is found
- Get's a user's username from their
id
and redirects to/nanotwitter/v1.0/users/:username
- CAN ONLY BE CALLED BY A USER WHO IS LOGGED IN
- Gets the
followees
of the logged in user - Loads the logged in user's profile page with a list of their
followees
- Creates a new user and logs them in
- Uses the Sinatra Formkeeper gem to validate registration forms
- If registration fails to validate, redirects to
/
and displays an error alert
- Searches database for users with names or usernames corresponding to
params[:search]
search terms - Also uses the Sinatra Formkeeper gem
- Loads a search results page with the results
- Creates a new tweet and caches it in Redis
- Redirects back to the request URL
- Verifies a user's username and password. Stores user's ID in a session cookie.
- Redirects to
/
- Logged in user begins to follow user
:username
- Redirects back to the request URL
- Logged in user unfollows user
:username
- Redirects back to the request URL
- Has user
test_user
tweet a random string using the Faker gem - Renders the tweet into html and caches it in Redis
- Does not redirect anywhere
- Has user
test_user
follow or unfollow a random user from the first 1,000 users in our database
- Gets the user object for
test_user
and the tweets of itself and itsfollowees
- Loads a user page with those tweets
- Deletes all of
test_user's
follow relationships and tweets to reset database between load tests - Deletes the Redis cache and redirects to
/