TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

We reduced the cost of building Mastodon at Twitter-scale by 100x

954 点作者 tekacs超过 1 年前

82 条评论

RomanPushkin超过 1 年前
&gt; ...10k lines of code. This is 100x less code than the ~1M lines Twitter<p>I wish I didn&#x27;t see this comparison, which is not fair at all. Everyone in their right mind understands that the number of features is much less, that&#x27;s why you have 10k lines.<p>Add large-scale distributed live video support at the top of that, and you won&#x27;t get any close to 10k lines. It&#x27;s only one of many many examples. I really wish you compare Mastodon to Twitter 0.1 and don&#x27;t do false advertising<p>&gt; 100M bots posting 3,500 times per second... to demonstrate its scale<p>I&#x27;m wondering why 100M bots post only 3500 times per second? Is it 3500 per second for each bot? Seems like it&#x27;s not, since https termination will consume the most of resources in this case. So I&#x27;m afraid it&#x27;s just not enough.<p>When I worked in Statuspage, we had support of 50-100k requests per second, because this is how it works - you have spikes, and traffic which is not evenly distributed. TBH, if it&#x27;s only 3500 per second total, then I have to admit it is not enough.
评论 #37139018 未加载
评论 #37140063 未加载
评论 #37139331 未加载
评论 #37142999 未加载
评论 #37141130 未加载
评论 #37141135 未加载
评论 #37140045 未加载
评论 #37142819 未加载
评论 #37141009 未加载
评论 #37144105 未加载
评论 #37139720 未加载
dataangel超过 1 年前
I do C++ backend work in a non-web industry and this entire post is Greek to me. Even though this is targeted at developers, you need a better pitch. I get &quot;we did this 100x faster&quot; but the obvious followup question is &quot;how&quot; but then the answer seems to be a ton of flow diagrams with way too many nodes that tell me approximately nothing and some handwaving about something called P-States that are basically defined to be entirely nebulous because they are any kind of data structure.<p>I&#x27;m not saying there&#x27;s nothing here, but I am adjacent to your core audience and I have no idea whether there is after reading your post. I think you are strongly assuming a shared basis where everybody has worked on the same kind of large scale web app before; I would find it much more useful to have an overview of, &quot;This what you would usually do, here are the problems with it, here is what we do instead&quot; with side by side code comparison of Rama vs what a newbie is likely to hack together with single instance postgres.
评论 #37139649 未加载
评论 #37139479 未加载
评论 #37140453 未加载
评论 #37144954 未加载
评论 #37139505 未加载
评论 #37141855 未加载
buro9超过 1 年前
Measuring &quot;Twitter Scale&quot; by tweets per second seems to be not how I would measure it.<p>Updates per second to end users who follow the 7K tweets per second seems more realistic, it&#x27;s the timelines and notifications that hurt, not the top of ingest tweets per second prior to the fan out... and then of course it&#x27;s whether you can do that continuously so as not to back up on it.
评论 #37137989 未加载
mping超过 1 年前
Congrats on the (kinda) launch. I was curious to see what you guys were up to. The blog post is pretty detailed, and with good insights. Reducing modern app development complexity to mixing data structures sounds like a good abstraction. I&#x27;m sure you thought really hard about the building blocks of Rama and you know your problems better than most of the hn crowd.<p>Now, the really hard part becomes selling. If companies start using your product to get ahead, that will be the real proof, otherwise its &quot;just&quot; tech that is good on paper.<p>On a side note, did you guys got any inspiration from clojure? I see lots of interesting projects propping up from clojure people...<p>Best of luck!
评论 #37137779 未加载
Pxtl超过 1 年前
I&#x27;ve seen many people describe frameworks like this - you know, first you have the slow back-end event-driven master database that you don&#x27;t query live against, then you&#x27;ve got eventual-consistency flows against the various data-warehouses and data-stores and partitioned sharded databases in useful query-friendly layouts that you actually read live from... and I never see it clearly explained: how do you read a change back to the user literally just after they made the change? How do you say &quot;other views eventual-consistency is fine but for this view of this bit of info we need it updated <i>now</i>&quot;.<p>This write-up is very detailed but I couldn&#x27;t find that explanation.
评论 #37137617 未加载
评论 #37137563 未加载
评论 #37137543 未加载
评论 #37138816 未加载
评论 #37149919 未加载
评论 #37139017 未加载
评论 #37142965 未加载
评论 #37137560 未加载
softwaredoug超过 1 年前
It’s a massive ask, even if the platform was 100x better, for all developers to give up every programming language and database they’ve ever used to depend on a startups closed source platform for all functionality.<p>It’s hard enough trusting Google or Amazons cloud offerings won’t change.<p>It seems that’s what they’re proposing right? What am I missing?
评论 #37137593 未加载
afro88超过 1 年前
Looks amazing and incredibly smart. But I found the LOC and implementation time comparisons to Twitter and Threads very disingenuous. It makes me wonder what other wool will be pulled over our eyes with Rama in future (or important real world details missed &#x2F; future footguns).<p>Still super impressive. Reminds me of when I discovered Elixir while building a social-ish music discovery app. Switching the backend from Rails to Elixir felt like putting on clothes that actually fit after wearing old sweats. Rama looks like a similar jump, but another layer up, encompassing system architecture.
评论 #37138270 未加载
评论 #37138461 未加载
sharms超过 1 年前
The performance on the example Mastodon instance is very responsive - almost anywhere I clicked loaded nearly instantly. I created an account and the only thing I found missing was it doesn&#x27;t implement full text search unless my user was tagged, but that might be a Mastodon specific item.<p>I think they have thought a lot about typical hard problems, such as having the timeline processing happen along side the pipeline, taking network &#x2F; storage etc out of the picture. Nice work!
评论 #37137368 未加载
jitl超过 1 年前
This architecture seems very similar to existing offerings in the &quot;in-memory data grid&quot; category, like Apache Ignite and Hazelcast. I&#x27;m more familiar with Ignite (I built a toy Notion backend with it over a few afternoons in 2020).<p>The way Ignite works overall is similar. You make a cluster of JVM processes, your data partitioned and replicated across the cluster, and you upload some JARs of business logic to the cluster to do things. Your business logic can specify locality so it runs on the same nodes as the relevant data, which ideally makes things a lot faster compared to systems where you need to pull all your data across the wire from a DB. Like Rama, Ignite uses a Java API for everything, including serializing and storing plain &#x27;ol java objects.<p>Ignite&#x27;s architecture isn&#x27;t focused on &quot;ETL&quot; into &quot;PStates&quot;. Instead it&#x27;s more about distributed &quot;caches&quot; of data. It does have streaming for ingestion (<a href="https:&#x2F;&#x2F;ignite.apache.org&#x2F;docs&#x2F;latest&#x2F;data-streaming" rel="nofollow noreferrer">https:&#x2F;&#x2F;ignite.apache.org&#x2F;docs&#x2F;latest&#x2F;data-streaming</a>), but you can transactionally update the datastore directly (<a href="https:&#x2F;&#x2F;ignite.apache.org&#x2F;docs&#x2F;latest&#x2F;key-value-api&#x2F;transactions" rel="nofollow noreferrer">https:&#x2F;&#x2F;ignite.apache.org&#x2F;docs&#x2F;latest&#x2F;key-value-api&#x2F;transact...</a>). It also has a &quot;continuous query&quot; feature for those reactive queries to retrieve data (<a href="https:&#x2F;&#x2F;ignite.apache.org&#x2F;docs&#x2F;latest&#x2F;key-value-api&#x2F;continuous-queries" rel="nofollow noreferrer">https:&#x2F;&#x2F;ignite.apache.org&#x2F;docs&#x2F;latest&#x2F;key-value-api&#x2F;continuo...</a>).<p>Rama&#x27;s data-structure oriented PState index seems easier to work with than building indexes yourself on top of Ignite&#x27;s KV cache, but Ignite also offers an SQL language, so you can insert your data into the KV cache however, add some custom SQL functions, and then accept more flexible SQL querying of your data compared to the very purpose-built PCache things, but still be able to do lower-level or more performance-oriented logic with data locality.<p>Anyways, if you like some of this stuff but want to use an existing, already battle-tested open source project, you can look for these &quot;in-memory data grid&quot;, &quot;distributed cache&quot;, kind of projects. There&#x27;s a few more out there that have similar JVM cluster computing models.
评论 #37138823 未加载
clusterhacks超过 1 年前
I&#x27;m excited to see the docs for Rama. But I am also a little scared of the comment &quot; I came to suspect a new programming paradigm was needed&quot; from Nathan.<p>It&#x27;s not so much that I think the comment is wrong or anything, but rather that it seems so similar to what I have heard in the past from power-lisp (or Clojure in this case) super-smart engineers.<p>I feel like we have reached a point in software development where &quot;better&quot; paradigms don&#x27;t necessarily gain much adoption. But if Rama wins in the marketplace, that will be interesting. And I am quite excited to see what a smart tech leader and good team have been able to grind out given a years-long timeframe in this programming platform space . . .
评论 #37138158 未加载
ThinkBeat超过 1 年前
I am confused.<p>This is meant to be hyped to sell your Rama platform&#x2F;product&#x2F;framework? That you have spent 10 years building in secret? During that time you have built a datastore and a Kafke competitor and ?<p>Should not those 10 years be factored into the time it took to develop this technical demo?<p>Is it 100x less code including every LOC in all of Rama?<p>I mean I am sure you picked a use cast that is well suited to creating a Twitterish architecture implementation.<p>If I went off and wrote a ThinkBeat platform for creating Twitterish systems and then created a Twitterish implementation on top if it, its real easy to reach low LOCs.
评论 #37140787 未加载
评论 #37141326 未加载
skybrian超过 1 年前
It sounds like interesting technology for someone, but I wonder more about scaling down. What does a developer instance running on a laptop look like?
评论 #37137753 未加载
failuser超过 1 年前
Is there a breakdown of effort Twitter spent doing the mastodon-level service (serving a feed of the accounts you are subscribed to) vs everything else like ads, algorithmic feed, moderation, fighting spam, copyright claims, localization, GR, PR, safety, etc?
miki123211超过 1 年前
Is this just me, or does the code in the post feel like they&#x27;ve implemented what should have been a new programming language on top of Java?<p>Their &quot;variables&quot; have names that you have to keep as Java strings and pass to random functions. If you want composable code, you don&#x27;t declare a function, you call .macro(). For control flow and loops, you don&#x27;t use if and for, but a weird abstraction of theirs.<p>I feel like this code could have been a lot simpler if it was written in a specialized language (or a mainstream language with a specialized transpiler and&#x2F;or Macro capabilities.)<p>I&#x27;d quote the old adage about every big program containing a slow and buggy implementation of Common Lisp, but considering that this thing is written in Clojure, the authors have probably heard it before.
评论 #37140818 未加载
kyle-rb超过 1 年前
Kinda disappointed by the simulation, where are all the viral posts?<p>I&#x27;ve been digging around for a while and haven&#x27;t found any posts with more than 20 faves. The accounts I&#x27;ve found with ~1 million followers have little to no engagement. I want to see how a post with a million faves holds up to the promises of &quot;fast constant time&quot;.<p>I&#x27;m especially curious about these queries — fave-count and has-user-faved — since a couple years ago Twitter stopped checking has-user-faved when rendering posts more than a month or so old, so I imagine it was expensive at scale.
评论 #37139734 未加载
NoraCodes超过 1 年前
I would argue that this is not &quot;a Mastodon instance&quot;, since it is not running Mastodon - other than that, very very neat work! I&#x27;m excited for that &quot;Source Code&quot; link to be live :)
评论 #37137349 未加载
评论 #37138250 未加载
评论 #37137375 未加载
评论 #37137339 未加载
评论 #37137721 未加载
评论 #37138028 未加载
评论 #37137712 未加载
gfodor超过 1 年前
Something I&#x27;m immediately thinking about with this is change management and inertia at the early stages of a new, underdefined project. Less code is great, the big question is how such a system compares to the usual hack-and-slash method of getting a v1 up and running as you search for PMF from the perspectives of ops, cost, data migrations, rapid deployments, and so on. Presumably, the idea here is to start from the beginning with Rama, skipping over the usual &quot;monolith fetches from RDBMS&quot; happy paths, even for your basic prototype, this way you don&#x27;t slip into a situation like Twitter did where that grew slowly into an unscalable monstrosity requiring a rewrite. So an article focused on the &quot;easy&quot; part that&#x27;s required in the beginning of rapid change, as much as it&#x27;s not as important as the &quot;simple&quot; part that shines later at scale, seems useful.
评论 #37138299 未加载
yayitswei超过 1 年前
For context, nathanmarz created what is now Apache Storm, which is used for stream processing at some of the world&#x27;s largest companies, so he knows a thing or two about scale.
duped超过 1 年前
This is what they&#x27;ve been hyping on Twitter for a week?<p>FWIW, why hype at all? Why &quot;We&#x27;ll more in a week. Then more in two weeks.&quot; Show the code today!
评论 #37138975 未加载
jvans超过 1 年前
I have often thought along similar lines, that the effort involved in building software seems to indicate a level of abstraction that is missing. The general theme of the comments seems roughly what you should expect from a very bold, paradigm shifting proposal. Good luck with your efforts and don&#x27;t let this discourage you!<p>I will make one minor suggestion that I hope is constructive. I found the post difficult to read, largely because you rapid fire introduce a bunch of completely new concepts and propose a solution to many problems at once. You make a passing comparison to &quot;just event sourcing and materialized views&quot;, although this was the easiest way for me to understand what you are doing. Starting from event sourcing and materialized views puts the reader on a ground they already understand, and moving on from there to why rama is better&#x2F;what it adds on top, would be an easier transition.
评论 #37153526 未加载
ltr_超过 1 年前
i always had this question: how realistically is to, having an standard spec and interoperable protocols, for toxic apps of big international tech companies that provides &quot;&quot;&quot;services&quot;&quot;&quot;, so instances of implementations can be maintained by municipalities or local tech business and talent with 100x less employees and money? what policies should be in place to achieve that? what would be the challenges? it would be better&#x2F;healthier? is someone researching such things like transition to sustainable digital services? (sustainable in terms of local labor, privacy, economy, accountability, etc...)<p>i mean if you think about this as public services not as a business, profit is secondary, and first is just to make the thing better and better for the users, no need for spying , no advertisement, no need for a rich piece of shit somewhere getting a piece of the money paid in your city for every taxi drive, food delivery or to give up privacy to a soulless&#x2F;faceless entity just because you want to say something publicly or keep in touch with people. there is no disruption from their part, its just an old thing put on the internet, they are just in the middle of everyone&#x27;s life, just sucking everything they can. is the actual state of affairs &quot;efficient&quot;?<p>there must be fed up engineers and tech people everywhere with the sad state of IT industry.
评论 #37139164 未加载
endisneigh超过 1 年前
I don’t really see the point of the comparison. They should show something you could only make with Rama or show how much faster it is to iterate with Rama.<p>Saying this is 100 or even a million times cheaper is like saying taking a picture of Sistine chapel and printing out copies is a trillion times cheaper than making it originally.<p>Many of us on this site could make a number of products very efficiently and cheaply given a static and fixed set of requirements as well as an existing implementation for reference.<p>That being said it was a very detailed post, so kudos for that, but it’s far too vague to be actionable. Why not just release the code and post simultaneously instead of just bragging about how little code was required?
sixo超过 1 年前
The comparisons to Twitter are completely goofy, but the architecture is nothing short of enlightened. Nice work.
beefnugs超过 1 年前
I think the marketing idea of this is amazing : I would probably never even consider learning and reading about such a framework if I heard of it straight up. But if you are really releasing a usable open source implementation of something performant that actually federates properly, that is a huge selling point that buys you a ton of respect up front.
评论 #37149248 未加载
rubiquity超过 1 年前
Noticeably missing are any details about concurrency control and replication or recovery protocols. A Twitter clone is one thing but any sort of application needing ACID Transactions is a whole other beast.
评论 #37138042 未加载
elisbce超过 1 年前
The real reason why we can&#x27;t easily replicate Twitter&#x2F;Facebook&#x2F;Google is because we don&#x27;t have the distributed storage&#x2F;caching&#x2F;logging&#x2F;data processing&#x2F;serving&#x2F;job scheduling&#x2F;... infrastructures that they have built internally that are designed to provide some level of guaranteed SLAs for the desired scale, performance, reliability and flexibility, not because it is hard to replicate the application logic like posting to timelines. That&#x27;s also why Threads were built by a small team rather quickly -- they already have the battle-tested infras that can scale.<p>Any attempt to build a simplified version of the ecosystem will face the same fundamental distributed system tradeoffs like consistency&#x2F;reliability&#x2F;flexibility&#x2F;... For example, one of the simplifications may be mixing storage&#x2F;serving&#x2F;ETL workloads on the same node. And the consequence is that without certain level of performance isolation, it could impact the serving latency during expensive ETL workload.<p>For Rama to be adopted successfully, I think it is important to identify areas where it has the most strengths, and low LOCs might not be the only thing that matters. For example, demonstrating why it is much better&#x2F;easier than setting up Kafka&#x2F;Spark and a database and build a Twitter clone on top of that while providing similar&#x2F;better performance&#x2F;reliability&#x2F;extensibility&#x2F;maintainability&#x2F;... is a much stronger argument.
jauntywundrkind超过 1 年前
&gt; <i>The instance has 100M bots posting 3,500 times per second at 403 average fanout to demonstrate its scale.</i><p>Mastodon has to send messages to each instance with a recipient. That server can then fan out to all it&#x27;s subscribers. The way this point is worded makes me think all the bits are on just a single instance, meaning all the fan out can be dealt with internally without having to do any server-to-server at all.<p>That is a fair comparison to Twitter, which is single instance. But it sounds like a much reduced ambition versus the task Mastodon has to do.
评论 #37138060 未加载
cduzz超过 1 年前
I would hazard the guess that twitter&#x27;s &quot;show tweets to other people&quot; is 1&#x2F;40th of the functionality piled into twitter; some other large functions would be things like &quot;track ad sales&quot; or &quot;improve engagement&quot; or &quot;allow random law enforcement organizations to engage in whatever access is needed for any particular part of the world&quot; Each of those is going to be a huge pile of code and all of it working together is going to N! your complexity.
raverbashing超过 1 年前
They deserve congrats for that since they built the load test to prove this<p>Of course, for actual production use, there&#x27;s probably a lot of things still, but this is a very nice works nonetheless
评论 #37137443 未加载
gexla超过 1 年前
This is fascinating, and I&#x27;m glad to have come across it. And your story is inspiring. Thank you!<p>One question, why Google Groups rather than something like Discord? Not sure I would trust Google Groups to be around long.
primitivesuave超过 1 年前
The &quot;N bots posting X times&#x2F;second&quot; isn&#x27;t a very meaningful statistic. A system&#x27;s reliability is mostly characterized by its performance under stress.
NoahTheDuke超过 1 年前
Congrats! This looks super cool.<p>Are there any plans for exposing a Clojure API? Given that it&#x27;s implemented in Clojure, seems like it would be a natural fit. Interop with Java is nice but can be cumbersome compared to the more natural calling conventions and idioms (threading macros instead of `..` builder patterns, etc).
评论 #37139830 未加载
donavanm超过 1 年前
I appreciate the inversion&#x2F;melding of the data model and compute. Im curious to know your perspective on two parts: How would multitenancy fit in to rama? Using your mastodon example, providing “hosted mastodon instances as a service”, where you _also_ allow for data governance, per customer encryption at rest, user IDP support, etc. Is it multiple single tenant rama deployments, running independent customers? Multitenant rama clusters with shared depos and each pstate includes “tenant id”? Something else?<p>Second whats the product&#x2F;business angle on customer confidence, technical novelty, and your business core competency? A dated example but Im thinking of somewhere like basho with riak. Super cool tool, takes some mental adjustment to “get”, challlenges selling hosting vs software vs pro services.
评论 #37153669 未加载
nevi-me超过 1 年前
It sounds like the authors spent 10 years building a Twitter factory, and now they can produce a Twitter faster than Twitter could produce it &quot;by hand&quot;.
zubairq超过 1 年前
As someone who has worked in both startups and Enterprise IT for over 30 years (including large Java based systems) I see a use case for Rama in large companies who have a lot of difficulty glueing many different systems together to achieve scalability. So I think that Red Planet Labs could get several contracts in the 100k USD and over range in large Enterprises. This is for enterprises who have the problem of integrating many systems to achieve scalability and who are already large Java shops.<p>However, I do not see Rama&#x27;s initial market being startups, since they just want the simplest way possible to build UI + backend and want to iterate super fast with tech that their developers already know in the initial stages.
doublepg23超过 1 年前
HN seems to be putting you through the wringer, I for one am excited you guys made this and plan to open source it- it looks like a fantastic project.
评论 #37142125 未加载
评论 #37142939 未加载
runeks超过 1 年前
&gt; To demonstrate the scale of our instance, we’re also running 100M bot accounts which continuously post statuses (Mastodon’s analogue of a “tweet”), replies, boosts (“retweet”), and favorites. 3,500 statuses are posted per second, the average number of followers for each post is 403, and the largest account has over 22M followers. As a comparison, Twitter serves 7,000 tweets per second at 700 average fanout (according to the numbers I could find).<p>Is Twitters 7k tweets per second the average? If so, what’s the peak rate, and have you tested your system under this load?
wink超过 1 年前
Look, I don&#x27;t want to defend Twitter but ignoring 15 years of changes and the whole journey of scaling and then using the cost op just building a snapshot of the 15y old version is pretty disingenuous.<p>That&#x27;s a bit like starting an Oracle clone now and summing up what they spent on developer salaries in the last 40 years. You basically can&#x27;t not &quot;reduce costs&quot;.<p>And no &quot;the original consumer product&quot; is not a real cop-out, you probably still have tons of people building iterations.
beders超过 1 年前
This is a lovely and very detailed showcase in how to combine streaming+ETL+materalized-view+query!<p>That said: You need better advisors. Your investors and&#x2F;or the board gave you bad advice on how to publish these accomplishments and talk about them.<p>I hope your go-to-market strategy works out a little better. Hyperbole is fine, but at least on hacker news, the audience is a bit careful with regards to grandiose statements.<p>What might work well on an investor presentation might backfire when you target engineers as audience.
debadyutirc超过 1 年前
This is very interesting.<p>I saw the Twitter post first and the blog next. The premise is compelling but it&#x27;s been a promise made to the data and software world for decades together.<p>The architecture and the core primitives are something that we agree with a lot. Use cases and business value are a whole different ballgame.<p>We have invested the past 5 years at InfinyOn building Fluvio our open source rust implementation of core event streaming primitives which is implementing this architecture to orchestrate data as efficiently as computationally possible today. I am happy to see this project as an effort in the same direction.
_dwt超过 1 年前
Hmmm, &quot;Rama is programmed entirely with a Java API – no custom languages or DSLs&quot; according to the landing page, but this sure looks like an embedded DSL for dataflow graphs to me - Expr and Ops everywhere. Odd angle to take.
评论 #37137525 未加载
评论 #37137591 未加载
评论 #37137931 未加载
prepor超过 1 年前
Based on what I read it&#x27;s very similar to Kafka Streams + batteries ([semi]automatic workload orchestration, reactive queries, higher-level&#x2F;slicker&#x2F;&quot;smarter&quot; API (?))<p>Could you please compare Rama with Kafka Streams, especially from the point of view, if I would try to reimplement Rama API on top of Kafka Streams? What fundamental difficulties I&#x27;d face?
dustingetz超过 1 年前
Summarizing, now edited down with some editorializing for clarity:<p>What is it? build web-scale reactive backends with an expressive java dataflow API. Instead of a database you develop your own custom app-specific indexes which are reactive, distributed and durable. It&#x27;s like event sourcing and materialized views but integrated in a linearly scalable way.<p>&gt; <i>I cannot emphasize enough how much interacting with indexes as regular data structures instead of magical “data models” liberates backend programming</i><p>&gt; <i>It allows for true incremental reactivity from the backend up through the frontend. ... enable UI frameworks to be fully incremental instead of doing expensive diffs to find out what changed.</i><p>Ok, so in my mind I am positioning this against Materialized &#x2F; differential dataflow, whose key primitive is a efficient streaming incremental join that works across very large relational tables. Materialized makes SQL reactive, Rama gives you a java dataflow DSL for developing purpose-built reactive database indexes.<p>How it works? 4 concepts: Depot, ETLs, PState, Query<p>Depots: &quot;distributed, durable, and replicated logs of data.&quot; [Event streams?] &quot;like Kafka except integrated&quot; &quot;All data coming into Rama comes in through depot appends.&quot;<p>ETLs: data arrives via depots, and is ETLed to PStates via &quot;a Java dataflow API for coding topologies that is extremely expressive&quot;. &quot;Most of the time spent programming Rama is spent making ETLs.&quot;<p>PStates seem like reactive data structures that are also durable&#x2F;replicated, these are meant to supersede your database and indexes, letting you build custom purpose-built indexes that contain 100M elements:<p>&gt; <i>“partitioned states” are how data is indexed in Rama ... Unlike existing databases, which have rigid indexing models (e.g. “key-value”, “relational”, “column-oriented”, “document”, “graph”, etc.), PStates have a flexible indexing model. In fact, they have an indexing model already familiar to every programmer: data structures. A PState is an arbitrary combination of data structures. ... nested data structures can efficiently contain hundreds of millions of elements. For example, a “map of maps” is equivalent to a “document database”, and a “map of subindexed sorted maps” is equivalent to a “column-oriented database”. Any [composition] is valid – e.g. you can have a “map of lists of subindexed maps of lists of subindexed sets”.</i><p>Query: once you develop PStates to aggregate relevant data into a custom index of the right ... shape?, query seems sorta like GraphQL selectors over your custom index:<p>&gt; <i>Queries in Rama take advantage of the data structure orientation of PStates with a “path-based” API that allows you to concisely fetch and aggregate data from a single partition</i><p>&gt; <i>“query topologies” ... real-time distributed querying and aggregation over an arbitrary collection of PStates. These are the analogue of “predefined queries” in traditional databases, except programmed via the same Java API as used to program ETLs and far more capable.</i>
评论 #37144983 未加载
mariusor超过 1 年前
But this is not a Mastodon instance.<p>It&#x27;s something else that maybe speaks the Mastodon API and&#x2F;or ActivityPub, but we don&#x27;t know since it doesn&#x27;t really federate with anyone.<p>I commend the effort to try to make happen a non-open fediverse service, but appropriating the Mastodon name is just wrong. You should know better.
alexcpn超过 1 年前
Why choose Java of all languages. Why not something more modern and less verbose like Go or Rust. Just asking as I have worked enough in Java and then spend a lot of time in GC tunining. Granted the code was not that great and from a diverse team with different skill levels causing all the leaks.. But still
评论 #37144434 未加载
Huhuhn超过 1 年前
Would this framework also be useful for building a Lemmy instance?
samsquire超过 1 年前
Thank you for sharing this!<p>I am actually really impressed. Well done! Good work!<p>There&#x27;s lots of interesting lessons and knowledge in the design of this platform.<p>I also like how you&#x27;ve decided to use Java as your API rather than Clojure.<p>I hope you&#x27;re not discouraged by HN&#x27;s reaction to your hard work. Don&#x27;t be discouraged!
评论 #37153685 未加载
whateverman23超过 1 年前
ctrl+f &quot;ads&quot;<p>ctrl+f &quot;monetization&quot;<p>ctrl+f &quot;moderation&quot;<p>ctrl+f &quot;existing infrastructure&quot;<p>ctrl+f &quot;personalization&quot;<p>etc etc<p>Yeah about what I expect from a &quot;we rebuilt twitter for cheap&quot; post. There&#x27;s no point to the comparisons with the Twitter codebase size&#x2F;cost. It completely distracts from what is probably a perfectly fine project.
评论 #37137719 未加载
评论 #37138010 未加载
FridgeSeal超过 1 年前
Semi-related: Their homepage (<a href="https:&#x2F;&#x2F;redplanetlabs.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;redplanetlabs.com&#x2F;</a>) has to be one of the best looking websites I’ve seen in a while, buttery smooth as well. I love it.
评论 #37139628 未加载
jonstewart超过 1 年前
How does Rama differ from Flink and timely-&#x2F;differential-dataflow&#x2F;Materialize?<p>I see “microbatching” in the diagram and, maybe this isn’t a fair take, but it feels more 2013 than 2023.
Ryan_HD超过 1 年前
Another try of Event Sourcing + CQRS. I thought it was great but after so many years it&#x27;s still out of main stream. Lack of an integrated platform may contribute to, but can&#x27;t explain everything.<p>I guess most people can&#x27;t accept things which is fundamentally harder in such architecture than normal ones.
j45超过 1 年前
Just on system design alone this was enjoyable to read.<p>Clever architecture can help as much if not more than clever coding especially when keeping it simple but scalable is needed.
DigitalSea超过 1 年前
One of these posts. Dig into the numbers and claims, and you&#x27;ll see that they&#x27;re not building something anywhere near Twitter scale.
RHSman2超过 1 年前
Easy to copy something that has been done before and knowing what you want, need and responding to expected market traffic.
romgrk超过 1 年前
Really nice ideas here. The crucial advantage is having the storage+computation run as close as possible, which is a big advantage over a regular DB+app backend.<p>But I won&#x27;t ever consider investing in it unless it&#x27;s some form of open-source. It&#x27;s too much of a risk to have a closed-source core.
elwell超过 1 年前
No Clojure?<p>EDIT: Oh, I see in comments: &quot;The customer API in Java, and the implementation of that API is in Clojure&quot;
runeks超过 1 年前
Sounds like Rama is also useful for small scale applications (where high scalability isn’t needed), since it simplifies how they’re implemented.<p>Is this the case — ie. would a TodoMVC app implemented in Rama also be much simpler than a traditional frontend&#x2F;backend&#x2F;database CRUD implementation?
评论 #37151297 未加载
chiefalchemist超过 1 年前
&quot;We stood on the shoulders of giants...&quot;<p>X years from now &quot;We reduced the cost of building _____ at Mastodon-scale by 1000x&quot;.<p>It&#x27;s certainly interesting, certainly an accomplishment, but it&#x27;s also the nature of the game. The present eating the past, to be eaten by the future. Rinse. Repeat.
stuaxo超过 1 年前
Lovely, I could see this paradigm spreading to other languages, something was definitely needed.
crenwick超过 1 年前
Congrats on the launch. Great read.<p>Is there any rough infrastructure cost comparison?<p>Excluding the cost of engineering effort, which I understand is the major pitch.
2Gkashmiri超过 1 年前
whats the server specs of this demo running at?<p>is it baremetal?<p>vps?<p>how about doing a comparison on consumer grade vps like 1 vcpu&#x2F;4GB ram setup comparison between your product and mastodon or pleroma for example?<p>i mean sure you can build a twitter scale product but federation means people can do that on their own and with your tech, they dont have to worry about scaling issues.
boredumb超过 1 年前
neat read but I was expecting to read about twitter migrating and literally 100x savings being had.
评论 #37138607 未加载
kennydude超过 1 年前
You didn&#x27;t build Mastodon at Twitter-scale.<p>You built a Mastodon-compatible clone in Spring&#x2F;Reactor.
freecodyx超过 1 年前
Less code excluding dependencies
ketang超过 1 年前
It&#x27;s like Apache Camel if camels had 5 humps and 11 legs.
rugina超过 1 年前
Can you implement a web shop like Amazon using Rama?
lionkor超过 1 年前
Very interesting, looking forward to reading the docs once they come out.<p>Why Java?
评论 #37138327 未加载
评论 #37142449 未加载
throwaway892238超过 1 年前
Are people still thinking social media is a good thing? Hasn&#x27;t every study showed that it&#x27;s terrible for everybody?
mlindner超过 1 年前
But it’s not at Twitter’s scale?
say_it_as_it_is超过 1 年前
need to port this to Go...
itissid超过 1 年前
TL;DR: Chat GPT summary of 5 &quot;pages&quot; of the thing: <a href="https:&#x2F;&#x2F;chat.openai.com&#x2F;share&#x2F;bd6eac38-5bac-4c6f-b405-7ca7d8a9213e" rel="nofollow noreferrer">https:&#x2F;&#x2F;chat.openai.com&#x2F;share&#x2F;bd6eac38-5bac-4c6f-b405-7ca7d8...</a>
ceejayoz超过 1 年前
Headline: &quot;building Twitter at Twitter-scale&quot;<p>Article: &quot;building Mastodon at sub-Twitter-scale&quot;
评论 #37137407 未加载
评论 #37137406 未加载
评论 #37137384 未加载
phillipcarter超过 1 年前
In the year of our lord 2023, people are still launching immature products with &quot;we built a clone of a tiny subset of Twitter&quot; as their use case? Come on. Twitter is huge because they have to support a huge number of use cases. Using this proprietary framework won&#x27;t magically make complex use cases go away.
评论 #37137634 未加载
评论 #37137914 未加载
polishdude20超过 1 年前
&quot;We spent nine person-months building our scalable Mastodon instance. &quot;<p>Nono, you can&#x27;t say that when later on you say it&#x27;s built on top of Rama. You literally spent 10 years building the framework to even make this.<p>And yes, you built this in 10k lines of code but how many lines of code is Rama? This seems disingenuous.
评论 #37137804 未加载
评论 #37138044 未加载
评论 #37139176 未加载
评论 #37137847 未加载
评论 #37143037 未加载
评论 #37138739 未加载
评论 #37137900 未加载
sandGorgon超过 1 年前
nice! is this is cloudflare worker &amp; block storage built in Java ?
reset2023超过 1 年前
Don&#x27;t worry, chatGPT will do the same think in 1000 lines
sourcecodeplz超过 1 年前
Who cares. Mastodon was&#x2F;is destined to fail. Trigger happy mods ban you from a server, then you&#x27;re banned from a bunch.
评论 #37140426 未加载
评论 #37139847 未加载
LeifCarrotson超过 1 年前
&gt; How is it possible that we’ve reduced the cost of building scalable applications by multiple orders of magnitude?<p>&gt; You can begin to understand this by starting with a simple observation: you can describe Mastodon (or Twitter, Reddit, Slack, Gmail, Uber, etc.) in total detail in a matter of hours. It has profiles, follows, timelines, statuses, replies, boosts, hashtags, search, follow suggestions, and so on. It doesn’t take that long to describe all the actions you can take on Mastodon and what those actions do. So the real question you should be asking is: given that software is entirely abstraction and automation, why does it take so long to build something you can describe in hours?<p>&gt; At its core Rama is a coherent set of abstractions...<p>This conclusion is alarming to read from a company that&#x27;s trying to sell a new platform. The vast majority of the work in building Twitter or Reddit is not about building a coherent set of abstractions, it&#x27;s working with an often incoherent reality, dealing with a myriad of laws that describe, as if your web app were a human clerk at a post office, how to handle PII and credit cards and CSAM filters and audits and copyright claims and on and on...<p>I&#x27;m honestly shocked that the technical implementation of a simplified, coherent platform took a full 9 person-months. That shouldn&#x27;t be the hard part. What I&#x27;d want to know as a prospective customer is how you handle exceptions to your beautiful, idealized architecture, when some foreign country requires that you only store comments posted by their citizens within their borders or something like that.
评论 #37137417 未加载
评论 #37137568 未加载
评论 #37137539 未加载
评论 #37137469 未加载
riffic超过 1 年前
the group involved here may want to be mindful of the Mastodon gGmbH trademarks. Using the Mastodon logo on redplanetlabs.com to pitch a reimplementation of ActivityPub might be seen as infringing.<p><a href="https:&#x2F;&#x2F;joinmastodon.org&#x2F;trademark" rel="nofollow noreferrer">https:&#x2F;&#x2F;joinmastodon.org&#x2F;trademark</a><p>removed part about the mastodon subreddit since this is clearly not about the Mastodon software per se.
评论 #37137887 未加载
throwaway7382超过 1 年前
Their big reveal after 10 years is &quot;keep waiting&quot;.<p>Move along, nothing to see here.
评论 #37138099 未加载
trollied超过 1 年前
&gt; We spent nine person-months building our scalable Mastodon instance.<p>+ the time spent creating Rama, the platform that enables it.<p>Very dishonest leaving that out.
评论 #37137496 未加载
评论 #37137524 未加载
MisterBastahrd超过 1 年前
What one finds useful from a web application and what the web application actually is are usually two entirely different things.<p>I work in marketing automation, and I guess I have in one way or another my entire career. The clients who need to use the platform to communicate with their own clients over social networking may never touch our print delivery system, but that doesn&#x27;t mean that print delivery doesn&#x27;t exist or isn&#x27;t important.<p>If you are unwilling to recreate the totality of the application in terms of functionality, then you are lying if you say that you have recreated it.
评论 #37137690 未加载