Okkay here is the code for this ... it was not something to opensource to be very honest ... claude can one shot something like this
https://t.co/lfjHmpX39n
Fun fact: When you fire a transaction in a database, you expect isolation and atomicity. But Redis has a minimalist take on transactions. It does not use complex locks or MVCC - it leverages its single-threaded nature to keep things incredibly simple yet highly effective.
Today, we dive into how Redis handles transaction queuing, state isolation, and block execution using the sequential nature of event loops.
This is the 20th video in the Redis Internals series.
In the video, I talk about the mechanics of `MULTI`, `EXEC`, and `DISCARD`, how native database processes maintain connection-specific command queues, and the deliberate design choice of why Redis does not support rolling back a transaction mid-execution.
Also, we re-implement this exact transaction engine and array serialization routine from scratch in Go. By the way, 20 videos are now live:
1. Why Single-Threaded Redis Is Fast
2. Writing a TCP Echo Server
3. Wire Protocols
4. Implementing RESP
5. Implementing PING
6. Understanding Event Loops
7. Implementing Event Loops
8. Implementing GET, SET, and TTL
9. Implementing DEL, EXPIRE, and Cleanup
10. Evictions and Implementing first-eviction
11. Implementing Command Pipelining
12. Implementing AOF Persistence
13. Objects, Encodings, and Implementing INCR
14. Implementing INFO and allkeys-random Eviction
15. The Approximated LRU Algorithm
16. Implementing the Approx LRU Algorithm
17. How Redis Caps Its Memory Usage
18. How and Why Redis Overrides Malloc
19. Graceful Shutdown using Signal Handling
20. Redis Transactions Internals
Hope this helps you better understand database internals and spark that engineering curiosity.
Give it a watch.
layout shifts are one of my biggest pet peeves
great video by james on how to inspect them and actually see what’s happening
also, this is such a good agent workflow. have a subagent (gemini flash works great here) take the video, ffmpeg it into frames, look through the images, and tell the main agent exactly what's happening so it can fix it
Morning everyone
I love this book and also really like their analogy of programming to woodworking. Traditionally carpenters would make their own tools. A telltale sign of an experienced carpenter would have been their toolbox it would contain specialized tools the carpenter built themselves and perfected over time. With programming we mostly use tools built by others. Same prolly with carpentry nowadays (nobody makes their own screwdrivers anymore, for eg). Still Hunt and Thomas argue if you follow the DRY principle you'll wanna create scripts for any workflow that is either repetitive or which may require a user to research again how to achieve it. Once on this path, some of these scripts/programs you wrote for the tasks survive into the next project and may make it into your longer term toolbox. I'm not a woodworker, but it's a picture that motivates me.
I had my interview at a Media startup from Seoul as a Backend Engineer
This was asked from me to build during the interview call and not to use any AI code editor .. I had to rely on docs and other people's code from stack overflow
Its a replica of multi gigabyte video upload component from their core infra which I had to build and explain ...
> has a grpc api for chunked exports
> using redis to track the chunk assembly state like which chunks are received and expiration of chinks
> and a simple html client to show the pause and resume of chunks for uploading
Built with go, grpc, postgresql and redis
Order of the Sinking Star is now listed on Nintendo's site. I am told you could wishlist the game here for Switch 2 if you are so inclined!
https://t.co/VzuAihZgbJ
Fun fact: Redis, or any database. does not just stop when you hit `Ctrl+C` or when the OS decides to shut down. Databases need to handle termination with extreme care.
This happens by trapping operating system signals like `SIGINT` and `SIGTERM` to ensure that active client commands finish executing and a final snapshot is safely persisted to disk before it says goodbye.
Today, we dive into the source code of Redis to look at how production-grade databases implement graceful shutdown using signal handling.
This is the 19th video in the Redis Internals series. Like always, we keep our focus on execution and not just theory, looking closely at how an open-source database coordinates with the operating system kernel to maintain data integrity and data consistency during its final moments.
In the video, I talk about standard POSIX signals (`SIGINT`, `SIGTERM`, and even edge-case signals like `SIGSEGV`), how native processes trap these interrupts, and the critical problem of preventing abrupt connection termination
We also dive directly into the Redis source code to see where it registers its signal handlers, and then we re-implement this exact graceful termination routine from scratch in Go.
By the way, 19 videos are now live:
1. Why Single-Threaded Redis Is Fast
2. Writing a TCP Echo Server
3. Wire Protocols
4. Implementing RESP
5. Implementing PING
6. Understanding Event Loops
7. Implementing Event Loops
8. Implementing GET, SET, and TTL
9. Implementing DEL, EXPIRE, and Cleanup
10. Evictions and Implementing first-eviction
11. Implementing Command Pipelining
12. Implementing AOF Persistence
13. Objects, Encodings, and Implementing INCR
14. Implementing INFO and allkeys-random Eviction
15. The Approximated LRU Algorithm
16. Implementing the Approx LRU Algorithm
17. How Redis Caps Its Memory Usage
18. How and Why Redis Overrides Malloc
19. Graceful Shutdown using Signal Handling
Hope this helps you better understand database internals and spark that engineering curiosity.
Give it a watch.
not sure yet if we're going to release it - but we have an experimental `deno desktop` subcommand that is essentially electron for deno.
the `deno compile` infrastructure helps a lot for this.
would you use it?
screenshots of a matrix app built with it
All types of databases, Redis, Postgres, Clickhouse, Mysql etc. now display important stats and metrics aswell as most run queries in the Maple service map
I hear more and more people worry that AI agents are getting closer to the level of human engineers.
I’m more worried that more and more human engineers are getting closer to the level of AI agents.
One of the main reasons big companies die is because the political processes, that were put in place to enable a bunch of people to work together, become a factory of reasons why they can’t do anything good, and have to do things that are lame. The company evolves into a thing that preemptively shoots down its future prosperity.
Very few AI products have true product market fit
If you look at your usage or talk to your friends, you'll see that there are only a couple of AI products actually being used
It's confusing because you see all these crazy revenue numbers and rounds that are being raised and you assume that these products must be blowing up
This is happening because we are in a very unusual period where consumers and businesses are very motivated to try anything AI related, and that includes enterprises signing contracts for them
But people are just trying these products out, if these don't stick then their users and customers will just churn
It's also hard to stay relevant when you are still trying to find product market fit, there's so much noise and an onslaught of new companies entering your space
You can see companies struggling to deal with this, they are under constant pressure to launch new features or products
Which unfortunately just makes the problem worse because you are likely to ship more slop just to keep up with the market, compounding the problem of a lack of product market fit