Ask HN: How would you design an alternative Twitter
162 points| dustedcodes | 3 years ago
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?
[+] [-] matt_s|3 years ago|reply
Content moderation (incl comments) doesn't scale so don't build something with public town squares. That's only a feature platform builders want in order to sell advertisements. If the thought of not having an ad-driven platform leads you to "users won't pay for it" then maybe think of a platform users would pay for or some other way to have it be sustainable.
[+] [-] istinetz|3 years ago|reply
>“You know — “ said Eliot, “Kilgore Trout once wrote a whole book about a country that was devoted to fighting odors. That was the national purpose. There wasn’t any disease, and there wasn’t any crime, and there wasn’t any war, so they went after odors.”
“This country,” said Eliot, “had tremendous research projects devoted to fighting odors. They were supported by individual contributions given to mothers who marched on Sundays from door to door. The ideal of the research was to find a specific chemical deodorant for every odor. But then the hero, who was also the country’s dictator, made a wonderful scientific breakthrough, even though he wasn’t a scientist, and they didn’t need the projects any more. He went right to the root of the problem.”
“Uh huh,” said the Senator. He couldn’t stand stories by Kilgore Trout, was embarassed by his son. “He found one chemical that would eliminate all odors?”
“No. As I say, the hero was dictator, and he simply eliminated noses.”
=========
Your solution is somewhat similar. You want to solve the problem of people saying racist things, so you decide to destroy the public square. Going for the root of the problem, I suppose.
[+] [-] annowiki|3 years ago|reply
You might get racist boards, but then its easy to get rid of all of them at once.
150 being https://en.wikipedia.org/wiki/Dunbar%27s_number of course.
I have no way to distribute anything. I tried to do my own annotations board on literature but no one joined. I just think it sounds cool to be in a personable board like that.
[+] [-] azangru|3 years ago|reply
Sorry for being a prick; but the royal 'we' is the exact opposite of the 'we' in all of humanity. Royal 'we' is when the speaker refers to him-or-herself with the first-person plural pronoun, as was common among sovereigns ("we the Emperor of the French"). These days most commonly seen in academic articles, where single authors refer to themselves as "we" for some reason.
[+] [-] Vox_Leone|3 years ago|reply
I am convinced that the presence of authorities on social media has to be regulated, and if I were to launch an alternative to Twitter I would consider [and look for ways to] build ethical safeguards [concerning public officials] into the system.
[+] [-] ly3xqhl8g9|3 years ago|reply
[1] https://data.iana.org/TLD/tlds-alpha-by-domain.txt
[+] [-] wufufufu|3 years ago|reply
[+] [-] abeppu|3 years ago|reply
- Does LinkedIn show us that people have less hostile posts if their real world professional connections are watching? If Twitter tried to show your posts to people it thinks you know, whether or not you follow each other, would we all be more civil?
- Does the higher bar of needing to generate an image or video to post (and a 2nd class presentation of comments) on some platforms, and lack of explicit 'reply' functionality stop arguments or bickering? The bar of typing a post in Twitter is just too low?
- Does TikTok's recommendation based on behavior rather than "interests" create less polarized bubbles? Showing you a funny dance video just because it knows you'll watch it may disrupt you from seeking out The Enemy just to disagree with them.
- Does removing an asymmetric "follow" relationship in favor of symmetrical "connections" disarm people whose hobby is having incendiary positions? If you can only have more "audience" by opening yourself up to see stuff from more people, do you then choose to connect with people that add value rather than valuing followers who will amplify you?
[+] [-] kenjackson|3 years ago|reply
It’s a much harder problem to fix. There are some partial solutions, IMO. Although none are all that practical to implement.
[+] [-] kspacewalk2|3 years ago|reply
The answer to this question seems almost implicit for you, but it's far from obvious to me.
[+] [-] jefftk|3 years ago|reply
Why would advertisers prefer public town squares? They just want people to see their ads.
(I also like "public town square" places, as a user)
[+] [-] ianai|3 years ago|reply
[+] [-] unknown|3 years ago|reply
[deleted]
[+] [-] matthewdgreen|3 years ago|reply
Twitter is part of that fragmentation, but it also accomplished something decent that competitors like Reddit don't: while there are individual communities, the follow interface made them somewhat porous. People can slide into conversations or get boosted by just about anyone. Making this work without local "subreddit-style moderators" was really technically remarkable, just from a spam perspective. Making moderation work to the point where a company could actually run advertising was extremely impressive.
I don't know what you're calling for exactly, but it sounds a whole lot more fragmented than what Twitter accomplished. I don't know that this will be a better outcome.
[+] [-] cplusplusfellow|3 years ago|reply
But no one blinks an eye. So HatefulRacistUncle might be “HorriblyMisguidedAndRacistYoungCollegeStudent” and that’s also not ok to some of us.
So who polices this? Maybe we just go back to not reading things we dislike. You can block people on Twitter ya know.
[+] [-] rdevsrex|3 years ago|reply
Why do we have to do that? Isn't the idea of having easy access for all enough? What people are so marginalized that they can't mute hateful speech and get on with their day?
[+] [-] i_like_pie|3 years ago|reply
to add to your point: 1/ tech stack/architecture isn't #1 or even #10 issue. think everyone (all) agree on this 2/ larger issue is how to handle open discourse. given how we are wired as species, is there a social network that is truly open that doesn't descend into vitriol? if so - what behaviors are rewarded, what are the policies etc. - this is #1 question
[+] [-] throwawaylinux|3 years ago|reply
[+] [-] pookeh|3 years ago|reply
[+] [-] ctvo|3 years ago|reply
What's interesting is what value Twitter gives and what could a new platform target? For me, there's a slice of Twitter users that provide information, entertainment, and context that I can't get elsewhere. This could be something from a mid-level analyst re: market volatility or a college professor at a small Canadian university on Chinese politics. These people aren't consistent enough or polished enough to have established means of amplifying their opinions (a blog, newsletter, podcast, etc.) though they have so much domain expertise. Where do you find them? On Twitter. The low friction posting encourages them to share.
If I could get rid of the celebrities, the thought leaders, the self marketers, the low content hate, and the bots, and only be left with the above in a moderated environment I'd welcome this global town square.
[+] [-] naravara|3 years ago|reply
Sadly many of those people come for the self-marketers and thought leaders though.
I've noticed this in Reddit too. A lot of posters in places like AskHistorians and AskScience have left, questions just don't get answered as much anymore and the quality of responses has gone way down. I expect those people came for the memes and interesting articles (and maybe /r/GoneWild) and participated in this value additive stuff while they happened to be around. But as Reddit got less interesting, more focused on memes and political fighting, and generally became less of a fun place to hang out they seem to spend less time on it and post less.
[+] [-] cphoover|3 years ago|reply
[+] [-] baxtr|3 years ago|reply
If you really want to build a twitter alternative think about how you would DISTRIBUTE it. How would you get a critical mass on the platform so that is viable, i.e. interesting enough for users to stick around.
Which existing social networks (not media ones, real ones) would you try to capture first? Facebook and Tinder both did the Uni campus strategy quite successfully. Slack did the Bay Area startups strategy. What’s your strategy?
[+] [-] jefftk|3 years ago|reply
The OP specifically asked about this, and reading the comments a lot of people here evidently do care.
[+] [-] tkk23|3 years ago|reply
Please don't leave us hanging. How had you designed it?
I would like to know even more: Did you have integration with other networks via ActivityPub or other protocols?
There is a huge risk of wasting time if I cannot migrate my social network. New services are prone to being discontinued, why should I invest in a new network that locks me in?
I don't understand why not all new networks offer ActivityPub migration by default. Distribution should be much easier.
[+] [-] mromanuk|3 years ago|reply
[+] [-] duxup|3 years ago|reply
[+] [-] throw_m239339|3 years ago|reply
what was it called? now I'm curious.
[+] [-] unknown|3 years ago|reply
[deleted]
[+] [-] drc500free|3 years ago|reply
[+] [-] peterhunt|3 years ago|reply
Database: I’d use whatever you know and helps you get to market, but abstract it away from the rest of your app so you can swap out later. Lots of good choices here; I’d pick mysql or postgres running on rds. I would also design for sharding by user on day 1 because that can be extremely painful to add later, however, care would have to be taken to ensure it doesn’t slow you down too much early. I’d also just use an rdbms for caching unless it becomes a problem, only then would I reach for redis. I would also avoid a fanout-on-write approach in favor of fanout-on-read. It will save you a lot of headaches later.
Firestore is nice but can get expensive quickly so I’d plan for it to be a temporary thing.
2. Would go for a react native app first but there are lots of options to choose from. Go with tech you know but keep in mind that it’s basically impossible to get a AAA mobile experience on web, and in this space polish really matters.
3. Decentralized social networks never took off because they are too hard to build. Avoid at all costs unless you have some angle (ie you have some novel tech discovered during your PhD). A middle ground could be a centralized network that is open source and makes data portability front and center.
I’ll also say that growth matters a lot here. As a founder I think 20% of the teams headspace should be thinking about engineering. The rest on growth and retention.
[+] [-] pdinny|3 years ago|reply
However this is not something that I've ever done IRL and I rather doubt that most of those who invoke this idea do this regularly either.
The kinds of discussions that you might imagine having in public with strangers who might have different values and backgrounds would be wildly different from the same discussions online. The metaphor is quite a broken one and at this point about as useful as pretending that the screen I'm looking at is an analog to my actual desktop (which mostly one exists to hold the screen).
While this may come across as mere pedantry I think it is actually quite important to ensure that when we discuss platforms that are going to be nothing at all like a town square that we are more realistic about what kinds of conversation and interactions we might want to encourage or discourage.
[+] [-] andyjohnson0|3 years ago|reply
Some thoughts:
- Start with thinking about how you're going to maintain engagement without pushing people into algorithmically-generated echo chambers, or into attack/defence behaviour that will just turn your New Twitter into the same cesspit as Old Twitter.
- Also think about how you're going to moderate content - because you're going to have to do it whether you like it or not, and its going to have to be at various scales from post-level to policy-level. There's a very good argument to be made that Legacy Twitter's product is content moderation [1], not software. Human nature being what it is, you may find that eventually it's your product too.
- Also, consider how you are going to deal with state-level and semi-state-level actors who will attempt to infiltrate your platform to use it as an amplifier.
The tech platform will help with the above, of course, but above all I think you need to consciously design the thing that you're building. That thing isn't a software platform or a social network or a community. It's something else. Figure that out first.
And if you want to build something that makes the world better (as opposed to worse, as in Old Twitter), you might consider how people can use your new platform to get stuff done in the world, rather than just shouting and meme-ing. I wish I knew how to do that though.
If you do build something like Twitter then please try to build it so that it doesn't cause harm.
[1] https://www.theverge.com/2022/10/28/23428132/elon-musk-twitt...
[+] [-] jalapenos|3 years ago|reply
The "how" is the absolute last question, the "what" is the first.
Can you imagine the following conversation:
"Hey you should sign up to Facebook!"
"Oh, why?"
"It's got a great tech stack!".
Me nether.
To design an alternative Twitter you must first understand what made Twitter popular in the first place. And then at some point, in the far distant future, let the name of a tech into your head, or a line of code onto your screen.
Said in good faith. I know so many engineers who wasted so much time because they couldn't understand that outside of the constraints of a job their skills had no monetary value by default.
[+] [-] nprateem|3 years ago|reply
The real question Elon should have asked is what's beyond Twitter, i.e. what should he have built instead of trying to pivot Twitter towards, with all its baggage?
[+] [-] prepend|3 years ago|reply
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).
[+] [-] Zealotux|3 years ago|reply
[+] [-] zulu-inuoe|3 years ago|reply
[+] [-] nisegami|3 years ago|reply
[+] [-] nebqr|3 years ago|reply
An account is 10 dollars (lifetime). If you get banned, you have to pay 10 dollars again. Permabanned = can't come back.
Premium? (dms, search, custom avatar) 10 dollars.
Change your avatar? 5 dollars.
Change someone else's avatar? 10 dollars.
Ad free? 10 dollars.
Access to archives (posts over a certain number of years old) 10 dollars.
Not too expensive and no recurring costs for good citizens, prohibitively expensive for bots/trolls.
[+] [-] mdp2021|3 years ago|reply
it is substantially the Soviet Pravda.
Imre Lakatos defined totalitarianism in terms of "how distant in the past can I retrieve documents" - the shorter the span of accessible data, the worse. In historical totalitarianism regimes such obstacle was instated to hide possible ideological changes in the regime, to give an appearance of monolithic consistency. In general, if you have a collector and checking history is not a basic feature, than it is nothing but a joke.
(PS: the first post on HN is the 'Y combinator' submission from pg, Paul Graham, on October 9, 2006 - you find this with one URL. This is how it is supposed to be - the distantmost past is as accessible as the recentmost addition.)
[+] [-] noaheverett|3 years ago|reply
Timlines/activity are built from the RDBMS and served from Redis as a cache. New posts are added to the cache directly as well so only needs to rebuild if you lose the entire cache which only happens if we need to restart the server. Also not storing full posts in Redis, just IDs, pulling via primary key from DB is very fast.
That same setup was used for a previous app that had a few million user base (don’t remember the concurrent user numbers though) and it ran well with a clear path to scale it up.
More thoughts: build a mobile friendly web app first, you’re gonna need some sort of back-end to run the iOS app anyways and tweaking a web app UI is much quicker than resubmitting iOS builds to the App Store.
[+] [-] nickdothutton|3 years ago|reply
I wrote a little about this after a particularly irritating experience with LinkedIn, but the same goes for twitter or any public forum.
https://blog.eutopian.io/building-a-better-linkedin/
[+] [-] viraptor|3 years ago|reply
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)
[+] [-] dale_glass|3 years ago|reply
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.
[+] [-] linsomniac|3 years ago|reply
It's easy: Go to https://mastodon.online/auth/sign_up and sign up. Go to https://twitodon.com/ to try to automatically follow your Twitter friends on Mastodon. Then use the search bar to search for other of your friends. Click on their followers/following to look for other people to follow.
[+] [-] jsemrau|3 years ago|reply
1. Micro-blogging doesn't add much in 2022. Velocity of content is too high and comment vs content is real. What would it have what Discord or Telegram can't provide? The content distribution to the world? Is that really a feature in 2022?
2. Followers are a terrible approximation of shared interest.
3. We use social media to be entertained and not to work. Ideally to connect with people that can help us move ahead. Stack overflow : Learn from smarter programmers. Finclout: Learn from smarter investors.
4. Do we really need a public global town square? Even if yes, there will always be boundaries based on spoken languages. (Chinese, English, Spanish, French, etc). How much does it help us that an Indian doctor can talk American politics to a South African? https://twitter.com/majornirmal/status/1587129879341867008
5. How is moderation baked into the product? People will exploit all your weaknesses to get ahead. For Finclout we implemented that as incentivized tasks for all users. How much do you allow for "edge" content. How does your system define "edge"?
6. Bots create engagement. Engagement creates DAUs. What's your strategy to use bots in your growth path? For finclout we don't. However, we have content partnerships in place so the app never feels empty.
7. What added value does decentralization bring? We partnered up with DeSo and ran a node for a while. Yet at this time, I think the only valuable innovation is decentralized identity management. Probably SBT will be the better solution here.
8. In 2023 we should go to a social sites because it provides us with the userbase to connect us with interesting people. I love Lunchclub for that exact reason. IMHO, this is how a social platform should be.
[+] [-] theshrike79|3 years ago|reply
Mastodon still only has favourites. There's no way to say "I like this toot, but not enough to retwe... boost it" on Mastodon. Favouriting is more like "this is the best ever and I want to return to this later" -style bookmarking in my mind.
[+] [-] bastawhiz|3 years ago|reply
[+] [-] Marazan|3 years ago|reply
I mean, don't get me wrong, there are interesting technical challenges in a high volume site like Twitter. However, the problems and real existential challenges Twitter faces have nothing to do with tech.