← back

movies_webapp

View on GitHub β†’

🌟 Architectural Vision & System Design

The architecture of movies_webapp is designed around the principles of high availability, strict separation of concerns, and low-latency data retrieval. Built as a modular monolith with a clear path toward microservices, the system decouples the ingestion of media metadata from the read-heavy presentation layer.

[ Client / UI ] 
       β”‚ (HTTPS / JWT)
       β–Ό
[ Spring Cloud Gateway / Load Balancer ]
       β”‚
       β–Ό
[ Spring Boot Application Layer ]
       β”‚
       β”œβ”€β–Ί [ Spring Security ] (Stateless Auth / RBAC)
       β”œβ”€β–Ί [ Cache Abstraction ] ──► [ Redis Cache (Hot Data) ]
       β”‚
       β–Ό
[ Persistence Layer (JPA / Hibernate) ]
       β”‚
       β”œβ”€β–Ί [ HikariCP Connection Pool ]
       β”‚
       β–Ό
[ PostgreSQL Database (Primary Store) ]

Core Data & System Flow

  • Ingestion / Input: Media metadata enters the system via RESTful APIs. External metadata synchronization (e.g., TMDB/OMDb integrations) is handled asynchronously using Spring’s task execution framework to prevent blocking user-facing threads.
  • Processing / Logic: Business logic is encapsulated within transactional service boundaries. The system utilizes domain-driven design (DDD) patterns to isolate the core Movie, Actor, and User aggregates, ensuring high maintainability and clean boundaries.
  • Persistence & Caching: Relational data is persisted in PostgreSQL, utilizing Hibernate for ORM. To mitigate database read pressure during peak traffic, a write-through caching strategy is implemented via Redis, ensuring that hot-ticket movie queries never hit the primary database.

πŸ’» Tech Stack & Engineering Decisions

Every technology choice in this stack was selected to balance developer velocity, type safety, and runtime performance under heavy enterprise workloads.

  • Backend & APIs (Java 17 & Spring Boot 3.x): Java 17 was selected for its modern language features (such as Records for immutable DTO