How I built a mini version of Redis: Concurrency, TCP and snapshot persistence explained!

Поделиться
HTML-код
  • Опубликовано: 8 фев 2025
  • Golang implementation source code github.com/ant...
    Mysql as redis vs redis article dkomanov.mediu...
    [Table of contents]
    00:00 Intro
    00:15 What is a redis application
    01:00 Interacting with redis with redis-cli and python library
    03:37 Other redis traits
    04:05 Why store data in memory?
    14:20 The TCP protocol
    23:50 RESP - Redis Protocol
    43:20 Why cache as an standalone application?
    17:05 Saving snapshots
    50:10 Code review of my redis implementation
    01:06:27 Testing my implementation of redis
    01:08:10 Benchmark redis x my implementation
    01:10:43 Conclusion

Комментарии • 23

  • @VinoInni
    @VinoInni День назад

    Sounds delicious to watch later

  • @LeoAntunesTekk
    @LeoAntunesTekk  7 дней назад +2

    [Table of contents]
    00:00 Intro
    00:15 What is a redis application
    01:00 Interacting with redis with redis-cli and python library
    03:37 Other redis traits
    04:05 Why store data in memory?
    14:20 The TCP protocol
    23:50 RESP - Redis Protocol
    43:20 Why cache as an standalone application?
    17:05 Saving snapshots
    50:10 Code review of my redis implementation
    01:06:27 Testing my implementation of redis
    01:08:10 Benchmark redis x my implementation
    01:10:43 Conclusion

    • @BlackBirdOverflow
      @BlackBirdOverflow 6 дней назад

      Pin this 📌📌📌

    • @LeoAntunesTekk
      @LeoAntunesTekk  5 дней назад +1

      @@BlackBirdOverflow I can't because my youtube account is not verified, yet. But, I'm working on it. Thanks for the feedback.

    • @BlackBirdOverflow
      @BlackBirdOverflow 4 дня назад

      @ Ohh, great video anyway

  • @glbarros
    @glbarros 9 дней назад

    Most unique and embassy content about redis in youtube

  • @Coder.tahsin
    @Coder.tahsin 6 дней назад +1

    Amazing thing

  • @sourceofgood9380
    @sourceofgood9380 3 дня назад

    Hello Leo! (think you are also brazillian, am I right? ótimo video parça) this video is being very useful, and I would like to share some things about my experience building a redis copy in go, inspired by your video:
    The first and most important thing: The number at the beggining of the sequence of data types in the protocol is a solution to remove the necessity to build a Lexer, that would thake some processing time to transform the values passed to each command, and shrink it to the minimum. How is this possible? Well, in a common lexer, the usual process is to build tokens, and if those tokens are already processed by the client, by pre-processing the length of each element and then building the message for the protocol, this would remove the time that the service would have to take to just interpret the input.
    The second: I infact didnt do this lol, and got into a time compelxity different from the minimum taken by Redis servers.

  • @allyssonlp
    @allyssonlp 8 дней назад

    Brabo

  • @onesprayonekill2707
    @onesprayonekill2707 8 дней назад +2

    ive noticed a lot more coders (actual coders who have some deep knowledge) start their youtube channel. Has anyone else also noticed the same ?

    • @LeoAntunesTekk
      @LeoAntunesTekk  7 дней назад

      We are leaving the caves the and basements one spray 😅
      Start your channel as well. Is fun and helps a lot learning more stuff!

  • @danielkaczmarczyk2482
    @danielkaczmarczyk2482 8 дней назад

    awesome stuff

  • @yusifvtelman
    @yusifvtelman 6 дней назад +1

    Great video, Leo. What do you plan on doing for the next video?

    • @LeoAntunesTekk
      @LeoAntunesTekk  4 дня назад +1

      Thanks! Next video I will react a postgres performance issue article, the video should be release in a few minutes, check it out!

    • @LeoAntunesTekk
      @LeoAntunesTekk  4 дня назад +1

      In the meantime, I'm preparing more hammers like this one, but, those types of videos require some time to prepare. The next one of this type, will be about load balancers

    • @yusifvtelman
      @yusifvtelman 3 дня назад

      ​@@LeoAntunesTekkQuality needs time. Do your best job. Btw it sounds interesting. I am already using nginx as a load balancer.

  • @ordinarygg
    @ordinarygg 8 дней назад

    Test against PostgreSQL, read, writes, curious if it's faster

    • @LeoAntunesTekk
      @LeoAntunesTekk  7 дней назад +1

      Thanks for the feedback ordinarygg. What exactly would you like to test against to? The redis-server x postgres, similar to the benchmark article that I've reacted in the video?

    • @ordinarygg
      @ordinarygg 7 дней назад

      @@LeoAntunesTekk The idea is that PostgreSQL actually using OS pages cache for queries, so if you do basic SELECT key, value ... it will use memory as well. If tuned correctly can easily get 500k/sec reads and support shared locks as well. Not saying it should be faster, but it's interesting to compare. I'm thinking to benchmark it

    • @LeoAntunesTekk
      @LeoAntunesTekk  7 дней назад +1

      Got it, awesome idea. If you benchmark it, let me know.