That's like saying that Chrome is a modern UI for what used to be Lynx. Those tools offer very different features, even if they share a rudimentary set of behaviours.
E.g., clicking the "emoji" window in Slack. I'll permit the custom emojis in the LRU emoji list to delay, but even the stock Unicode "text" emoji take palpable time to "load".
Now think about the average chat app like Slack or Teams. Those have a very different read-write ratio. Some things can be cached for long periods of time, but many other entities become invalidated quickly, and are subject to intricate permissions policies.
As for sharding, Slack uses Vitess: https://slack.engineering/scaling-datastores-at-slack-with-v...
> most people on Twitter aren't writing Tweets
I don't know how true this is. Most people in my corner of twitter tweet several times a day, some of them have rapid-fire conversations in the replies. And that cache-busts (or at least appends to) a whole lot of people's feeds, just like it would people's chat history (while in both cases, almost all writes are appends)
But idk, I'll stop speculating here because I'm not basing it on much
> it's very simple data. Mainly a series of messages, displayed in chronological order. That's one of the most straightforward possible things to optimize.
When a company grows and add features that customers need, the data model has to grow with it. Queries necessarily become more complex.
I used to work at a big video sharing site. I wasn't there in the beginning, but I imagine the initial profile pages had code like
Then some users said "hey, we want some of our videos to be private".So then the simple query became
Then they said "ok, but I want people who are mutual friends to be able to see some just-for-friends videos".And then the query suddenly became much more convoluted. We started loading all of a users' videos in memory, then in-memory filtering, returning only the videos the viewer had access to (slow for users with thousands of videos).
Then some users came along with 30,000 videos and we had to abandon the in-memory filtering because we were getting OOMs, so we developed a hybrid system that could run queries either in-memory or in the DB depending on volume.
This is a trivial example (there are much more painful examples of data model bloat) but it illustrates the point: if you think it should be easy, you probably have an innacurate mental model of what needs to happen behind the scenes.