0% found this document useful (0 votes)
5 views

21L-6246 Icc Asm 1

cloud computing uber and netflix aws
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

21L-6246 Icc Asm 1

cloud computing uber and netflix aws
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Aroz Imran

21L-6246

BSDS 7B

Cloud Computing Assignment:

Question 1:
1. User Authentication and Authorization

Design:

 Use OAuth 2.0 for token-based authentication and authorization.


 Implement JWT (JSON Web Tokens) for secure, stateless
authentication.
 Social login support (Google, Facebook).
 AWS Identity and Access Management (IAM) for service-level access
control.
 Role-Based Access Control (RBAC) for managing permissions for
drivers and riders.

Schemaless MySQL:

 Store user details like login credentials, tokens, and profile data in
Schemaless MySQL for flexible schema evolution as user data changes.

Ringpop Integration:

 Membership Types: Use Ringpop’s membership protocol (SWIM) for


node discovery and failure detection across distributed
authentication services.

 Failover Mechanism Types: Automatic failover and session


management are handled using Ringpop's failover capabilities. In case
of a node failure, sessions will transfer seamlessly to another available
node.

2. Geo-location and Mapping

2.1 Real-time Tracking of Drivers and Riders

Approach:

 Real-time tracking uses GPS data from the driver’s and rider’s
smartphones, updated every few seconds.
 Use WebSockets for low-latency communication to keep the driver’s
and rider’s locations updated in real-time.
 Use Google Maps API or Mapbox to manage map data and routing.
 Use a combination of GPS coordinates and live traffic data (retrieved from the
mapping API Amazon Location Service) to calculate accurate ETAs.
 Amazon ElastiCache for Redis to cache frequent location queries

Data Storage:
 Store location data in NoSQL databases (Redis or DynamoDB) for fast
access and real-time updates.

Ringpop Integration:

 Consistent Hash Ring Types: Leverage Ringpop’s consistent


hashing for distributing location data across nodes. This ensures real-
time synchronization of tracking data among nodes.

 Request Forwarder Types: Efficiently forward location tracking data


requests to the appropriate node responsible for managing the specific
data.
2.2 Efficient ETA Calculation

System Design:

 Use APIs like Google Maps or Mapbox to calculate ETA, considering


factors such as driver’s location, traffic, and route distance.
 Improve ETA predictions with machine learning models that account
for historical data, traffic patterns, and time of day.

Dynamic Updates:

 Continuously update ETA as the driver’s location and traffic conditions


evolve.

Ringpop Integration:

 Load Balancer Types: Distribute ETA calculations across nodes to


improve performance and scalability. If a node fails, Ringpop’s failover
types ensure the tasks are reassigned.
 Partition Healing Types: Handle network partitions by redistributing
ETA calculation tasks once nodes are reintegrated into the system.

3. Ride Matching and Dispatching

3.1 Matching Algorithm

Algorithm:

 Use a Nearest Neighbor algorithm to match riders with the closest


available drivers based on proximity.
 Factor in driver ratings, traffic conditions, and ride history for optimal
matches.
 Use dynamic pricing (surge pricing) during high-demand periods to
affect driver matching.
Schemaless MySQL:

 Store dynamic data like driver availability, ride history, and matching
logic in Schemaless MySQL for flexibility as matching rules evolve.

Ringpop Integration:

 Consistent Hash Ring Types: Distribute the workload of matching


drivers and riders across the cluster using consistent hashing.
 Gossip Types: Use gossip protocol to propagate updates (e.g., driver
availability) across the system efficiently.

3.2 Handling Peak Hours

Solution:

 Implement surge pricing during peak hours to incentivize more drivers.


 Use load balancers to distribute ride requests across servers.
 Implement queueing systems to manage high volumes of ride
requests.

Ringpop Integration:

 Dynamic Node Balancer Types: Ringpop dynamically balances ride


requests across nodes, ensuring that no single server is overloaded.
 Failover Mechanism Types: If any node fails during peak times,
failover mechanisms ensure requests are reassigned to another node.

4. Real-time Updates and Notifications

Technology:

 Use WebSockets or HTTP/2 for real-time updates between drivers,


riders, and the server.
 Send push notifications for ride updates using Firebase Cloud
Messaging (FCM).
 Use SMS notifications as a fallback.
 Amazon SNS with Firebase Cloud Messaging for push notifications to
inform users of status updates regarding ride acceptance, driver arrivals, or
changes in the estimated arrival time.
 Amazon API Gateway with WebSocket API for real-time updates

5. Payment Processing

5.1 Design

Payment Gateway:

 Integrate with payment providers like AWS (Stripe), PayPal, Bank


transfer, micro-financing or local payment solutions.

Fare Calculation:

 Dynamically calculate fares based on distance, time, traffic, and surge


pricing.

Refunds:

 Use an event-driven architecture to handle refund requests triggered


by conditions such as cancellations.

Tokenization:

 Implement secure tokenization for credit card details.

Schemaless MySQL:

 Store payment transactions, fare history, and refund data in


Schemaless MySQL.

6. Scalability and Fault Tolerance

Scalability:
 Use a microservices architecture with horizontal scaling and load
balancers.
 Auto-scale services independently using auto-scaling groups.

Fault Tolerance:

 Deploy redundant services across geographic regions for geo-


redundancy.
 Use Ringpop’s failover types for automatic failover when nodes fail.

Cloud Services:

 AWS Auto-Scaling and Elastic Load Balancers for scaling.


 AWS Route 53 for global traffic management.

7. Driver and Rider Ratings

Design:

 Implement a two-sided rating system where both drivers and riders


rate each other after a ride.
 Store ratings in a NoSQL database like MongoDB for fast retrieval.

Ringpop Integration:

 Consistent Hash Ring Types: Distribute ratings across multiple


nodes to ensure fast retrieval during ride matching.
 Gossip Types: Propagate updated ratings across the system in real-
time.

8. Data Security and Privacy

Encryption:

 Use SSL/TLS for encrypting data in transit and AES-256 for encrypting
data at rest.

Data Masking:

 Mask sensitive data such as payment information and personal


identifiers.

Compliance:
 Ensure compliance with global regulations like GDPR and CCPA.

Cloud Services:

 AWS KMS for managing encryption keys.


 AWS CloudTrail for auditing data access.

Question 2:

Backend System Design for Netflix Application :

1. Microservices Architecture:

 Scalability: Use AWS Elastic Kubernetes Service (EKS) or AWS


Elastic Container Service (ECS) to run microservices in isolated
containers. This enables independent scaling for each service.
 Loose Coupling: Implement AWS SQS (Simple Queue Service) or
AWS SNS (Simple Notification Service) for decoupling microservices.
This allows for communication between services asynchronously,
improving scalability and fault tolerance.

2. Content Delivery Network (CDN)

 Efficient Video Streaming: Use Amazon CloudFront as the CDN to


cache content at edge locations, reducing latency and providing faster
video streaming for users globally.
 Latency Reduction: CloudFront minimizes latency by distributing
cached content closer to the user's geographic location.
 Traffic Management: CloudFront integrates with AWS Global
Accelerator to intelligently route user traffic to the optimal AWS
endpoint for lower latency and high performance.
3. Data Storage and Management

 Distributed Databases: Use Amazon DynamoDB for managing


session data, user preferences, and metadata. DynamoDB is a fully
managed NoSQL database that scales horizontally.
 Content Metadata: Store metadata about movies, series, and
content recommendations in Amazon RDS (Aurora) or DynamoDB
for fast lookups and flexible scaling.
 Data Sharing and Replication: AWS Aurora Global Database
allows data replication across regions for better availability and
disaster recovery.

4. Scalability and Load Balancing

 Elastic Load Balancers: Use AWS Elastic Load Balancer (ELB) to


distribute incoming traffic across EC2 instances or containers running
on EKS/ECS. ELB handles scaling and failover.
 Auto-scaling: Use Auto Scaling Groups to automatically adjust the
number of EC2 instances based on traffic patterns and demand.

 Horizontal Scalability: Leverage AWS EC2 Auto Scaling to scale


horizontally by adding more instances when the load increases.

5. Video Encoding and Transcoding


 Multi-Bitrate Streaming: Use AWS Elemental MediaConvert for
video encoding. MediaConvert enables adaptive bitrate streaming for
videos, providing different video quality options based on the user’s
bandwidth.
 Adaptive Streaming: Enable HLS (HTTP Live Streaming) or
MPEG-DASH using MediaConvert for adaptive streaming.
 Transcoding Pipeline: MediaConvert can be integrated with AWS
Lambda for triggering transcoding jobs based on uploaded video
content.

6. Recommendation Engine

 Machine Learning Algorithms: Use Amazon SageMaker to build,


train, and deploy machine learning models for content
recommendations based on user preferences, viewing history, and
trends.
 Personalized Experience: Implement collaborative filtering and
content-based filtering in SageMaker to provide personalized
recommendations for each user.
 Real-Time Data Processing: Use Amazon Kinesis for real-time
streaming data processing, such as capturing real-time user
interactions to adjust recommendations dynamically.

7. User Authentication and Authorization


 Access Control: Use AWS Cognito for secure user authentication,
providing support for multi-factor authentication (MFA) and OAuth 2.0.
 Multi-Device Support: Cognito allows seamless authentication across
multiple devices, enabling users to access Netflix on smartphones,
tablets, and TVs with the same account.

8. Payment Gateway Integration

 Billing System: Use AWS API Gateway to integrate with third-party


payment processors like Stripe or PayPal.

 Subscription Management: Manage subscription plans and


payments using AWS DynamoDB to store billing data and
subscription information.

 Global Payment Handling: Support global payment methods and


currencies by leveraging AWS Lambda to handle payment events and
integrate with global payment services.

9. Security and Compliance

 Data Encryption: Use AWS Key Management Service (KMS) to


encrypt user data, including personal information and payment details.

 Tokenization: Securely store and manage payment tokens using


AWS Secrets Manager or KMS.

 Digital Rights Management (DRM): Implement DRM solutions using


AWS Elemental MediaPackage, which supports Widevine,
PlayReady, and FairPlay DRM technologies.

10. Monitoring and Logging

 Real-Time Analytics: Use Amazon CloudWatch to monitor system


performance, log application metrics, and set alarms for high CPU,
memory, or I/O utilization.
 Error Handling: Use AWS X-Ray to trace requests as they travel
through the application and identify potential bottlenecks or errors.
 Health Checks: ELB provides built-in health checks to monitor the
status of backend services, automatically rerouting traffic in case of
failures.

11. Caching

 Content Caching: Use Amazon ElastiCache (Redis or Memcached)


to cache frequently accessed content metadata, reducing the load on
databases and improving content retrieval times.
 User Session Caching: Use ElastiCache to cache user sessions,
allowing quick access to user preferences and history without hitting
the database repeatedly.

12. API Gateway

 Unified Interface: Use AWS API Gateway to expose a unified


interface for all microservices, managing authentication, request
routing, and rate limiting.
 Request Routing: API Gateway can route requests to different
backend services, providing centralized control over traffic
management.
 Rate Limiting: Implement rate limiting via API Gateway to prevent
abuse and ensure consistent service during high traffic periods.

13. Analytics and Data Warehousing

 User Behavior Analytics: Use Amazon Kinesis to stream real-time


data about user behavior and interactions for analysis.
 Business Intelligence: Store aggregated data in Amazon Redshift,
a data warehouse service, for large-scale analytical queries and
business intelligence reporting.
 Data Warehousing: Redshift can be used for storing and analyzing
petabytes of structured and semi-structured data for insights.

14. Event-Driven Architecture

 Message Brokers: Use Amazon SNS or Amazon SQS for message


brokering between different microservices to enable event-driven
architecture.
 Real-Time Notifications: Use SNS to send real-time notifications to
users, such as content recommendations or alerts for subscription
renewals.

15. Disaster Recovery and High Availability

 Failover Systems: Use Amazon Route 53 to configure DNS failover,


ensuring that traffic is redirected to healthy regions in case of a
regional failure.
 Data Backups: Automatically back up databases using AWS Backup
and configure frequent snapshot backups for critical services.
 Geo-Redundancy: Deploy services across multiple AWS regions using
AWS Global Accelerator for improved performance and high
availability in case of regional outages.

You might also like