Skip to content
Low Level Design Mastery Logo
LowLevelDesign Mastery

Meeting Room Scheduler - List Bookings

Design a Meeting Room Scheduler system that enables comprehensive booking management with listing, filtering, sorting, searching, pagination, and export capabilities.

What is the Meeting Room Scheduler - List Bookings Problem?

Section titled “What is the Meeting Room Scheduler - List Bookings Problem?”

Design a Meeting Room Scheduler system that allows users to list, filter, sort, search, and export bookings. The system should support listing bookings by room, user, or time period; filtering by multiple criteria; sorting by different attributes; searching by keywords; pagination for large datasets; and exporting booking lists in various formats. The system should also visualize conflicting bookings.

In this problem, you’ll design a system that efficiently manages and presents booking data with complex querying capabilities, demonstrating how to handle large datasets with pagination and provide flexible filtering and sorting mechanisms.


Design a comprehensive booking management system that provides efficient querying, filtering, sorting, searching, and export capabilities for meeting room reservations.

Functional Requirements:

  • Booking Listing: List all bookings for a specific room, user/organizer, or time period.
  • Filtering: Filter bookings by room, user/organizer, date range, and booking status. Multiple filters can be applied simultaneously.
  • Sorting: Sort bookings by start time, room name, or organizer name in ascending or descending order.
  • Search: Search bookings by keywords that match booking titles, participant names, or room names (case-insensitive).
  • Booking Details: Display detailed information including booking ID, room name, organizer, participants, start time, end time, and status.
  • Conflict Visualization: Identify and visually mark bookings with overlapping time slots for the same room.
  • Export: Export booking lists in CSV and JSON formats, including all filtered/sorted/search results.
  • Pagination: Handle large datasets with configurable page size and navigation controls (next, previous, first, last page).

Non-Functional Requirements:

  • Object-Oriented Design: Clear separation of concerns with well-defined roles for each class.
  • Modularity: Easy to add new filtering criteria, sorting options, or export formats without modifying existing code.
  • Thread Safety: Listing, filtering, sorting, and pagination operations must be safe from race conditions.
  • Performance: Efficiently handle large datasets (thousands of bookings) with optimized operations.
  • Extensibility: Core listing logic should be robust, testable, and maintainable over time.

The system provides a service layer for querying and managing booking data.

Diagram
classDiagram
    class BookingListService {
        -Map~String,Booking~ bookings
        -FilterStrategy filters
        -SortStrategy sortStrategy
        +listBookings(...)
        +filterBookings(...)
        +sortBookings(...)
        +createIterator(...)
    }
    
    class FilterStrategy {
        <<interface>>
        +matches(Booking)
    }
    
    class SortStrategy {
        <<interface>>
        +compare(Booking, Booking)
    }
    
    class BookingIterator {
        <<interface>>
        +hasNext()
        +next()
        +getCurrentPage()
    }
    
    class Booking {
        -String id
        -MeetingRoom room
        -User organizer
        -DateTime startTime
        -DateTime endTime
    }

    BookingListService --> FilterStrategy
    BookingListService --> SortStrategy
    BookingListService --> BookingIterator
    BookingListService --> Booking

Diagram

1. Efficient Pagination for Large Datasets

Section titled “1. Efficient Pagination for Large Datasets”

When dealing with thousands of bookings, loading all data into memory is inefficient.

Solution: Use the Iterator Pattern. Create a PaginatedBookingIterator that maintains current page, page size, and total pages. The iterator provides methods to navigate through pages without loading all data at once. This supports lazy loading and efficient memory usage.

Users need to filter by multiple criteria (room, user, date range, status) and sort by different attributes (time, room, user).

Solution: Use the Strategy Pattern. Create separate strategy classes for each filtering criterion (RoomFilterStrategy, UserFilterStrategy, DateRangeFilterStrategy, StatusFilterStrategy) and sorting option (SortByTimeStrategy, SortByRoomStrategy, SortByUserStrategy). Multiple filters can be combined (AND logic), and sorting strategies can be swapped at runtime.

Multiple users might query bookings simultaneously, requiring thread-safe operations.

Solution: Use synchronized blocks or locks in all state-changing methods. Use ConcurrentHashMap for thread-safe storage. Ensure iterator operations are thread-safe to prevent concurrent modification exceptions.

Identify bookings with overlapping time slots for the same room.

Solution: Create a ConflictDetector that checks for overlaps by comparing time ranges. Two bookings conflict if they are for the same room and their time slots overlap (start1 < end2 AND end1 > start2).


By solving this problem, you’ll master:

  • Iterator Pattern - Implementing pagination for efficient data traversal.
  • Strategy Pattern - Encapsulating filtering and sorting algorithms for extensibility.
  • Concurrency Control - Ensuring thread-safe operations in multi-user environments.
  • Export Functionality - Supporting multiple export formats with extensible design.
  • Search Functionality - Implementing keyword search across multiple fields.

Ready to see the full implementation? Open the interactive playground to access:

  • 🎯 Step-by-step guidance through the 4-step LLD approach
  • 📊 Interactive UML builder to visualize your design
  • 💻 Complete Code Solutions in Python, Java, C++, TypeScript, JavaScript, C#
  • 🤖 AI-powered review of your design and code

After mastering the Meeting Room Scheduler - List Bookings, try these similar problems: