Skip to content

eliapfammatter/recomTreeProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RecomTree: Socket-Based Movie Recommendation System

Course: Project 63-31 Collaborative Programming (Fall 2025) Topic: Socket-Based Movie Recommendation System

πŸ‘₯ Authors

  • Elia Pfamatter
  • Vuk Vasic

πŸ“– Project Description

RecomTree is a Java-based client-server application that simulates the core mechanisms of a movie recommendation platform, inspired by Netflix's recommender system.

The system maintains a hierarchical N-ary Genre Tree to represent the movie catalog. It allows multiple clients to connect via TCP sockets to browse genres, rate movies, and receive automated recommendations based on specific strategies.

πŸš€ Key Features

  • Multi-Client Support: Handles multiple concurrent clients using Java TCP Sockets (ServerSocket, Socket).
  • Data Structure: Implements a custom N-ary Tree (GenreTree) to manage genres and subgenres efficiently.
  • Recommendation Engine: Generates suggestions using configurable strategies (e.g., Top-Rated, Genre-Similar).
  • Interactive CLI: Clients can add movies, rate titles, and request recommendations via a text-based interface.
  • SOLID Design: Built with strict adherence to modular architecture and design patterns.

πŸ›  Architecture & Design Patterns

This project enforces SOLID principles and utilizes the following design patterns:

  1. Composite Pattern: Used in the GenreTree and GenreNode structure to treat individual movies and genre hierarchies uniformly.
  2. Command Pattern: Used to parse and execute client requests (e.g., AddMovieCommand, RecommendCommand), ensuring loose coupling between the request and the execution logic.
  3. Strategy Pattern: Used in the recommendation package to switch between different recommendation algorithms (TopRatedStrategy, GenreSimilarStrategy) at runtime.

πŸ“‚ Project Structure

The project is organized into the following packages:

src/
β”œβ”€β”€ client/
β”‚   └── RecomTreeClient.java      # Handles TCP connection and user input
β”œβ”€β”€ server/
β”‚   β”œβ”€β”€ RecomTreeServer.java      # Main server loop
β”‚   └── ClientHandler.java        # Manages individual client threads
β”œβ”€β”€ command/
β”‚   β”œβ”€β”€ Command.java              # Command Interface
β”‚   β”œβ”€β”€ CommandFactory.java       # Creates commands from requests
β”‚   └── [ConcreteCommands].java   # (AddMovie, ListSubtree, RateMovie, etc.)
β”œβ”€β”€ recomTree/ (Model)
β”‚   β”œβ”€β”€ GenreTree.java            # Manager for the N-ary tree
β”‚   β”œβ”€β”€ GenreNode.java            # Nodes representing Genres
β”‚   └── Movie.java                # Data object for Movie details
└── recommendation/
    β”œβ”€β”€ RecommendationStrategy.java # Strategy Interface
    └── [Strategies].java         # Concrete algorithms

About

Recommendation Tree Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages