Skip to content

Latest commit

 

History

66 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Reddit Engine

This project implements a Reddit-like engine using the actor model in the Go programming language. It was developed as part of COP5615 - Distributed Operating System Principles coursework and includes features such as user management, subreddit creation, post and comment handling, voting, and performance simulation. The engine also supports REST APIs and multi-client interactions.

reddit

Source: Reddit


Table of Contents

  1. Description
  2. Features
  3. Architecture
  4. Getting Started
  5. API Endpoints (Project 5)
  6. Simulation Testing

Description

This repository contains the code for the last two projects (Project 4 and Project 5) of COP5615 - Distributed Operating System Principles.

The specific APIs supported by Reddit can be found at: Reddit API Documentation.
For an overview of Reddit and its functionality, visit: What is Reddit?.

Project Overview

  • Project 4: Build a Reddit-like engine and implement a simulator to analyze the performance of the engine.
  • Project 5: Extend the previously built engine by creating REST APIs and implementing multiple clients that can interact with the engine simultaneously using two separate processes.

Features

The Reddit-like engine includes the following functionality:

  1. User Management

    • Register an account.
  2. Subreddit Management

    • Create and join subreddits.
    • Leave subreddits.
  3. Post Management

    • Post in subreddits (text-only posts; no support for images or markdown).
    • Comment on posts (supports hierarchical comments, i.e., commenting on comments).
  4. Voting and Karma

    • Upvote or downvote posts and comments.
    • Compute user karma based on votes.
  5. Feed and Messaging

    • Retrieve a feed of posts from subscribed subreddits.
    • Send and receive direct messages.
    • Reply to direct messages.
  6. Simulator

    • Simulate as many users as possible.
    • Simulate periods of live connection and disconnection for users.

Architecture

  • The project is designed with a separation between:

    1. Client Processes: Handle user actions such as posting, commenting, and subscribing.
    2. Engine Process: Distributes posts, tracks comments, handles votes, and manages user data.
  • Multiple independent client processes simulate thousands of users interacting with a single-engine process.


Getting Started

Prerequisites

Installation

Check ReadMe of respective Project

API Endpoints (Project 5)

User Management

  • POST /register: Register a new account.

Subreddit Management

  • POST /subreddit/create: Create a new subreddit.
  • POST /subreddit/join: Join a subreddit.
  • POST /subreddit/leave: Leave a subreddit.

Post Management

  • POST /post: Create a new post in a subreddit.
  • GET /feed: Retrieve posts from subscribed subreddits.

Commenting

  • POST /comment: Add a comment to a post or another comment.

Voting

  • POST /vote: Upvote or downvote a post or comment.

Messaging

  • GET /messages: Retrieve direct messages.
  • POST /message/reply: Reply to a direct message.

Simulation Testing

The project includes a tester/simulator to validate functionality:

  1. Simulate thousands of users performing actions like posting, commenting, voting, etc.
  2. Test periods of live connection and disconnection for users.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages