173 points · by fagnerbrack · 3y ago · 85 comments
One thing interested me: Why the difference in pathing between events and messages? I think the event flow makes sense, but why not have messages also go through your gateway server instead of through webapp? Surely there is needless latency there when you already have an active websocket open to gateway? I thought perhaps it was because your gateway was for egress-only, but then the events section made it clear you also handle ingress there.
AOL chatrooms in 1995 too were blazingly real-time even on dialup. Anyone ever use progz/scrollers? With an OH (overhead) account you could flood rooms with thousands of messages a second. Rich text, not plaintext. And it'd appear in super fast "real time" to everyone in the chat.
But really is the internet actually doing anything new? My grandfather used to send telegrams overseas all the time. Does anyone remember teletype? How is that any different than us chatting with each other here on HN? Phaw, tech bros just keep reinventing the wheel.
AOL existed outside of America.
my fondest memories as a would-be computer hacker in the early-noughts was sitting in a BT phone box in the UK at 3am using the lineman opcode for free local calls to connect to my nearest AOL pop, so I could use one of their trial CDs with a fabricated or stolen credit card (I deactivated the trial before the first payment, I was not a total thief).
350K – https://www.theverge.com/2020/6/4/21280829/slack-amazon-aws-...
The Kubernetes Slack has close to 200K users right now.
Amazon has 1.5 million employees, and I'm sure the majority are on Slack.
Forget 1995, no service other than Slack can run group chats at this scale even today.
If you’re using the word architecture even though you mean product functionality, you can simply go to https://slack.com/help/articles/115003205446-Slack-plans-and...
Look at the functionality listed there and see how many things AOL supported which Slack does not and vice versa.
Seems quite the ideal use-case for Elixir/Erlang but since haven't used it myself, don't know would it be that much better. Especially training/developer pool -wise.
And Vitess/MySQL for persistence? No Cassandra or something similar?
Pretty sure YouTube migrated onto Spanner quite a while ago.
https://elixir-lang.org/blog/2020/10/08/real-time-communicat...
Notably, with regards to the hiring pool:
> None of the chat infrastructure engineers had experience with Elixir before joining the company. They all learned it on the job.
I could see these Channel Servers using something like SQLite for persistence, which would allow the full suite of SQL features without any of the drawbacks of CQL, of which there are many.
The blog post felt a bit high-level and lacking some technical/architectural details that would've given more insight, but nonetheless it was an interesting read!
Are you for real? This isn't an hypothetical codebase. This is slack, used by millions of people.
I get it, they're using boring tech, but come on.
'talk' was an everyday tool back in the 1980s and early 90s that sent characters as they were typed. I just checked and it's installed on my Mac today. It's person-to-person, not group chat, but there's something magical about seeing every keystroke in near-real-time. You can feel the person at the other end.
Its fine if you don't care enough to edit what you say, but if you do it requires composing the sentence first in your head.
Everything has gotten more sluggish.
E: if you reach out to support, they can reset stuck state for you. They were very helpful but didn't sound sure it would work.
What on earth do you even mean by that?
Talk to a controls engineer about real time operating systems and PLC programming, and you get a very solid definition. Talk to a software developer and it means something like "as fast as we can, without any purposeful delays or buffers".
Maybe I'm just a pedant, but the entire article has graphs with no numbers, no defined service level objectives, and vaguely mentions 500ms at the end.
What is real time?
Voice, video, and even text chat, falls into this category. You want minimal layency but nobody will die if the screen freezes for a bit.
It's customary to talk about these systems as "real-time communication" and nobody working in the field would confuse it with hard real-time.
More info and examples: https://en.m.wikipedia.org/wiki/Real-time_communication
You wouldn't ask for the deadlines of a video game speedrunner talking about "real time", either. That means real wall-clock time rather than time displayed by the video game (differences can arise due to e.g. pausing)
No, "real time" in a software context means having a persistent stateful TCP/UDP connection open between a client and a server (or two clients in case of WebRTC and the like) to exchange data, skipping over paradigms like having to establish new HTTP connections or being blocked on database fetches. This is a well-established definition, and has nothing to do with any specific millisecond threshold.
Maybe fixing the bugs so that they don't mysteriously get ill would be a thing to pursue?
But sure, you get a medal for being a smartass online :)
Well that's just silly, if you've ever used used slack. It's corporate chat rooms, with real-time chat being a fundamental feature of it.
> counter to what the platform is meant for.
The platform is meant for communication. Async communication is one (probably smallish, at least in my experience) slice of that.
Above that, you have basic sharding techniques like assigning each channel to an instance. This should work up to some thousands of moderately active chatters in a single channel - at which point nobody can read all the messages anyway so it's not working for non-technical reasons.
Slack is trying to solve the problem of having thousands of channels with millions of people, as well as millions of channels with thousands of people. In other words, about 6 orders of magnitude bigger than your load test.