Daily Update: 3rd May 2023

Okay, I think I should just accept this, while at work, it will be very hard for me to go and actually code something. And it makes sense, honestly at this stage - I feel like giving 50% of the time to reading + thinking, and 20% to implementing + 30% on iterating and feedback. So you’ll see more links about reading etc. over here. Design a basic search engine (Google or Bing) | System Design Interview Prep Design a Payment System - System Design Interview That would be it, to be honest - not a lot. I’ve started reading through fasterthanlime’s videos on Silly Fast Fresh Deploys, I’ll share progress on it soon once I’ve some learnings. ...

May 3, 2023 · 1 min · Kushashwa Ravi Shrimali

Daily Update: 2nd May 2023

Today was more like a reading/learning day. Here are the things I’ve been watching: Which Database Model to choose?: Why this? Going to be useful for the project I’ve been working on. Thinking on directions of storing in-memory, using key-value model but let’s see. I made every sentry page 300 ms faster (intermediate) anthony explains #540 Why this? Always enjoy watching Anthony. Came on my YT recommendation, thought I’ll watch. Looks like a CDN config fix, also learnt a few things on watching the type of network calls (cached or not) from this video. How does async rust work Still reading, not done yet. Will update my learnings when done. Update NeoVim Config to use ruff-lsp instead of pyright for most except hover Ruff has been there for long, boasts a lot of perf improvements as a linter. Good to see Ruff LSP growing. NeoVim config repository: https://github.com/krshrimali/nvim It’s of course going to take a lot of efforts to catch up to pyright in terms of capabilities, but I’m very positive. I love to see code actions finally in my neovim + python code. 🎉 It’s written in Rust, for those who don’t know 😉 TODOs: ...

May 2, 2023 · 2 min · Kushashwa Ravi Shrimali

Daily Update: 1st May 2023

Interesting day, lots of design stuff for the project we’ve been working on. Designing flow for the word combinator service This is actually tricky, as we are figuring out how we’ll figure out the keystrokes into words/phrases (I’d like to call them entities at one point of time). The algorithm is close, and I’m particularly hopeful about it: It considers some edge cases of mouse events, sitting idle, and gives user the control what they would like to choose. More on this very soon! Boring nerdy stuff: Exploring fzf I wanted to have fzf previews height changed to 100%, finally changed my zsh config for that. It looks much better now. Then figured out that I’m using outdated formula for fzf, and I’ll end up going through fzf release notes to see what has changed over the last few releases. It’s usually a good practice I believe to go through the release notes, and be aware of the tools you use. Work day tomorrow, so doing some early readings. Of course can’t share details, but yep, going to be more occupied now. A lot of TODOs from yesterday day before yesterday are left 🥺, I’ll move them to tomorrow, yay! Procrastination, let’s go 😆🎉 ...

May 1, 2023 · 2 min · Kushashwa Ravi Shrimali

Daily Update: 30th April 2023

Lovely day, had my friend imsrbh come over and we were talking about the project I wanted to do. He had some ideas and of course some experience with Kafka, so he helped me setup Kafka and docker on my machine, and that’s how it all started. Setting up Kafka and Docker on my machine: Refer to this blog for Kafka setup. We verified by running a sample producer-consumer app in Python and it worked. Starting to implement the core logic of getting key strokes in Rust I’m using rdev library for this, it was decent. Was wondering how I can convert the keystrokes to strings, apparently it was a Rust Enum. Fortunately, they had a feature serialize which would help me do just that. Now it’s quite smooth. Implementing Kafka Producer-Consumer in Rust Kafka has a client in Rust, cargo add kafka will help. Wrote Kafka Producer and Consumer referring to their official documentation. It works flawlessly. We were sending the keys as &[u8] and had to convert these to strings back at consumer (need to proper error checking there) Producer repo: https://github.com/krshrimali/keystroke-store-rs Consumer repo: https://github.com/krshrimali/keystroke-consumer-rs Quick learning on why we didn’t go for Redis (mostly because we wanted to learn Kafka in Rust lol, can try Redis one day but I like reliability of Kafka): https://stackoverflow.com/a/37993809 A lot of TODOs from yesterday are left, I’ll move them to tomorrow, yay! Procrastination, let’s go 😆🎉 ...

April 30, 2023 · 2 min · Kushashwa Ravi Shrimali

Daily Update: 29th April 2023

Alright, we are back. It’s Saturday, so I spent a lot of time cleaning up my flat and my setup. Bengaluru is quite a dusty city, so yep, gotta clean regularly. Anyways, in terms of learning, my goals of today were to read some source code and papers/official documentation. It’s been some time since I didn’t do any Rust, so today I’ll just touch upon that as well. Rust - building a UI to plot a sensor in real time Why this? I’ve used Iced library quite a bit so far, so wanted to understand how other UI libraries look like. I’m not going for the “famous” libraries here, just wanted to experience any other library. Plus, this video seemed to be decent and technically focused enough on the implementation. Setting up PostgreSQL server on my system: Why this? For me to start working on some projects of my own, it’s important to setup stage for them. Notes: I used this blog by digital ocean as reference. Micro Project: Store all the key presses in a server Notes: Since I type a lot, everyone does, the DB will have to be good enough. I wanted to see how I can enable indexing and searching, this will help give me an idea. No UI stuff right now. Maybe one day. NeoVim Config: I was randomly trying a keymap, and I just remembered I had <leader>nf for SnipRun. And oh, wow - it finally made sense why it could be useful. Selecting text, code block, displaying output in the command window or as virtual text (different highlight for errors) and even in a vertical split terminal, amazing stuff! Something my nvim-autorunner was trying to do, cool stuff. Oh, and on another note: I watched a movie (after a long long time). Had to find time to relax a bit. ...

April 29, 2023 · 2 min · Kushashwa Ravi Shrimali

Daily Update: 28th April 2023

Started my day with talking to my family, and then kicking off work after getting ready. (Note: these blogs are mostly around my personal learning updates, so I’ll mostly miss anything that I do at work as that’s confidential) What is OSI Model | Real World Examples Why this? The answer to: “How does the communication work from client to server” is very important in backend. I wanted to see if I missed anything from my graduate studies, but nothing much. This was more like a refresher. Notes: Each operating system has their own implementation of TCP protocol. Linux has it’s own for example, and it’s open sourced. Can take a look at TCP’s source code in Linux source code to understand how checksum correction works. Cloud load balancers: L4 Load Balancer (operates at TCP Level), L7 Load Balnacer (operates at Application Protocol Layer - HTTP/HTTPS) Postgres: Architectural Fundamentals Why this? Going through database design and architectural fundamentals is helpful. I plan to explore CockroachDB soon, but wanted to get some idea about the ones I’ve used so far (Postgres for example) Notes: Uses client/server model. PostgreSQL session consists following processes: Server: manages DB files, accepts connections to the DB from client apps, performs DB actions on behalf of clients. DB server process is called postgres Client (frontend): app that wants to perform DB operations. Client/server could be on diff hosts: communicate over TCP/IP n/w connection postgres can handle multiple connections from clients: Forks a new process for each connection The new process and client directly communicate No intervention of postgres server Supervisor server process is always running (daemon process), waiting for client connections Client and child server process can come and go PostgreSQL System Architecture Why this? Just wanted to explore another blog on the same topic to see if I missed anything. Tbh, nothing much. Notes: PostgreSQL: process-per-transaction model postgres server process: Managed by postmaster, central coordinating process Responsibilities: Initializing, terminating the server Handling connection requests from the new clients Recovery Run background processes Shared Memory: Reserved for DB caching and Transactional Log Caching Shared Disk Buffer Shared Tables Uses same set of tables to host multiple client data (TODO: how?) Backend Processes: Client interacts with backend processes (submits queries and receiving queries result) Multiple backend servers executing queries concurrently Each backend server: will handle only a single query at a time access data from main memory buffer pool (placed in shared memory) Thank you! :) See y’all in the next blog. ...

April 28, 2023 · 2 min · Kushashwa Ravi Shrimali

I started building an app using Rust and here is how it went...

Hi everyone!! I’ve an update, on what I’ve been up to - and I’m excited. It’s a rusty update 😉. As always, I would love to tell you a story (this will help set some context), but if you want to skip and go directly to the update, please scroll to: # THE Update section. The Story I’ve been through, possibly, the best and the worst time of my life. I use these contrasting words because everything went wrong - and that’s where you get an opportunity to shine. I think I fairly enjoyed resisting the pain and fighting through the odds, hopefully you’ll learn about it very soon on my blog (just need the courage to say it out loud :)). ...

December 12, 2022 · 10 min · Kushashwa Ravi Shrimali

Daily Update: 19th 20th 21st November 2022 - Day 5 to Day 7 (inclusive)

Hi everyone! Sorry for missing out on publishing individual blogs for 19th, 20th and 21st November, but it has been very hectic for me, and I decided to give leetcode a break and explore System Design (a lot). Turns out, I had some idea about it already, one of the advantages of working with startups (CareAI/Dukaan). But in any case, quite a few interesting things I learnt. I can’t share all the links, as it will be just better to share the playlists or YT channels I referred: ...

November 21, 2022 · 2 min · Kushashwa Ravi Shrimali

Daily Update: 18th November 2022 - Day 5

Hi everyone, Day 5 of this series of daily updates. Started my day, fairly early but was feeling unwell. In any case, I did make some progress with my learning of the Interpreter. One of motivation to learn about Interpreter is to learn the whole process, from the code we write to the object files / executables. Of course, in this goal, my next step would be to read the “Write a compiler in Go” book. But one step at a time, right? ...

November 18, 2022 · 1 min · Kushashwa Ravi Shrimali

Daily Update: 17th November 2022 - Day 4

Hi everyone, Day 4 of this series of daily updates. I don’t have a lot to share today, just one of those days where I spent a lot of time going through whatever I’ve done already. I take some time to look at the things I learned so far, and see if I could be more intuitive back then. I’m going to continue doing the same for the next day, though this time for the problems I’ve solved on Leetcode. ...

November 17, 2022 · 1 min · Kushashwa Ravi Shrimali