logoalt Hacker News

csensetoday at 3:28 PM2 repliesview on HN

When someone says "stream data over the Internet," my automatic reaction is "open a TCP connection."

Adding a database, multiple components, and Kubernetes to the equation seems like massively overengineering.

What value does S2 provide that simple TCP sockets do not?

Is this for like "making your own Twitch" or something, where streams have to scale to thousands-to-millions of consumers?


Replies

shikhartoday at 3:34 PM

This is fair question. A stream here == a log. Every write with S2 implementations is durable before it is acknowledged, and it can be consumed in real-time or replayed from any position by multiple readers. The stream is at the granularity of discrete records, rather than a byte stream (although you can certainly layer either over the other).

ED: no k8s required for s2-lite, it is just a singe binary. It was an architectural note about our cloud service.

show 1 reply
shikhartoday at 3:41 PM

> Is this for like "making your own Twitch" or something, where streams have to scale to thousands-to-millions of consumers?

Yes, this can be a good building block for broadcasting data streams.

s2-lite is single node, so to scale to that level, you'd need to add some CDN-ing on top.

s2.dev is the elastic cloud service, and it supports high fanout reads using Cachey (https://www.reddit.com/r/databasedevelopment/comments/1nh1go...)