Tech Industry
Yesterday
579
Bitcoin is the only possible future
Personal Finance
10h
1902
Should I marry a lazy girl?
Ask Blinders
Yesterday
1077
Why is our country owned by Israel? I don't want my tax dollars fund genocide. How can we stop this nonsense?
Fitness
10h
1850
Very thin yoga pants
AMA
3h
633
I have worked at TikTok US core tech for 3 years. AMA.
what tech stack?? what concepts? firebase firestore? websockets? js reactive? http polling!?
Oh man, Google lives for this stuff
Websockets & redis
Yea works good with socketio and can scale for multiple instances
Firebase real-time. Easy as hell
Have you considered a career at Google? I'd love to talk to you further about your idea.
If you’re building something that needs, say, Discord scale, you could use Kafka. Symphony, for instance, uses Kafka behind the scenes.
If it’s a hobby firebase is really fun & has nice features for rapid development. If you want users for a free or freemium product it’s too expensive to build your real-time stack on top of. You have to own your websocket solution if you want it to be cost effective at scale. Fortunately you’re not the first to want to do this, and you don’t have to depend on a large company for the tech that makes it happen. Websockets with a fallback to long polling is the de facto standard. Socket.io does this, and is insanely simple to implement for up to about 1k or maybe 5k concurrent users. It is a bit harder to scale, and easy to outgrow. You can transition from that to something like ws (a library) in go or node. That should get you into the 100k concurrent range depending on app complexity (most connections are just sitting idle and waiting for something to push to a user, but something closer to a video game might use an order of magnitude more resources). Your next issue is clustering (single thread to multi thread and then multi server). You need a pub/sub broker at that point. Something like redis, or even rabbit, Kafka, etc. Hopefully that gives you an idea of what the typical path looks like for a startup that grows their need for websockets in their app over a few years.
My implementation uses NodeJS, SocketIO, MongoDB, Redis on a cheap DigitalOcean setup. Work is distributed via queues. Front end is React It gets me everything I want for now. Not too many users. Only a couple 💯
Like message queue?? Kafka? Rabbitmq?
The fastest, most reliable, Redis-based queue for Node. Carefully written for rock solid stability and atomicity. https://github.com/OptimalBits/bull
Step 1) Deprecate existing popular chat application
Depends, how much to you care about e2e encryption?