Design Google Calendar with

  Рет қаралды 42,181

Keerti Purswani

Keerti Purswani

Күн бұрын

A different kind of LLD video this time for you to brainstorm with us! ❤️
𝐂𝐨𝐝𝐞 𝐅𝐫𝐨𝐦 𝐒𝐜𝐫𝐚𝐭𝐜𝐡 𝐡𝐞𝐫𝐞-
/ @codefromscratch-keert...
𝐂𝐨𝐝𝐞𝐭𝐚𝐥 𝐡𝐞𝐫𝐞-
codetal.in/
To have such discussions, cehck out-
mock.interview...
User Coupon Code KEERTI to get 𝐝𝐢𝐬𝐜𝐨𝐮𝐧𝐭 on 𝐈𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰𝐑𝐞𝐚𝐝𝐲-
get.interviewr...
For more such videos, 𝐬𝐮𝐛𝐬𝐜𝐫𝐢𝐛𝐞 here - www.youtube.co...
I am sure no one needs the link, but you can checkout ‪@gkcs‬ 's channel here-
/ gauravsensei
You can also connect with me on-
𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦 (for not so professional, chill side of my life) - www.instagram....
𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 Channel - t.me/keertipur...
𝐓𝐰𝐢𝐭𝐭𝐞𝐫 - Ke...
𝐋𝐢𝐧𝐤𝐞𝐝𝐈𝐧 - / keertipurswani
#interviewexperience #mockcodinginterview #softwareengineer

Пікірлер: 81
@chirag5745
@chirag5745 2 жыл бұрын
What a lovely Sunday afternoon rain cup of tea and 2 brilliant youtubers collaborating to make a very interesting system design video cant get better thank you😍
@KeertiPurswani
@KeertiPurswani 2 жыл бұрын
Hope you have fun ❤️❤️
@lalchandyogi1177
@lalchandyogi1177 2 жыл бұрын
@@KeertiPurswani maam could yout make a coding interview video with aditya verma,He is just great and his way of explanation is just on another level . so Plz plz make a interview video with him.
@JustAnotherAverageEngineer
@JustAnotherAverageEngineer Жыл бұрын
I work in Outlook Calendar team, handling recurrence is a nightmare for us as well xD. Recurrence is handled by recurrence blob which is present in master item/1 item which is a serialized sting which contains things like start date, end date. And all the events can be expanded just by this recurrence blob. If now suppose one ocuurrence is deleted/modified that will have a separate calendar item, attached to master item. This is how it works in outlook today :)
@srshalen23
@srshalen23 7 ай бұрын
would you like to elaborate? @CodeWithSahilBatra
@nileshsinha7869
@nileshsinha7869 2 жыл бұрын
For handling the recurring problem- when we set an event which is recurring keep all the ids of recurring event same as the first one. If user wants to update a particular event, keep a flag asking do you want to change this in all future events or only for this one- if flag get yes then no problem as it has same id it'll update for all else if only for that one then on updating should change the id of that particular event with a new id. By keeping the same id it'll also help in deleting all recurring events at once(we can use a flag on deletion also). This is my first time watching any system design video and it was really fun watching. Now I'll deep dive into system design ❤
@lucygaming9726
@lucygaming9726 9 ай бұрын
How about a recurrece id? Keep it same as the first event.
@pawansinghla2149
@pawansinghla2149 Жыл бұрын
wasted 1 hour here, Interviewer asked me same system design but who will design data flow ?
@vipulsharma1897
@vipulsharma1897 2 ай бұрын
exactly bro, they never seemed to agree on anything
@adityaprakash4218
@adityaprakash4218 2 жыл бұрын
Generating Event ID: You were thinking right that no event, even in frontend, should be there without any id. Gaurav was also right in deciding that it'll be better if the id is generated from backend (incremental keys if SQL). To, combine both - After user inputs the data for new event and clicks create button, we won't show the event created in frontend (maybe show an outline in dimmed color). We only show that created event normally when we get all the details back from the backend. Until then maybe run a loader, the turnaround time should be quick though. Recurring Events: Hmm this seems hard, :-p I'll just keep one object for recurring events and calculate all events within a given period from that only when queried for. This way we can support never ending recurrences. If any of the occurrence of a recurring event changes, we can create a different object altogether for that occurrence. But to keep it connected, it'll have recurrenceID as the eventID of the parent recurrence and normal random/incremental EventId as unique id. Maybe we could keep these in a separate table itself in db. For the parent event, maybe we could keep a flag like hasRecurrences set to true, so that while getting those, we'll calculate all events that need to be sent to backend. We may need to keep another field like originalStartTime in occurance obj. so as to replace the original one calculated with this occurence when calculating all events from recurrence Event. cancelling occurrence - create new event as mentioned and cancel that one changing time/other details - create new event and change details in that getting events - get all events. if any hasRecurrences then find those from recurrences table, replace with calculated instances and return the list. Hopefully we can get everything done with this design, although it might need some case handlings.
@okeyD90232
@okeyD90232 Жыл бұрын
I think a calendar event either can be a normal event or recurring event, we can store recurring event in some other data object or table with start and end data+time, this way once you try to find user events, you can check normal events and recurring event from different sources and plant the details to calendar accordingly. This way you will have more control over calendar events.
@a.nk.r7209
@a.nk.r7209 2 жыл бұрын
Gaurav is so much packed with the knowledge that his body falls behind when he's thanking through things. I've to reach at this level.
@yogini1351
@yogini1351 2 жыл бұрын
Great discussion. I would like to appreciate your efforts. I would love to have a follow up video on this, when we have a room for an event. And how double booking of room will be avoided, how concurrency will be handled in this system
@srndrpec
@srndrpec 2 жыл бұрын
Manager can maintain queue/priority queue and will have only one event which is about to occur, when it's get removed from the queue, it notifies to user and adds next going to occur event back into queue. this way we can avoid maintaining all event duplicates. This even helps in multiple notifications for the same events in case of all day event by pushing back same event into queue and even changing only one of the event occurence with some override flag.
@Electronikguys
@Electronikguys 2 жыл бұрын
Great work Keerti. Really appreciate the effort you are putting on both the channels. Managing work and youtube is itself a great feat and that too doing it regularly while maintaining quality is plainly superb. It's been 8 years in IT and watching your videos has motivated me to try learning about DSA. Have started my DSA journey by learning from your other channel.
@aakashgq
@aakashgq 2 жыл бұрын
I really learn fast when I see things in action rather than reading about them. This video really helped me understand how to approach the problem and how to keep the discussion with the interviewer.
@gowthamrajeevswaroop
@gowthamrajeevswaroop 6 ай бұрын
Thats a great session to learn from. Thank you for putting in effort to teach us.
@aman2497
@aman2497 2 жыл бұрын
For recurrence, maybe one ID to identify the parent/series, and one sub ID to identify each individual instance of the recurring meeting. That helps toggling if you're dealing with the whole series or just one instance
@shivankchopra8552
@shivankchopra8552 2 жыл бұрын
Love the video, love the attitude shown especially by Keerti here! Although "shooting ideas" has it's own place sometimes when quick action is needed, but in most cases, an insightful approach and "stable" thinking is better suited to get to mature decisions. Better not trip over and entangle ourselves into complexities. Many thanks for the video!
@AbhishekGupta-tw2vu
@AbhishekGupta-tw2vu 2 жыл бұрын
I have been searching content for a lot of time on low level design. I just fall in love with your design patterns Playlist and enjoying this 😍 video with my coffee ☕️ and learning a lot.
@AbhishekGupta-tw2vu
@AbhishekGupta-tw2vu 2 жыл бұрын
Thank 😊 you Kirti mam !
@Udaylux
@Udaylux 8 ай бұрын
We could have a UserManager which will have the user deets and the calendar object and the EventManager can then query the calendar object from the UserManager and then get the list of events, which will follow Single responsibility principle as well!
@av21015
@av21015 Жыл бұрын
Its very rare to see Gaurav struggling this much 😄.
@akbar55555shaikh
@akbar55555shaikh 2 жыл бұрын
I have received an offer from Walmart and gojek, Which is good to join in this current situation? Please suggest.
@shivangigulati928
@shivangigulati928 2 жыл бұрын
Thank you keerti and gaurav for a intriguing discussion. Really liked your energy in this.
@algoking
@algoking 2 жыл бұрын
For recurring events we can make a single event and store the criteria for genrating future events event maneger will tale care of generating the event for read apis etc if a single event needs to be updated, we can make the actual event and store it actually in db otherwise for the rest we will relay on manager (basically for the events in which user do any operation we will actually store the event in db otherwise it will just be computed with a cron logic)
@KeertiPurswani
@KeertiPurswani 2 жыл бұрын
Thanks for sharing Shivam. What happens when event manager crashes?
@AnjaneyDwivedi
@AnjaneyDwivedi 2 жыл бұрын
In this LLD i think the timezone is missing.User's from different location will not get specific event on time as per their Timezone
@rishav144
@rishav144 2 жыл бұрын
thanks a lot .....Gaurav explained LLD very well
@sachinpandey007
@sachinpandey007 5 ай бұрын
very informative, thank you
@GayathriNCSekhar
@GayathriNCSekhar 2 жыл бұрын
May I know which tool you guys you have used in this video?
@aastikmandil3516
@aastikmandil3516 Ай бұрын
If recurring events is creating individually with different id then do we really need to store freq and endtime. Just add the group id which tell which all event belongs to same recurrance group, so it would help to cancel all recurrence event
@HailZak
@HailZak 2 жыл бұрын
Enjoyed the video and the discussions very well . It felt like I was brainstorming along with you two . You don't usually find quality LLD videos that much in the internet compared to DSA . Please bring more quality content like this
@trishulcurtis1810
@trishulcurtis1810 Жыл бұрын
Why do you zoom your faces? What does viewer get by seeing your faces. Keep your face videos smaller and enlarge the drawing
@Karan-vq5vg
@Karan-vq5vg 2 жыл бұрын
Love the thought process, simply amazing
@KeertiPurswani
@KeertiPurswani 2 жыл бұрын
Thank you! ❤️😇
@vyshnavramesh9305
@vyshnavramesh9305 Жыл бұрын
Recurring event: - Event class: Add recurringId - Create recurring event: In EventService duplicate the event with same recurringId but different eventId, and store all events into a list - Update recurring event: Add a flag 'isRecurring' for client to choose if all recurring events are to be updated as well. If isRecurring=false, the updated event is still part of recurrence. - Delete recurring event: If flag isRecurrence=true all the events with same recurringId get deleted. Else, only a single event get deleted and is removed from the recurrence.
@bipuljee2996
@bipuljee2996 Жыл бұрын
Enjoyed the video. But you are using hashMap to store data in-memory which is the thing for LLD and then u suddenly talk about databases and indexing. Isn't it contracting?
@matilda3990
@matilda3990 2 жыл бұрын
Didi, did you do pair programming to practice DSA or study alone?
@aniketbhanavase7790
@aniketbhanavase7790 2 жыл бұрын
store the events for short time range like for 1 month or 6 months. Render the future events based on the cron expression only. If user changes the future events like updating description/titles then only create the respective which user has updated. Great content !!😄
@engineerzavlogs3511
@engineerzavlogs3511 2 жыл бұрын
Great Video Mam, I am learning Coding From Masai, Hope You will help me in Future. THank You!!!!!!!!!!!!!!!
@gomzysharma
@gomzysharma 4 ай бұрын
I have one question, why in whole video we tried to focus on creating object for response for example EventId (acting as both response for UI and domain for creating an event) and doing creation operation on that only. Why cant we have two objects like one will be domain and other will be response object out of it once core logic is written. Actually, according to my understanding we should always have two POJOs for different purposes. LMK What you all think?
@ADNANAHMED-eo5xx
@ADNANAHMED-eo5xx 2 жыл бұрын
Thanks a lot for these amazing video.
@lalchandyogi1177
@lalchandyogi1177 2 жыл бұрын
maam there is no video on Aditya Verma Coding Interview and he is great coder so could try to make a video with him , He is just great and his way of explanation is just on another level . so Plz plz make a interview video with him🥺
@sohanlalgupta8996
@sohanlalgupta8996 Жыл бұрын
@KeertiPurswani We'll create a single Event, and when we have to update an event for a particular date (let's say 29/04/2023), we split event in three parts: 1. before 29/04/2023 2. for that date 29/04/2023 3. after 29/04/2023 (which details will be same as (before 29/04/2023). Basically, update the recurring end date as 28/04/2023 in existing event and create 2 new events, one for 29/04/2023 and 2nd for upcoming dates (after 29/04/2023). This way we can save lots of memory and also able to handle the case recurring end date 'NEVER'.
@sarvarthmonga5764
@sarvarthmonga5764 2 жыл бұрын
Liked now only, becuase i love your pairing. Thanks both
@KeertiPurswani
@KeertiPurswani 2 жыл бұрын
Thank you so much! Hope you love the video! ❤️😇
@AdityaRaj-bo9qe
@AdityaRaj-bo9qe 7 ай бұрын
this is gold content.
@ngneerin
@ngneerin 2 жыл бұрын
You can have single record for recurring event with a field 'except' where you store list of cancelled time
@abolikhare2463
@abolikhare2463 2 жыл бұрын
1.2.2 keeping guests optional or compulsory as a sub point
@LokeshKumar-mp4yl
@LokeshKumar-mp4yl 2 жыл бұрын
@Keerti Purswani @Gaurav Sen , Please check RFC5545 recurrence rule standard to create recurring event
@jonu.1504
@jonu.1504 Жыл бұрын
Calendaring in real system is totally different. They uses iCal format for storing events.
@anshulgoyal7570
@anshulgoyal7570 2 жыл бұрын
I have a doubt, you mentioned we will store metadata or link metadata in treeset, if we will store metadata then we have to do update that's fine but how all will be pointing to the same metadata object? will we be having a different map which will store some id with metadata and we will then store that id in our treeset? Maybe I understood it wrong, please clarify what exactly is the meaning of that each entry will point to same metadata object?
@firstvlog253
@firstvlog253 2 жыл бұрын
Hii mam I hope you are doing well . I have a question .can I join scaler academy after completing 12th . your answer is yes then tell me what is duration and course fee 🙏🙏🙏🙏🙏🙏
@nishchay_sk
@nishchay_sk 2 жыл бұрын
Good explanation.. I have one doubt here when u say having userid in a map, is it like when server starts reading all user details from db with event metadata and keeping it in memory?
@swastikjain7373
@swastikjain7373 2 жыл бұрын
CRED asked me the same question in the last hiring held through codechef contest. Sadly I was unable to crack as it was literally hard that time :/..
@MDARJUN-ej5xg
@MDARJUN-ej5xg 2 жыл бұрын
Can U Do A Video on the Maths we require to understand DSA
@hardeeksharma
@hardeeksharma 2 жыл бұрын
@keerti I could also feel the conflicts in gaurav's mind, thinking too fast, happens with me also. Lastly I have gained a lot of respect for google/Teams calender and meeting feature.
@hanmadragoniod4445
@hanmadragoniod4445 2 жыл бұрын
I rewind and see ,the way you say hai guys ,it's so cute 💖💖💖😂
@ayushshah7372
@ayushshah7372 2 жыл бұрын
wrt recurrence relations between events, how about we store only the first event that the user creates as a recurrence event, take in the rec_freq and num_of_rec_events; based on these facts we will create the future events(Note: we won't store them as seperate events, some client side processing is involved but thats okay). Also when the user wants to change an event which is a part of recurring event; if the user wants to change just this one event, then we just create a new event, otherwise if the user wants to update all the events following this event, then we only have to update the one event we has stored.
@neha6000
@neha6000 2 жыл бұрын
Hii could you please tell me how can we apply in attlasian company
@swatigoel1909
@swatigoel1909 Жыл бұрын
very useful content
@krzheph7373
@krzheph7373 2 жыл бұрын
I love how a process that is intrinsically a hard slog is made so enthralling. I was literally on the edge of my seat following along the merging of minds in this colab. So glad I came across this vid. Something to sink my teeth into - "all animals have teeth - but do they all chew ?" I never knew design was such an engaging and entertaining process! Its left me chained to polling this channel Def recurring.event(vid=True):
@KeertiPurswani
@KeertiPurswani 2 жыл бұрын
Yaaaaaay! Such a nice comment 🥺🥺🥺🥺
@harshitgarg6096
@harshitgarg6096 2 жыл бұрын
First comment on any video. But can't control. @Keerti, i didn't get why said we should have ids generated on the frontend. IMO, Ids generated on the frontend sounds like a bad idea to me. Less control on the client is much better. When you call booKEvent api. You are making a POST request. Backend should generate it and persist it. For POST Request we use "Location" header. In the response, client should get Location Header which has read url (GET request) of this event. Why bother about id in the response. This location url might be (event/{id}) or anything.
@FootballWithRohan
@FootballWithRohan 2 жыл бұрын
where is the coding video ?
@AMI_1111
@AMI_1111 2 жыл бұрын
I am from commerce background and i want to switch my career to data analytics where should i start my journey pleaseeee guideeeee meww
@rupeshjha4717
@rupeshjha4717 Жыл бұрын
Was watching this for how the conflict will be handled, but not covered in video :( It's simple CRUD handled
@TheArpitkoberoi
@TheArpitkoberoi 2 жыл бұрын
Great video Keerti. Here's my approach. EventDetails could be a child to Event and whenever you change a particular occurence of a recurring event, you create a new EventDetails object as a part of mutating an Event object. If you want to update all future occurences, you create a new EventDetails object and bulk update all Events to have this new EventDetails child object instead of editing the original because that would mutate past events as well. This also solves the "Event object without id" problem on the client side, you could send EventDetails object or a new object EventRequest. Also, the events could be lazy-evaluated(created) by creating first N out of total E events, marking some Xth last event from the last Nth event(N-X) with a flag attribute, then use this attribute to trigger creation of the next N events on EVENT_END event(topic event, not Event) until all E events have been created, it would also work for never ending events. State for recurring events, requests rather, can be persisted using RecurringEventRequest object. Did I miss something? I probably did :P
@karthikmulgundmath6566
@karthikmulgundmath6566 2 жыл бұрын
Please record on a higher quality.
@saikatdas6830
@saikatdas6830 2 жыл бұрын
Never thought I would binge watch system design videos😂 truly great content🔥
@ganeshtiwari2550
@ganeshtiwari2550 2 жыл бұрын
Hello need a advice Hello just need advice from you.. Hello ...i m 28 from commerce background wanna do full stack devloper but like tech person theyvhave to start from ground i m from non tech i hv to start from underground level..can u suggest should i do basic fundamental of computer application networks basic database, excel ,adobe photoshop canva illustrator like basic of operating system what u suggest or i should start from basic undertstanding of operating ssystem computer application computer network databasesp before entrying in full stack developer course Or should direct start from HTML CSS JAVA SCRIPT
@MJ-zs5jv
@MJ-zs5jv 2 жыл бұрын
DIDI PLEASE HELP ME I'm getting METALLURGY at MNIT JAIPUR and CSE at some other tier 3 colleges basically state government universities and in some iiit but are very costly. Now I'm worried what to do as I want to work like you as a SDE. Please help me out.🙏
@adithyabhat4770
@adithyabhat4770 Жыл бұрын
WHy are you looking down in this video?
@kushangowda
@kushangowda Жыл бұрын
Great content but my thoughts. Two experts took more than one hour barley covering the system. Imagine handling this alone in under 45 minutes. Take away: If you have not prepared well and practiced similar design in your past, then you are screwed :/
@sirfaapkagolu5915
@sirfaapkagolu5915 2 жыл бұрын
I can say only one word, you look awesome.
@sayanroy9161
@sayanroy9161 2 жыл бұрын
Too much discussion with recurring event
@l_i_t_108
@l_i_t_108 Жыл бұрын
the guy looks unprepared, girl is so calm, probably frustrated too(with the guy)
@sanukumarjha
@sanukumarjha 2 жыл бұрын
If you guys have that much good brain why don't you prepare for gate
@domrisk3572
@domrisk3572 2 жыл бұрын
🙏 ρ尺oΜ𝐎ᔕᗰ
System Design of ChatGPT | Mock interview @gkcs
26:16
sudoCODE
Рет қаралды 24 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Low Level Design of Elevator with @gkcs - Mock System Design Interview
51:21
YouTube High Level System Design with @harkirat1 !!
35:02
Keerti Purswani
Рет қаралды 116 М.
Google system design interview: Design Spotify (with ex-Google EM)
42:13
IGotAnOffer: Engineering
Рет қаралды 1,2 МЛН
Mock Low Level System Design Interview with Qualcomm Sr. Engineer - Design Meeting Scheduler
37:23
[Front-End System Design] - Google Calendar
59:24
Front-End Engineer
Рет қаралды 27 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН