andreyka26_se
609 subscribers
577 photos
66 videos
6 files
290 links
Hey, I'm software engineer at Microsoft, with 7 years of experience. Here we are talking about F(M)AANG big tech interviews: leetcode, system design and corpo life.

YouTube: @andreyka26_se
Instagram: andreyka26_se
TikTok: @andreyka26__
Download Telegram
andreyka26_se
Amazon has bipolar disorder. Yesterday's evening I got an email
btw, even if you are not looking for job - it is always a good idea to interview, at least it works like that for me. Some challenge, some confirmation of your skills, etc. Never rejected single opportunity even if not looking for something new
8👍1
So, lets do stream on Saturday this time. Again, it is going to be stream about DP, how to do top down and convert to bottom up + memory optimization.

Also we are going to implement sharding of all popular storages: Redis, dynamo, cassandra, etc
🔥91
Solutions
🔥4
Do you remember we were talking about Messenger or Presence Service System design?
There was a problem: how to keep hundreds of millions clients on websockets? I loooked up some stuff, and this is basically the solution (high level) that works in production.

We basically do not need any web socket server manager. WebSocket node itself will manage the state in Redis. That is it.
🔥5
Websocket server and client ping each other. If connection is getting timed out - client will initiate reconnect which will override the data about itself in Redis.
2
Do you remember distributed lock system design pattern? Basically one of the most famous algos is RedLock - implementation based on Redis (you do atomic set with TTL claiming the lock and the atomically removing the record).

So, this solution actually has a lot of critic, and one of the critics is done by Martin Kleppmann (this guy who wrote Designing data intensive applications)

https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html
2
So, the guy who created RedLock algo made A DISS ON MARTIN.

THIS IS SO FUNNY AND EPIC IN A SENSE

DISTRIBUTED BATTLE
I didn't find Martin's analysis on Salvatore's analysis on Martin's analysis on Salvatore's RedLock (((
TL; DR
RedLock (Redis based lock using SET NX + TTL) might not be that accurate and correct.

If you plan to use it for some critical functionality - stick to proper concensus (raft, paxos)
4
Solution is pretty easy, so go and collect your coins
👍4
Today we are streaming, +- 20:00 Prague time.
Topics: 2dimensional DP + Redis Sharding implementation on hashslots
🔥3
We are doing LeetRooms with friends. This is semi competitive thing, when we select 4 problems and solve with leaderboard, etc

Let's also check the problems during stream really quickly they are not some bullshit, but pretty simple and cover couple of basic leetcode patterns to revise
1👍1