TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Learn how to build a small Twitter clone in 7 days

190 pointsby shane_burkhartover 8 years ago

21 comments

derefrover 8 years ago
&quot;Small Twitter clone&quot; can be taken two ways, and this one, I think, is the less interesting of the two. (Not to denigrate the project for what it is; it&#x27;s a good idea.)<p>On a one-machine scale, Twitter can be a single Postgres table, or a single ElasticSearch index. At the scale they actually are, it&#x27;s really a whole lot more.<p>I&#x27;d really love a tutorial—or possibly a whole book—that instead took you through setting up the sort of <i>distributed system</i> that is required to make a Twitter clone run at a Twitter-like scale. Either through IaaS APIs, or on your own with something like OpenStack DevStack.<p>It could probably <i>start</i> where this tutorial <i>ends</i>—with a one-node system running a Twitter-backend-alike monolith. And then each chapter would increase the scale, introduce a problem the scale causes, and then walk you through adding in an additional component: a message queue; a fragment cache; app-level health checks; a search indexing cluster; distributed logging + request tracing; geographic sharding; multi-master DB replication—in order to solve that scaling problem.<p>There would also be scale-points that would require changes in the business logic: making IDs globally unique and sortable ala <a href="https:&#x2F;&#x2F;github.com&#x2F;twitter&#x2F;snowflake;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;twitter&#x2F;snowflake;</a> deprecating but keeping around old APIs as new ones are added; &quot;Ball of Mud&quot; refactorings; isolated Enterprise clusters of the app; etc.<p>Bonus points if later chapters actually go back and rip out solutions that were introduced in earlier chapters—not because they were mistakes, but just because they were right for 10^3&#x2F;s but not 10^6&#x2F;s. And <i>bonus</i> bonus points if they assume an SLA that requires that such switchovers occur without downtime.
评论 #13207144 未加载
评论 #13207565 未加载
评论 #13207145 未加载
sonecaover 8 years ago
I finished the course a few days ago and it was awesome. Of course it is not a fully functional complete clone, but it is an incredible learning resource.<p>It really starts from the beginning as in &quot;first you have to install the proper tools and prepare your software development environment&quot; beginning. Which is great to teach you things that you wouldnt learn in other free online courses.<p>I think it is a essential resource that present you the full stack of a web app, acting as the perfect complement to more pure code oriented courses like freecodecamp and codecademy.<p>And you can really start from zero coding knowledge. I fully recommend it.
评论 #13204274 未加载
评论 #13203846 未加载
dom96over 8 years ago
This looks like a really cool course.<p>In case anybody is interested in learning how to build a Twitter clone in Nim then consider taking a look at my book[1]. It&#x27;s not free but it is a good way to learn Nim and web development concepts in a systems programming language.<p>1 - <a href="https:&#x2F;&#x2F;manning.com&#x2F;books&#x2F;nim-in-action?a_aid=niminaction&amp;a_bid=78a27e81" rel="nofollow">https:&#x2F;&#x2F;manning.com&#x2F;books&#x2F;nim-in-action?a_aid=niminaction&amp;a_...</a>
Veratyrover 8 years ago
Interesting that your site doesn&#x27;t work at all without allowing third party scripts. I don&#x27;t think I&#x27;ve ever seen anything like this before, hosting the entire page on another domain.
评论 #13204493 未加载
newscrackerover 8 years ago
I visited the page with uBlock on and nothing showed up. The I noticed that leadpages.net is blacklisted on it. So I had to remove the Ad Block and refresh the page.
rifficover 8 years ago
Cool, may I recommend building an OStatus-compliant twitter clone?<p><a href="https:&#x2F;&#x2F;www.w3.org&#x2F;community&#x2F;ostatus&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.w3.org&#x2F;community&#x2F;ostatus&#x2F;</a>
评论 #13204293 未加载
评论 #13204363 未加载
wofoover 8 years ago
Thanks for the course! I have a question unrelated to the contents: Why did you choose to release it for free? I guess you spent a lot of time preparing it, so I assume there must be some kind of (non-monetary?) benefit you expect to get from it.
评论 #13207106 未加载
bootloadover 8 years ago
@Shane, is the course emailed in one hit, or in batches. If so that is an interesting way to do it (phased roll-out of course by email) in itself.
评论 #13204513 未加载
评论 #13205473 未加载
rexreedover 8 years ago
Ugh, I had to unblock a bunch of scripts to even view this page. Super fail. I&#x27;m going to reblock everything I just blocked. Thanks.
评论 #13207141 未加载
Andrenidover 8 years ago
Can you let the emails roll in, then do the course later in your own time? Or do the links expire?
评论 #13204759 未加载
user5994461over 8 years ago
The page is empty. Blocked by uBlock Origin.
评论 #13206661 未加载
评论 #13205704 未加载
was_boringover 8 years ago
How did we as an industry go from &quot;create a blog in 10 minutes&quot; with rails to a &quot;create a twitter clone in 7 days&quot;?<p>It seems we have gone backwards in terms of speed of getting things done in the last decade.
评论 #13206638 未加载
评论 #13206740 未加载
DrewWethover 8 years ago
I got an email with the first course today and was pretty blown away tbh.
评论 #13203821 未加载
chrismorganover 8 years ago
That 1.5MB of image on the landing page should be shrunk drastically—you could trivially shave a megabyte off it, or even more.
评论 #13204083 未加载
codesternewsover 8 years ago
Is their any other sites&#x2F;courses like this freely available?
评论 #13205092 未加载
评论 #13205729 未加载
azdavisover 8 years ago
Minor nitpick: it says &quot;...you will learn how to:&quot; and then one of the bullet points (the one about SQL) starts with &quot;How to...&quot;
评论 #13204234 未加载
syngrog66over 8 years ago
if the feature scope and traffic scale is small enough you can build a Twitter-like in 7 hours. if not 7 minutes. given all the tools, frameworks and services avail today.<p>scope and scale are key
vijayrover 8 years ago
Is there anything like this for heavier topics like AI,ML etc?
评论 #13207029 未加载
arisAlexisover 8 years ago
I built writedown.co which is a blockchain enabled immutable Twitter clone. Check it out.if you like
评论 #13207968 未加载
fiatjafover 8 years ago
Twitter clones are the easiest thing to teach in a beginner programming class. That&#x27;s ok, but don&#x27;t say it like it is an amazing thing.
zizimazaover 8 years ago
Lurker here. Someone mentioned this the other day here too. Too bad Twitters dying, but you get the idea. <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13157254" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13157254</a>
评论 #13205376 未加载
评论 #13204217 未加载
评论 #13206665 未加载