Design a webinar platform with Silver/Gold/Platinum license caps and global user limits
Difficulty: MEDIUMCategory: LLDFrequency: 1Asked On 2024-09-14
Problem Statement
Designing a webinar platform that supports live video sessions, attendee management, and tiered license restrictions. Focus is on object-oriented design, modular architecture, license enforcement, and scalability.
✅ Functional Requirements
1.Webinar Management
•Admins can create, schedule, and cancel webinars.
•Each webinar has metadata: webinarId, title, host, startTime, endTime, licenseType.
•Webinars can have multiple hosts and co-hosts.
2.User Management
•Register and authenticate users.
•Users can attend webinars based on license constraints.
•Track user participation, attendance duration, and engagement.
3.License Enforcement
•Silver, Gold, Platinum licenses with specific attendee caps per webinar:
•Silver: 100 attendees
•Gold: 500 attendees
•Platinum: 1000 attendees
•Enforce global user limit per webinar.
4.Webinar Participation
•Users can join webinars → check license and availability.
•Support real-time attendee count updates.
•Handle waitlisting if capacity is reached.
5.Notifications & Alerts
•Notify users about webinar start, cancellations, or capacity limits.
•Optional: email reminders and alerts for hosts.
6.Reporting & Analytics
•Track attendance per webinar.
•Generate reports: total users, peak concurrent users, engagement metrics.
🔐 Constraints & Assumptions
•Focus is on LLD, class design, and license enforcement, not on streaming implementation.
•Assume network and video delivery is handled by another service.
•Multiple webinars can run concurrently.
🧱 Key Components & Classes
1.User Class
1
2class User {
3private:
4 string userId;
5 string name;
6 string email;
7public:
8 void joinWebinar(Webinar* webinar);
9};1.License Class
1
2class License {
3private:
4 string licenseType; // Silver, Gold, Platinum
5 int maxAttendees;
6public:
7 int getMaxAttendees();
8};1.Webinar Class
1
2class Webinar {
3private:
4 string webinarId;
5 string title;
6 User* host;
7 vector<User*> attendees;
8 License* license;
9 int globalUserLimit;
10public:
11 bool addAttendee(User* user);
12 void removeAttendee(User* user);
13 int getCurrentAttendeeCount();
14};1.WebinarManager Class
•Handles creating, scheduling, and managing webinars.
1
2class WebinarManager {
3public:
4 void createWebinar(Webinar* webinar);
5 void cancelWebinar(string webinarId);
6 Webinar* getWebinar(string webinarId);
7};1.NotificationManager Class
•Sends alerts for webinar events (start, cancel, capacity reached).
1
2class NotificationManager {
3public:
4 void notifyUser(User* user, string message);
5};🔄 Example Workflow
1.Admin creates a webinar → WebinarManager.createWebinar().
2.Users attempt to join → Webinar.addAttendee() checks license cap and global limit.
3.Webinar reaches capacity → additional users are waitlisted or denied.
4.Webinar starts → NotificationManager notifies all attendees.
5.Attendance and engagement are tracked for reporting.
🧪 Expected Deliverables
•Class diagram showing User, License, Webinar, WebinarManager, and NotificationManager.
•Implementation of webinar creation, attendee management, license enforcement, and notifications.
•Test cases:
•Enforce license-based attendee caps
•Global user limit enforcement
•User joining and leaving webinars
•Notification delivery for events
💡 Discussion Points
•Concurrency: handling multiple users joining simultaneously.
•Scalability: supporting multiple concurrent webinars.
•Extensibility: support for tiered features like Q&A, polls, or breakout rooms.
•Reporting: efficient tracking of attendance and peak usage.