Alternatively, the system could be structured using a Serverless architecture, which enables us to scale the service as needed. The application design would mainly include an API gateway, multiple AWS Lambda functions, and an Amazon RDS database. The API Gateway would manage incoming requests and direct them to the corresponding Lambda functions. These functions might cover tracking class participation, user interactions during classes, and user ratings. The Class Participation function would be tasked with monitoring user attendance in classes. The Class Interaction function would facilitate social interactions within the class, such as 'high fives' and messaging. The Ratings function would log user ratings for each class. Amazon RDS would act as our main database, containing information about users, classes, participation, interactions, and ratings. A distinct Ranking function would execute at regular intervals (for example, each night) to refresh a class ranking table in the database. This function would analyze all collected data to establish a ranking for each class based on an algorithm we create. This algorithm could consider user participation, interactions, and ratings, assigning different weights to each factor as we deem appropriate. This approach would allow us to maintain an up-to-date ranking of Peloton classes for users to access.