This is how we built LeetCode in-house

Поділитися
Вставка
  • Опубліковано 7 лют 2025
  • WANT to create a business selling courses and content? Go here: fermion.app
    WANT to learn programming? Go here: codedamn.com

КОМЕНТАРІ • 33

  • @FinalForm-y6h
    @FinalForm-y6h 7 днів тому +3

    missed these videos bro we need more

  • @parshvsheth-rj2vq
    @parshvsheth-rj2vq 7 днів тому +1

    lovin the commitment of daily upload

  • @jayantgupta5310
    @jayantgupta5310 5 днів тому +2

    Hii Mehul,
    Loved to see.
    Could you please tell me how you are calculating exact time and memory used to execute the code.
    I am building the same thing for learning and stucked here....
    I will be really greatful if you help me. Thank you

    • @AshMaker-ey9ty
      @AshMaker-ey9ty 5 днів тому

      it can be easily done , I am pretty sure , because they are using docker containers to run the code , docker stores the metadata about containers , which has all details , and you can reterive it , before killing or removing the container

    • @jayantgupta5310
      @jayantgupta5310 5 днів тому

      @AshMaker-ey9ty yes, I tried but I didn't get precise answer.
      It differs because of system performance.
      I will be grateful if you could help me.
      I have to measure for cpp, Java, python, js.

  • @aniketsaurav1535
    @aniketsaurav1535 5 днів тому +1

    Hi, I have build this exact same thing from scratch. I am following the same architecture.

  • @Tamil_0714
    @Tamil_0714 7 днів тому +2

    I used docker container on backend with child process to run code

    • @shivangrathore
      @shivangrathore 7 днів тому +1

      Yep I am working on a same solution

    • @jayantgupta5310
      @jayantgupta5310 5 днів тому

      How are you measuring time and memory used for executing the code?

  • @gurvirbaraich
    @gurvirbaraich 7 днів тому +1

    Bro, did you forgot to change the description for this video, as I believe the description is related to your evilgnix video.

    • @codedamn
      @codedamn  7 днів тому +1

      Updated, thanks!

  • @raxit6714
    @raxit6714 6 днів тому

    is there any way to add debugger as i m trying to add one?

  • @nishantsethix
    @nishantsethix 7 днів тому +6

    Have you tried using Judge0 for this? What made you create your own runners and not use Judge0?

    • @shivangrathore
      @shivangrathore 7 днів тому

      Learning and exploring, why we want to get away with already implemented solutions?

    • @nishantsethix
      @nishantsethix 7 днів тому +1

      @shivangrathore He is running a business not exploring stuff.

    • @codedamn
      @codedamn  6 днів тому +2

      Our public facing API is 10x cheaper than Judge0. Internally, the margins are even better. Plus this is a core product for us and took like 2 days to build on our existing playgrounds infra

  • @faiz697
    @faiz697 5 днів тому

    so runner = sqs + lambda ? when code is submitted, it is pushed to SQS, which would trigger lambda which would run the code ? or lambda push code to db / S3 and it is picked up by an EC2 which would run the code ?

  • @HSBTechYT
    @HSBTechYT 6 днів тому

    Why no WS for this leet code ?

  • @srinivassai9270
    @srinivassai9270 7 днів тому

    Can you explain how those runner works? How they spin containers.

    • @codedamn
      @codedamn  6 днів тому +2

      Would need a full video

    • @mohammedabbas6404
      @mohammedabbas6404 5 днів тому

      ​@@codedamnlooking forward to that video. Thanks

  • @pradeepbisht3397
    @pradeepbisht3397 7 днів тому +1

    What are u doing for spinning container in worker?

    • @codedamn
      @codedamn  7 днів тому +1

      It’s a normal docker container

  • @sauravkumarsharma6812
    @sauravkumarsharma6812 6 днів тому

    Please create interactive playground video also.

  • @satorugojo7140
    @satorugojo7140 7 днів тому

    Why are you not trying web containers ?

    • @codedamn
      @codedamn  7 днів тому

      It’s not useful for our case

    • @codeiton
      @codeiton 7 днів тому

      @@codedamn Is it possible for you. explain the use case difference why it is not suitable for you

    • @parshvsheth-rj2vq
      @parshvsheth-rj2vq 7 днів тому +1

      web containers can't be used for commercial usage , we need to give commission to stack blitz right?

    • @satorugojo7140
      @satorugojo7140 7 днів тому

      @@parshvsheth-rj2vq yes you are right I research it yesterday and found the same

  • @SHAMS-c2e
    @SHAMS-c2e 7 днів тому +1

    so these runners are kind of k8s worker nodes?

    • @codedamn
      @codedamn  6 днів тому

      No they are physical hosts running docker containers. We orchestrate without k8s

  • @shaileshaanand
    @shaileshaanand 7 днів тому +1

    You will have to add different CPU timeouts for different languages