Sabitlenmiş Tweet
Sushruth
310 posts

Sushruth
@TreeApostle
21 | building stuff i care about (breaking most of it) | react • typescript • java at work | gym + 学汉语
Hyderabad Katılım Mayıs 2024
95 Takip Edilen20 Takipçiler

@devXritesh Precomputation and edge caching using a trie
its near zero latency. a trie helps with prefix matching but ranking what shows up uses popularity, trending and your search history
English

We use microservices at work for a fintech app. The complexity overhead involved is no way something that can be handled by a 5-person team. good luck with that.
Separate CI/CD pipelines, distributed tracing and cross-service coordination would eat more time than actual feature dev
start with a monolith, modularize well, split only when traffic and team size demand it
English

So how kafka works is,
Kafka has topics. Each topic has a bunch of partitions which are commonly compared with queues but are not exactly queues.
Each partition can only be consumed by one consumer. So if you have 3 partitions and scale to 10 consumers, 7 just sit idle doing nothing
The true way to improve processing time is to increase partition count along with consumer count.
English

It's a combination of message queues, autoscaling and building the applications using event-driven architecture.
Message queues help by buffering the incoming traffic, protecting the downstream services from getting flooded
Autoscaling can be configured to ensure more instances of the applications are spun up with increasing traffic
Load balancing also plays a key role in ensuring that none of the instances have unequal load
Unlike sports streaming, Black Friday has predictable traffic spikes so teams pre-warm instances ahead of time, caches loaded, connection pools ready, everything initialized so theres no cold start latency when the spike hits
English

SF's tech scene is finally discovering Telegram has 1 billion MAU
Which why it's finally in Claude
(And of course thanks to @steipete)

@levelsio@levelsio
Telegram has 1 billion users It's the #1 or #2 chat app in most countries around the world Complete blindspot for most Americans And NOBODY uses it for its encryption (or lack of it), we use it because it has the best UX of any chat app! Also best API to develop bots with
English

@mysticwillz adaptive bitrate streaming, the video is pre-encoded in multiple resolutions and the client switches between them in real time based on bandwidth and buffer health
English

built a collaborative notepad using CRDTs and websockets so this is a fun one
There are 2 main approaches here
1. OT(Operational Transformation) where a central server transforms conflicting ops to converge (google docs uses this)
2. Conflict-free Replicated Data Types (CRDTs) where the data structure itself stores change type, location and timestamp to merge without conflicts or a central server
CRDT is a more modern and, imo, a better way to deal with concurrent editing
English

@javarevisited The output:
true
false
part is a variable so concatenation happens in runtime, creating a new object
English

stateless app servers are easy to scale because theres no shared state but databases hold state and keeping that consistent across nodes is the real problem.
read scaling is doable with replicas but write scaling is painful since every node needs to agree on write order. sharding helps but cross shard queries add a whole new layer of complexity
English

@devXritesh in my own projects, not yet but its on my radar, currently most of my endpoints dont paginate deep enough for it to hurt but i know itll bite eventually when data grows
English

@TreeApostle Offset pagination silently kills perf by forcing the DB to scan + discard every prior row (pure O(n) at depth).
Cursor-based (e.g. `WHERE id > :last_id LIMIT 20`) stays O(1) index-fast forever.
Switched any of your APIs yet?
English

System Design Series - Day 4/90
API RESPONSE DESIGN: Pagination and Filtering
You built an API.
User asks: Get all orders.
You return 100,000 records.
Result: API dies, 30-second delay, memory explodes, user leaves.
Thread below 👇
#SystemDesign #APIPagination

English

@0xlelouch_ it sucks in Hyd as well, thats approx the same time it takes for my commute as well. 2 hrs gone for commute which couldve been spent more in gym and hobbies. Or just getting a better sleep :(
English

Tuesday in Bangalore as a software dev: WFH vs WFO and money saved/spent.
1. WFO
- Commute: 2 hrs/day
- Fuel/metro + parking: ₹150–₹300/day
- Lunch + coffee: ₹250–₹500/day
- “One quick smoke/tea”: another ₹100
2. WFH
- Extra power + AC: ₹60–₹120/day
- Internet: ₹20/day
- Lunch at home: ₹80–₹150
Net: WFH saves ~₹300–₹900/day and 2 hours.
If you go office 12 days/month, that’s ₹3.6k–₹10.8k and ~24 hours gone.
Track it for 2 weeks atleast. Then decide what culture is worth to you!
English

@javarevisited collaborative filtering mostly, find users with similar listening patterns and recommend what they liked that you havent heard yet. they also analyze the actual audio features of songs and layer that on top to handle new tracks with no listens
English

People born in servitude these days
Your primary goal should be to exit servitude
Autism Capital 🧩@AutismCapital
Nobody tells you that you can just not do the office job. You don't have to. You can work a physical job. It's absolutely okay. You may even prefer it. There's no shame AT ALL. You may even do gig work or remote work and work/earn less to enjoy life more. There's no blueprint. It's all OKAY and it's all up to you!
English

@javarevisited Refactor a legacy service saving the team hours every week and nobody notices but fumble one leetcode medium and suddenly I'm "not a strong candidate"
English






