Design Google Calendar with

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

ความคิดเห็น • 81

  • @chirag5745
    @chirag5745 2 ปีที่แล้ว +45

    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 ปีที่แล้ว +4

      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.

  • @CodeWithSahilBatra
    @CodeWithSahilBatra 11 หลายเดือนก่อน +8

    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 4 หลายเดือนก่อน

      would you like to elaborate? @CodeWithSahilBatra

  • @adityaprakash4218
    @adityaprakash4218 2 ปีที่แล้ว +5

    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.

  • @nileshsinha7869
    @nileshsinha7869 2 ปีที่แล้ว +1

    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 6 หลายเดือนก่อน

      How about a recurrece id? Keep it same as the first event.

  • @pawansinghla2149
    @pawansinghla2149 ปีที่แล้ว +11

    wasted 1 hour here, Interviewer asked me same system design but who will design data flow ?

    • @vipulsharma1897
      @vipulsharma1897 วันที่ผ่านมา +1

      exactly bro, they never seemed to agree on anything

  • @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.

  • @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.

  • @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

  • @akbar55555shaikh
    @akbar55555shaikh 2 ปีที่แล้ว +1

    I have received an offer from Walmart and gojek, Which is good to join in this current situation? Please suggest.

  • @aman2497
    @aman2497 2 ปีที่แล้ว +3

    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

  • @a.nk.r7209
    @a.nk.r7209 2 ปีที่แล้ว +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.

  • @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.

  • @AnjaneyDwivedi
    @AnjaneyDwivedi 2 ปีที่แล้ว +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

  • @matilda3990
    @matilda3990 2 ปีที่แล้ว +1

    Didi, did you do pair programming to practice DSA or study alone?

  • @saikatdas6830
    @saikatdas6830 2 ปีที่แล้ว +1

    Never thought I would binge watch system design videos😂 truly great content🔥

  • @TheArpitkoberoi
    @TheArpitkoberoi 2 ปีที่แล้ว +1

    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

  • @Udaylux
    @Udaylux 5 หลายเดือนก่อน

    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!

  • @gowthamrajeevswaroop
    @gowthamrajeevswaroop 4 หลายเดือนก่อน

    Thats a great session to learn from. Thank you for putting in effort to teach us.

  • @Electronikguys
    @Electronikguys 2 ปีที่แล้ว +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.

  • @shivankchopra8552
    @shivankchopra8552 2 ปีที่แล้ว +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!

  • @gomzysharma
    @gomzysharma 2 หลายเดือนก่อน

    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?

  • @krzheph7373
    @krzheph7373 2 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      Yaaaaaay! Such a nice comment 🥺🥺🥺🥺

  • @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?

  • @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.

  • @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.

  • @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?

  • @GayathriNCSekhar
    @GayathriNCSekhar 2 ปีที่แล้ว

    May I know which tool you guys you have used in this video?

  • @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'.

  • @engineerzavlogs3511
    @engineerzavlogs3511 2 ปีที่แล้ว

    Great Video Mam,
    I am learning Coding From Masai,
    Hope You will help me in Future.
    THank You!!!!!!!!!!!!!!!

  • @nivethaganesh7362
    @nivethaganesh7362 ปีที่แล้ว

    Please provide time frame for the video would be more useful

  • @anshulgoyal7570
    @anshulgoyal7570 ปีที่แล้ว

    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?

  • @lalchandyogi1177
    @lalchandyogi1177 2 ปีที่แล้ว +1

    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🥺

  • @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?

  • @rishav144
    @rishav144 2 ปีที่แล้ว

    thanks a lot .....Gaurav explained LLD very well

  • @AdityaRaj-bo9qe
    @AdityaRaj-bo9qe 5 หลายเดือนก่อน

    this is gold content.

  • @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.

  • @sachinpandey007
    @sachinpandey007 3 หลายเดือนก่อน

    very informative, thank you

  • @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.

  • @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

  • @av21015
    @av21015 ปีที่แล้ว

    Its very rare to see Gaurav struggling this much 😄.

  • @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 🙏🙏🙏🙏🙏🙏

  • @shivangigulati928
    @shivangigulati928 2 ปีที่แล้ว

    Thank you keerti and gaurav for a intriguing discussion. Really liked your energy in this.

  • @FootballWithRohan
    @FootballWithRohan ปีที่แล้ว

    where is the coding video ?

  • @abolikhare2463
    @abolikhare2463 2 ปีที่แล้ว

    1.2.2 keeping guests optional or compulsory as a sub point

  • @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 !!😄

  • @trishulcurtis1810
    @trishulcurtis1810 11 หลายเดือนก่อน +2

    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 ปีที่แล้ว +1

    Love the thought process, simply amazing

  • @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

  • @neha6000
    @neha6000 2 ปีที่แล้ว

    Hii could you please tell me how can we apply in attlasian company

  • @ngneerin
    @ngneerin 2 ปีที่แล้ว

    You can have single record for recurring event with a field 'except' where you store list of cancelled time

  • @LokeshKumar-mp4yl
    @LokeshKumar-mp4yl 2 ปีที่แล้ว +1

    @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.

  • @swastikjain7373
    @swastikjain7373 2 ปีที่แล้ว +1

    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 :/..

  • @ADNANAHMED-eo5xx
    @ADNANAHMED-eo5xx 2 ปีที่แล้ว

    Thanks a lot for these amazing video.

  • @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! ❤️😇

  • @MDARJUN-ej5xg
    @MDARJUN-ej5xg 2 ปีที่แล้ว

    Can U Do A Video on the Maths we require to understand DSA

  • @hanmadragoniod4445
    @hanmadragoniod4445 2 ปีที่แล้ว

    I rewind and see ,the way you say hai guys ,it's so cute 💖💖💖😂

  • @karthikmulgundmath6566
    @karthikmulgundmath6566 2 ปีที่แล้ว

    Please record on a higher quality.

  • @swatigoel1909
    @swatigoel1909 ปีที่แล้ว

    very useful content

  • @rupeshjha4717
    @rupeshjha4717 ปีที่แล้ว

    Was watching this for how the conflict will be handled, but not covered in video :(
    It's simple CRUD handled

  • @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.

  • @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

  • @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.🙏

  • @l_i_t_108
    @l_i_t_108 10 หลายเดือนก่อน

    the guy looks unprepared, girl is so calm, probably frustrated too(with the guy)

  • @adithyabhat4770
    @adithyabhat4770 11 หลายเดือนก่อน

    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

  • @sanukumarjha
    @sanukumarjha 2 ปีที่แล้ว

    If you guys have that much good brain why don't you prepare for gate

  • @domrisk3572
    @domrisk3572 2 ปีที่แล้ว

    🙏 ρ尺oΜ𝐎ᔕᗰ