top | item 33419574

Ask HN: How would you design an alternative Twitter

162 points| dustedcodes | 3 years ago

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?

338 comments

order
[+] matt_s|3 years ago|reply
I think you're jumping into the technical bits right away without thinking through requirements/features. Maybe we (the royal 'we' as in all of humanity) shouldn't have a public town square? When you build something to have marginalized voices be heard you are also including all marginalized voices. The MarginalizedVoice super object has EqualRightsForSquirrels as well as HatefulRacistUncle child objects. There are very valid points, that people don't like to hear, about how the concept of someone/group choosing what MarginalizedVoice gets heard and what doesn't isn't fair. If the basis of a platform is "public town square" you're going to have to deal with all MarginalizedVoices.

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
This reminds me of a short story Kurt Vonnegut mentioned in a novel of his:

>“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 have me thinking about kind of a cool board idea. 150 person twitter boards. Cap it at 150. People in that group can all vote on their own moderation, they can't interact with groups in other boards through quote tweeting or voting, though obviously they can copy paste.

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
> the royal 'we' as in all of humanity

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 think one of the key problems with twitter is the presence of constituted authorities interacting with the populace free from the formal mediation of official channels. I am in Brazil and I bring as an example the disastrous presence of Bolsonaro in the social networks, directly instructing his followers, completely free from institutional constraints. In the case of Brazil, this was a major element of destabilization of public discourse.

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
But we already have a "public town square": it's called DNS, Domain Name System, and it's great. With about $20/year you get "verified" and everyone knows you own "foo.com", or .whatever [1]. It's just that we, as in we the users, failed this great "public town square" because as soon as we get in the public we get scared and need to belong to a tribe: the Twitter tribe, the TikTok tribe, the Instagram tribe, and so forth.

[1] https://data.iana.org/TLD/tlds-alpha-by-domain.txt

[+] wufufufu|3 years ago|reply
What if we let people design their own content filters? That way the platform itself doesn't have to. You can easily select popular filters from a marketplace and the number one option will probably be "hide hate speech" or "hide all politics".
[+] abeppu|3 years ago|reply
I don't think it's necessary to totally kill the 'public square' concept. Rather, I think comparison with other social media products highlight that different product decisions encourage different behavior for most people. People just use Twitter differently from TikTok, Snapchat, LinkedIn, etc, because of the informational and social environment these products create. These natural experiments can give us hypotheses about more explicit A/B tests for product changes:

- 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
People saying hateful things isn’t the problem. The inability of some to be reasonable after reading them is the problem.

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
Let's think one level of abstraction higher - do we want to marginalize voices in the first place, given that some of them are fighting oppression and injustice, and others are advocating for bigotry and hate? That is, if we cannot effectively discriminate between those two types of voices, whether because "moderation doesn't scale" or any other valid technical reason, or because it's not always possible to disentangle "legitimate" from "illegitimate" marginalized voices. It's not a binary category, because people who advocate for stuff are not one-dimensional caricatures. Do we accept the bad in the name of $good_stuff_that_comes_with_making_marginalized_voices_heard, or do we marginalize it all straight into oblivion by going after the forums of spreading ideas?

The answer to this question seems almost implicit for you, but it's far from obvious to me.

[+] jefftk|3 years ago|reply
> don't build something with public town squares. That's only a feature platform builders want in order to sell advertisement

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
Agree. If anything I'd make it like a cross between FB-early days and twitter. i.e. whatever a post is only immediately view-able by direct contacts. Maybe even top off how many direct contacts an account can have and require payment (monthly/yearly, tiered) above that threshold. Also give users the ability to mute/delete posts unilaterally - from their view but also possibly from the site entirely. Maybe have an "auto-disconnect" available above a threshold. Trying to think of ways around the mob mentality stuff.
[+] matthewdgreen|3 years ago|reply
One of the great/terrible things that's happened to communication over my lifetime is watching shared experience fragment. When I was a child most people used to read the same newspapers, watch similar TV. (It was boring!) Nowadays we're fragmented into different pieces of the Internet, which sucks even more.

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
There are plenty of hateful and racist things said on Twitter like : “all I want for Christmas is white genocide.”

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
> When you build something to have marginalized voices be heard

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
think this is spot on. allude to this here https://acehigh.substack.com/p/operatingproduct-plan-for-twi...

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
Hmm... If all of humanity would be better off as you say, then then why should the royal we have have to deal with racist voters? Or racist people going about free in public at all?
[+] pookeh|3 years ago|reply
This was a very intelligent and targeted way of not answering the question.
[+] ctvo|3 years ago|reply
The technical challenges are solved. It's not an interesting discussion to cheer for your favorite tech stack.

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
> 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.

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
Seems like you are looking for an intelligent filtering tool-set.
[+] baxtr|3 years ago|reply
Everyone, please stop thinking about HOW you want to build a twitter alternative. No one cares. I have tried to build one, I failed even though our tech was superb.

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
> Everyone, please stop thinking about HOW you want to build a twitter alternative. No one cares.

The OP specifically asked about this, and reading the comments a lot of people here evidently do care.

[+] tkk23|3 years ago|reply
>though our tech was superb.

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
Yes, every software problem is a marketing problem.
[+] duxup|3 years ago|reply
I think how is still an interesting question.
[+] throw_m239339|3 years ago|reply
> Everyone, please stop thinking about HOW you want to build a twitter alternative. No one cares. I have tried to build one, I failed even though our tech was superb.

what was it called? now I'm curious.

[+] drc500free|3 years ago|reply
But focusing on the product doesn't address what color the logo should be, or how many bikes can fit in the employee bikeshed.
[+] peterhunt|3 years ago|reply
No one here is answering your question so I will :)

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
I find the frequent invocation of a town square a bit perplexing. It evokes the idea of a place where strangers may gather to have an exchange of ideas, which sounds quite pleasant at face value.

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
If you want to design an alternative Twitter then my advice would be to not start with the tech. There seems to be plenty of stuff out there than you can bolt together to get things started, and which comes with options for scaling if you subsequently need it.

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
I think posts like this illustrate why MBAs retain their power over organisations, despite the constant complaints about them by engineers. There couldn't be a greater perspective gap.

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
Well actually, an alternative Twitter is still missing the point. Twitter *is* microblogging.

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
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).

[+] Zealotux|3 years ago|reply
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.
[+] zulu-inuoe|3 years ago|reply
I didn't get to use Google+ in its prime as I was averse to all social media at the time, but I totally agree. That was a great concept
[+] nisegami|3 years ago|reply
Twitter just launched a feature called Circles that has been very well received in my social....circle.
[+] nebqr|3 years ago|reply
I think that the (dead, gay) Something Awful forums model is a decent solution to content moderation and monetization.

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
Whatever platform does not allow a search like "What did user U publish on day D" has a specific label:

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
Can speak to the DB side of things: Redis in front of an RDBMS scaled well for me at https://glue.im/noah

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 can’t help but think part of the answer is to offer users more powerful filtering, so that they may exercise their own free will over what they see and hear. Sure some would choose an extremely narrow subsection of society to hear from, but others would cast their net wider. One might even choose to monetise “smart filters” that took the legwork out of building and maintaining such filters. The “smartness” need not be an algo either, one might choose to outsource filtering to another human offering that service.

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
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)

[+] dale_glass|3 years ago|reply
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.

[+] linsomniac|3 years ago|reply
The time seems to be ripe for moving to Mastodon. A few people in my twitter feed have made the move over the last few days, so I decided to give it a go again, and it's pretty nice. The down side is only a handful of the people I follow are over there. But people seem to be looking for alternatives now, so maybe there will become a critical mass.

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
I put my thoughts about next-gen social into a concept that I like to call "Eigensocial" and expressed that through the Finclout project.

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
I'd take a step back. Twitter did the right thing when they switched "favourite" for "like" for example.

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
I grew up in the golden age of Myspace. There was a lot of value, I think, in needing to directly choose to have someone in your social circle. If you didn't add someone as a friend, you didn't see their posts. It's a lot easier to be civil online when you know all the people you're interacting with. And perhaps a lot safer.
[+] Marazan|3 years ago|reply
Twitter is not a technical problem.

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.