Live data from Hacker News

Ask HN: How would you design an alternative Twitter

news.ycombinator.com

1–10 of 351 posts

Ask HN: How would you design an alternative Twitter

#1
So much talk about Twitter alternatives in recent days, including people migrating to Mastodon and even Jack Dorsey announcing his new decentralized social media platform.

I was thinking, if I was to build a new micro-blogging aka Twitter alternative, what technological choices would I make to get it quickly off the ground but allow for scale?

What database technology or approach would you go for?

Would you build a (mobile first) web application first or would you start straight away with a native iOS/Android app (maybe Flutter)?

Would you go for a centralised or decentralized approach? If the latter, how would you decentralize it without sacrificing the "public town square" effect that Twitter currently has but is clearly lacking with the fragmentation of Mastodon?

To answer my own question, I would probably build a centralized platform like Twitter is now, probably opt for a fast NoSQL database like Google's Firestore in Datastore mode and to keep things simple I would probably even make sure that tweets would get automatically deleted after some years as I don't think it's needed to build a forever growing database of people's thoughts in that moment that persists for decades to come. Micro-blogging always felt to me as a thing right now, a thought in this moment but that thought could be different in a few days, months and definitely a few years, so why store it forever. Feels like I could save a huge operational cost and prevent abuse by not keeping tweets for beyond their relevancy.

What are your thoughts?

Re: Ask HN: How would you design an alternative Twitter

#2
Let's step back a bit and not ask about the mechanics. Twitter was, and, so far as I'm concerned, the nervous system of the Internet. It's main strength is saying "Hey, you were interested in this -- go to this URL". It's a pubsub system. There are many places, many industries that don't care about the latest celeb or Elon, but they do want a signaling system -- and they want it secure and encrypted. As an example, the oil and gas industry has to communicate with about 200,000 stations. The messages are simple -- why not a private Twitter for them? Sure, they could use NATS or Kafka on a private net, but why not this?

Re: Ask HN: How would you design an alternative Twitter

#3
RSS

People put out RSS feeds. People subscribe to RSS feeds.

No server side agorithm and api just returns feeds sorted by users preference.

If I follow too many people to view chronological, then I can have client side algorithms to sort.

Aggregate queries across all the feeds on the server identify hashtag trends and create useful metrics (retweets, likes, etc).

Re: Ask HN: How would you design an alternative Twitter

#4
The technology to a huge extent doesn't matter, except for things like decentralization because those impact how end users use it.

Honestly, I'd probably just build Mastodon. I use it sporadically. My feed is exactly what I subscribed to, and nothing more. That of course doesn't make for an amazingly engaging platform that constantly pushes people to engage and to create new accounts, but that's precisely how I like things to be.

You probably won't get rich from catering to people like myself, though.

Re: Ask HN: How would you design an alternative Twitter

#7
post #5

A thing I truly liked about Google+ was the ability to separate contacts into "circles" to differentiate between real-life friends, family, online friends, colleagues, etc. I wish more social networks used that kind of approach.

Twitter just launched a feature called Circles that has been very well received in my social....circle.

Re: Ask HN: How would you design an alternative Twitter

#8
If this was aiming for the scale of twitter replacement, the realistic answer is: read as much as possible from what was published about the current twitter architecture and try to replicate that while avoiding things they used in the past. If you're thinking in terms of a specific database rather than queues that write into partitions distributed around the world, you've probably already lost. Maybe think really hard about splitting out mostly-readers and pop-stars and whether they need input/output that's architected differently. Find people who design event stream architectures.

Because let's be serious. Apart from youtube comments, I don't think there's anything the scale of twitter for short messages at the moment. (and even that's much simpler problem)

Re: Ask HN: How would you design an alternative Twitter

#9
post #8

If this was aiming for the scale of twitter replacement, the realistic answer is: read as much as possible from what was published about the current twitter architecture and try to replicate that while avoiding things they used in the past. If you're thinking in terms of a specific database rather than queues that write into partitions distributed around the world, you've probably already lost. Maybe think really har…

>Apart from youtube comments, I don't think there's anything the scale of twitter for short messages at the moment.

discord, telegram?

Re: Ask HN: How would you design an alternative Twitter

#10
post #6

Build a protocol specification instead, and we can have multiple competing implementations (like Email). This is what Jack Dorsey was suggesting.

Based on cryptographic signatures.

If you signed your message with "This is a reply to msg 33419574 by dustedcodes. Signed: mejutoco", then nobody could take this converstion away from you. It would be federated by all competing services that use this protocal.

Post reply on HN