Introduction:
Google Calendar is a time-management and scheduling calendar service.
Functional Requirements:
- Create a Event on the calendar
- Modify a Event
- Cancel a Event
- Send an invite to all the members in the event.
- Look Up all the meetings in the calendar
Non-Functional Requirements:
- Minimum/Low Latency
- High Availability
- More Reliable – Should not lose any kind of User and Meetings data.
- Eventual Consistency – Trade availability over consistency
Capacity Estimation and Constraints:
- Lets assume the system is designed for 100M users
- Daily Active Users (DAU) 20M users
- On an average an active user will create 2 meetings/day = 2*20M = 40M meetings
- On an average an user will receive 4 meetings/day = 4*20M = 80M meetings
Storage Estimations :
- Users:
- Let’s assume we have current 100M users, by end of an year 200M
- For one user it takes 1000Bytes, For 200M users => 200M*1000B = 2*10^11B =200GB/year (10^9 Bytes = 1GB)
- Invites :
- Let’s assume we have 2 meetings/day = 2*20M*365*2000Bytes = 40M*400*2000B =32*10^12B = 32000GB =32TB/year
Total space = 200GB + 32000GB = 33TB/year
APIs:
- loginAPI(userName, password)
- RegisterAPI(userName, password, UserInfo)
- CreateEvent(EventDetails, <userIds>)
- UpdateEvent(EventId, EventDetails, status)
- Modify
- Delete
- CheckCalendar(UserId)
Architecture: