Course: Project 63-31 Collaborative Programming (Fall 2025) Topic: Socket-Based Movie Recommendation System
- Elia Pfamatter
- Vuk Vasic
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.
- 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.
This project enforces SOLID principles and utilizes the following design patterns:
- Composite Pattern: Used in the
GenreTreeandGenreNodestructure to treat individual movies and genre hierarchies uniformly. - Command Pattern: Used to parse and execute client requests (e.g.,
AddMovieCommand,RecommendCommand), ensuring loose coupling between the request and the execution logic. - Strategy Pattern: Used in the
recommendationpackage to switch between different recommendation algorithms (TopRatedStrategy,GenreSimilarStrategy) at runtime.
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