15 ms·
In Defense of Simple Architectures (2022)
- wodenokoto 3y ago> Our architecture is so simple I’m not even going to bother with an architectural diagram. Instead, I’ll discuss a few boring things we do that help us keep things boring. Maybe that is why everyone goes with the the latest and greatest sophisticated techniques that are popular on the conference circuit. At least it has a diagram.
- corpMaverick 3y agoThat is indeed part of the problem, complex architectures sell better. The problem comes when you have to deliver. But you can always blame the team.
- sudhirj 3y agoThink there's lot of examples of the Fortune 5000 just being a single Rails or Django app for the longest time. Seems in line with the we're soon going to see a single person billion dollar company narrative.
- gherkinnn 3y agoI'm going to agree with Dan Luu by asking where I can find more of these sane companies. I want to spend an honest 6h a working day improving a product (Terraform and Webpack are not the product) and spend the rest of my time tending to my garden.
- zer00eyz 3y agoYou aren't looking for a job. You're looking for a lifestyle business. They are great. You will get time in the garden, that's awesome. Vacation someplace with no phones? Out of the question. Weekend in a 3rd world country with character and food and sketchy internet. Not gonna happen. You want to optimize for free time in the garden by all means you can do it, but you loose out in other places, you pick up other work (taxes, systems etc). Edit: Down vote away, I live this life now, my tomatoes are delicious and I make yogurt too!
- notso411 3y ago[dead]
- nickserv 3y agoNot sure I understand your point. I do my work, doing development work and managing a small team. Still never work weekends (no phone, no email, no slack), spend time in my garden and just came back from a no-phone vacation. Salary is above the going rate where I live - the work is remote and salary is based on company headquarters. Taxes are in line with the country I live in. Not really seeing any downsides here, and as expected morale is quite good overall at work... But finding this company was extremely lucky/difficult.
- bluGill 3y agoI learned long ago that I cannot write quality code for 8 hours per day. I need to have several hours of meetings every day just to ensure I don't overdo the coding and write bad code. Sure I can write code for 14 hours a day, but it will be bad code, sometimes even negative productivity as I introduce so many bugs.
- lovebes 3y agoMay I get some more information on how you went into lifestyle business? Looking to get into that as well.
- zer00eyz 3y agoI know several folks with niche business that pay various levels of their bills. Software for youth sports, photography, asset tracking, vendor tracking, niche issues in CC Processing, facets of insurance and billing (coding). Niche businesses happen all over the place, and finding one (for me) was a lot of trial and error, that niche business pays my "bills" and I do consulting work (sporadic, interesting and high value) to round it out (and keep me on my game). Dont think of it as a business right away. You're going to "play", you want to build them quickly, you want to host them cheaply, you want to toy with selling them. Your managing disappointment and failure, your learning lessons and keeping it FUN. The moment you start dreaming that it's going to "make it big" is the moment you have to reel yourself back to reality. If you can say "what did I learn" and have a list of things you got from it then it was a success. At some point you just find one that clicks and it grows.
- corpMaverick 3y agoI am with you. Complex architectures where you have to fight it even for simple changes is a recipe for burn out as you paddle and paddle and you are stuck in the same place.
- LispSporks22 3y agoI think about this almost daily while slogging away in hundreds of lambdas, working on the world’s slowest app server. I think maybe 10% of our effort rubs off as business value. Maybe less.
- throwawayanothe 3y agoWrites simple and then drops GraphQL and K8s.
- disgruntledphd2 3y agoBoth of which are justified in the post. Like, complexity where it makes sense is a good thing, especially if that complexity brings benefits. Complexity for the sake of complexity is foolish.
- dawnofdusk 3y agoEnough of this strawman one-liner "complexity for the sake of complexity". Unnecessary complexity is introduced because someone once thought it was necessary. It may not be necessary anymore, or (even worse) it might have not even been necessary at the time and the person who introduced it was just wrong. But all complex architectures start because people think it will bring benefits.
- deleted 3y ago[deleted]
- disgruntledphd2 3y agoAgreed, but I rarely see this work out, even in the short term. It certainly seems like complexity for its own sake, and someone once told me that our system was embarrassingly simple so that's why they introduced a load of complexity. Sigh.
- mrkeen 3y ago> someone once told me that our system was embarrassingly simple so that's why they introduced a load of complexity. This exceeds my ability to suspend disbelief.
- djur 3y agoYou can't imagine someone saying "look at this system, it's totally basic, programming 101, clown shoes, baby's first web service, probably made by a PHP coder, not enterprise-class at all, we need to put on our big-boy pants, I read some whitepapers from thought leaders at FAANG and we need to implement..."
- rugger 3y agoMonolith is fine if you have a fairly simple process for manipulating your data. Like posting an article, then a comment, with some moderation thrown in. But when you start adding business rules, and start transforming your data and moving it around, then your monolith will become too complex and often too expensive to run. Lots of moving parts tightly coupled together, long-running transaction wrapping multiple joined tables etc. Rolling out new features will become very challenging as well. Something like event sourcing is more complex to set upfront than a monolith, but at least it offers the way to add scale and features later without creating a combinatorial explosion...
- gherkinnn 3y agoMost CRUD software is little more than the simple processes you describe. At least intrinsically. And if it isn't, it started off being that.
- nickserv 3y agoIronically, business rules are often much easier done in a monolith, since they tend to require access to basically the entire database, and have impact across your code base. Not saying it needs to be spaghetti all over the code mind you. Just that it's easier to have a module within the monolith rather than a dedicated service.
- kaba0 3y agoEspecially that it must be fun hunting down race conditions across microservices. Like, microservices throw away every benefit of a single code base in a single language (and its guarantees). They sometimes make sense, but arguably that sometimes is quite rare.
- metricspaces 3y agoThe conversation in this (overall) thread is dancing around issues of experience,competence, and maturity. And the age ceiling forcefully pushed by people like Paul Graham of this very HN. When your entire engineering team are “senior developers” with 3 years of experience (lol) and most don’t even know what a “linker” does, the fundamental feature of the wunder architecture is obscure and not understood. Building effective monoliths absolutely demands competent DB experts, schema designers & developers. The problem that microservices solved was the sparsity of this sort of talent when demand overshot supply by orders of magnitude. (In a way the monoloth vs microservices debates are echoes of the famous impedance mismatch between object graph runtimes and relational tables and DBMSs.)
- zer00eyz 3y agoEarly in my career one of the IT guys told me that one of the people on staff was "a technical magpie". I looked at him with a raised eyebrow and he said "He has to grab every shiny piece of tech that shows up and add it to the pile". This is where we are. I can't tell you how many times I have seen projects get done just to pad a PM or developers resume. Just because it was the lastest and greatest hot shit thing to use. No sense of if it would be better, faster, cheaper, useful. When cloud was the hot new thing the company that I worked with launched a replatform on AWS. It gave us the ability to get through the initial scaling and sizing with ease. We left right away, because even then the costs did not make sense. Now we see folks crying about "exit fees" that were always there. That assumes that your institution even has the gall to own years of pissing away money. Workman like functionality isnt sexy, it wont be the hot bullet point on your resume, it wont get you your next job, but it is dam effective.
- robertlagrant 3y agoI understand that's your opinion, but could you show me some badly designed user research results to make this conversation more data driven?
- blueflow 3y ago> more data driven Any other engineering discipline. What are common practices in IT would be negligence in other disciplines and might get your permit/license removed. IT is the only sector where companies like Cisco or SAP can exist despite the horrible reliability of their products.
- Shrezzing 3y agoI'd argue that this article could be read more like "start as a monolith, and then move towards microservices when sensible", except the penny hasn't fully dropped for the author that the sensible time for their organisation is right now. The company appears dogmatically locked into their idling python code, their SQL making unpredictable commits, and their SQL framework making it difficult to make schema migrations. This is a financial services company describing data-integrity bugs in their production platforms.
- mousetree 3y agoThese are all specific problems that can be individually solved. Personally I don’t see how changing their architecture or programming language would solve those
- nijave 3y agoIn addition, they risk introducing new problems they already solved with their current setup
- wavemode 3y agoIn what way does "moving towards microservices" relate to solving "data-integrity bugs"? I would argue the opposite - the more distributed you make the system, the more subtle consistency bugs tend to creep in.
- simonbarker87 3y agoOur stack is a NestJS server, Handlebars templates for SSR, htmx and a PostgresSQL database. Deployed as a container on GCP Cloud run with a Github action. It's delightful to work on and very responsive in a way that a React app with the same data load wouldn't be. At this point it would take a pretty massive reason to get me to adopt the SPA approach again.
- namaria 3y agoI usually also use Cloud Run for running my containers. But I use Cloud Build instead of GH Actions. I'm curious, what's your reasoning? I prefer my repository to just hold code and run build actions close to where it's deployed.
- infecto 3y agoFor me, I had use GH Actions before so it was pretty quick to get up and running. I am sure it was not that much more effort to use a cloud build tool in GCP or AWS but honestly don't see that much of a pro/con.
- namaria 3y agoI guess in my view depending on GH actions means if it's down I'm blocked but if it's just a repo I can always point my build system to a different one. I have never experienced GCP being down and would bet it has better overall uptime than GH...
- simonbarker87 3y agoYou’re right, I miss spoke, I use Cloud Build triggered by a GitHub merge to main or staging. So not an action, a trigger from GitHub to GCP.
- infecto 3y agoFastAPI, Jinja, htmx and Postgres here. Simple to add features, not sure I would use a SPA or other similar JS heavy framework unless I had a feature requiring it.
- deleted 3y ago[deleted]
- 2d8a875f-39a2-4 3y agoI agree with the general sentiment that simple architectures are better and monoliths are mostly fine. But. I've dealt with way too many teams whose shit is falling over due to synchronous IO even at laughably low volumes. Don't do that if you can avoid it. "Subtle data-integrity bugs" are not something we should be discussing in a system of financial record. Avoiding them should have been designed in from the start.
- from-nibly 3y agoYeah I'm with this guy right up until that last statement. You should have 0 of these. Not an increasing rate of them.
- lelanthran 3y ago> shit is falling over due to synchronous IO even at laughably low volumes. Like? I ask because even synchronous IO let's you serve millions of requests per month on a cheap VPS. That's enough in the b2b space to keep a company of 1000 employees in business.
- 2d8a875f-39a2-4 3y agoUntil one of your IO destinations develops some latency. Or your workflow adds a few more sync IOs into each request. Or you suddenly run outta threads. Then even if you're only at millions per month you've probably got problems.
- lelanthran 3y ago> Then even if you're only at millions per month you've probably got problems. Not in my experience. You may be using metrics for B2C websites which make $1 for each 1 million hits. B2B works a little differently: you're not putting everyone on the same box, for starters. I did some contract maintenance for a business recently (had no tech staff of their own, had contracted out their C# based appdev to someone else decades ago and just need some small changes now), and a busy internal app serving about 8000 employees was running just fine off a 4GB RAM VPS. Their spend is under $100/m to keep this up. No async anywhere. No performance problems either. So, sure, what you say makes sense if your business plan is "make $1 of each 1 million visitors". If you business plan is "sell painkillers, not vitamins" you need maybe 10k paying users to pay yourself a f/time salary.
- snapey 3y agoI really think Clojure should be recognised as boring tech more than it is. It seems to have drifted out of public discourse in the last couple of years, which is a shame because it's a rock solid, simple, predictable language that would make an excellent choice for many use cases. It's just a shame that the syntax will forever be a barrier to widespread adoption.
- samatman 3y agoI don't think the syntax is the main consideration with Clojure. It's an opinionated language: dynamic, with immutable data structures, hosted on the JVM. I like it quite a bit, personally, and it's been adopted in places where it makes sense. But many-to-most projects are better off picking another runtime, and the syntax has little to do with why.
- mh- 3y agoIMO: Part of boring tech is that it's easy to learn and therefore, usually, easy to hire for. Clojure ticks neither of those boxes, unfortunately.
- glenjamin 3y agoIn my opinion the best antidote to overly complex architectures is to have engineering teams and the engineers in them be rewarded based on actual business outcomes. I suspect the era of VC-money and ZIRP led to a large number of engineers who were disconnected from successful long-term business outcomes, so there was no incentive to simplify.
- jedrek 3y agoThis only makes sense if the engineering teams own the process from end to end, at which point they stop being engineering teams.
- throwaway2037 3y agoI agree. In my experience, this exists in a few, rare (investment bank) trading floor technology teams. From a distance, it looks like traders who are programmers.
- glenjamin 3y agoA sales team gets measured on the sales they make - but they don't own the end to end process of building the thing that they're selling. It's entirely possible to measure teams on business outcomes without having them own things end-to-end, but to be really effective in this they'll need to collaborate with the other teams across the company - which is generally a desirable outcome.
- throwaway2037 3y agoWhat is this obsession on HN about "everything can explained with the end of ZIRP" (zero interest rate policy)? Really: Even with overnight rates at 5%, the returns are still awful compared to even moderatly successful VC firms. And, I do not write this as a fanboi/gurl for VCs. (Many have shitty, immoral business practices to enrich themselves at the expense of hard-working non-executive staff.) Also, "end of VC-money": No such thing. They are practically bursting at the seams with uninvested money gathered during ZIRP.
- 3y ago
- mrkeen 3y ago> our architecture is a standard CRUD app architecture, a Python monolith on top of Postgres The rest of the article goes into why the above is not the case. The language was chosen because it was the CTO's pet, not for simplicity's sake. It wasn't the right choice: "its concurrency support, performance, and extensive dynamism make us question whether it’s the right choice for a large-scale backend codebase" Synchronous/blocking wasn't chosen for simplicity's sake - the async libraries were buggy! To work around the performance issue: 1) a "custom protocol that runs on top of UDP" was written. No thanks. 2) putting work onto a queue. Event-sourcing, anyone? > we’re having to split our backend and deploy on-prem to comply with local data residency laws and regulations It's good that the software was a monolith, otherwise it would have been difficult to split apart /s. Software is incidental complexity and essential complexity. If you shun certain things as 'too complicated', but they end up being in the essential complexity bucket, you're just going to be building them yourself, slower and with more bugs. Imagine how different the article would have been had they picked technology whose concurrency, performance and typing worked in their favour.
- yowlingcat 3y agoWhich language with those characteristics will have the same package ecosystem as Python so that your engineering team isn't left constantly reinventing the wheel? Do you think it's worth rebuilding stable packages that do a job well just because you don't think the language it was written in was perfect?
- xnorswap 3y agoOne answer to your question is C# / .Net. Combines excellent concurrency primitives, very good performance, and a deep reservoir of packages and libraries. Of course it's almost never worth switching languages for an existing product, you just get left with a mess of half-old and half-new tooling and invariably get left having to support both languages.
- throwaway2037 3y agoReal question: From your specific comment, are there any advantages of C# vs Java here?
- from-nibly 3y agoThis is what I tell engineers. Microservices aren't a performance strategy. They are a POTENTIAL cost saving strategy against performance. And an engineering coordination strategy. Theoretically If you have a monolith that can be scaled horizontally there isn't any difference between having 10 replicas of your monolith and having 5 replicas of two microservices with the same codebase. UNLESS you are trying to underscale part of your functionality. You can't underscale part of your app with a monolith. Your pipe has to be big enough for all of it. Generally speaking though if you are talking about 10 replicas of something there's very little money to be saved anywhere. Even then though the cost savings only start at large scales. You need to have a minimum of 3 replicas for resiliency. If those 3 replicas are too big for your scale then you are just wasting money. The place where I see any real world benefit for most companies is just engineering coordination. With a single repo for a monolith I can make 1 team own that repo and tell them it's their responsibility to keep it clean. In a shared monolith however 0 people own it because everyone owns it and the repo becomes a disaster faster than you can say "we need enterprise caching".
- scient 3y agoServices, or even microservices, are more of a strategy to allow teams to scale than services or products to scale. I think thats one of the biggest misconceptions for engineers. On the other end you have the monorepo crew, who are doing it for the same reasons. On your note about resiliency and scale - its always a waste of money until shit hits the fan. Then you really pay for it.
- manicennui 3y agoExcept that most people build microservices in a way that ignores the reality of cloud providers and the fact that they are building (more) distributed systems, and often end up with lower resiliency.
- dns_snek 3y agoHow do you square that with the fact that shit usually hits the fan precisely because of this complexity, not in spite of it? That's my observation & experience, anyway. Added bits of "resiliency" often add brand new, unexplored failure points that are just ticking time bombs waiting to bring the entire system down.
- hardware2win 3y agoIm always interested in comparison between top adult sites and netflix
- throwaway2037 3y agoI don't understand this comment. Can you explain more?
- hardware2win 3y agoNetflix always writes those engineering blogs about their fancy microservices and infra Meanwhile adult sites probably run on some boring php and serve orders of magnitude more content (harder to cache) while being free and top visited sites in the world
- alanjdev 3y agoI think these kinds of articles are a bit glib. Developers implement architecture to solve problems confronting them. Sometimes a new problem then arises which must be dealt with, and so on, until the architecture in hindsight is quite complex. But you can only know this in hindsight. A few companies didn't run into the "piling on" of issues to be fixed, and so look back in hindsight, see their simple architecture, and think, "we know something that everybody else doesn't," when in fact they're simply experiencing some form of survivorship bias.
- bluGill 3y agoArchitecture isn't done to solve problems confronting you now, it is about solving problems you will face in the future if you don't solve them now.
- yogsototh 3y agoI am very glad of the architecture we use at my current company. This is a monolith, BUT with the capacity to be deployed as microservices if needed. The code is structured in such a way that you only start the sub services you need. We have node that launch almost all services, some only a few. If we need to scale just a particular part of the system we can easily just scale the same node but configuring it just for the sub services we need.
- tamarlikesdata 3y agoMicroservices aren't just about breaking apps into pieces; they're about making each piece independently scalable, deployable, and manageable, which is huge for continuous deployment and integration. Sure, they add complexity, but for big, dynamic projects, that trade-off is worth it.
- throwaway2037 3y ago> For example, at a recent generalist tech conference, there were six talks on how to build or deal with side effects of complex, microservice-based, architectures and zero on how one might build out a simple monolith. Queue my favourite talk about microservices: David Schmitz - 10 Tips for failing badly at Microservices [1] This guy has amazing delivery -- so dry and funny. He spends 45 minutes talking about all of his microservices mistakes! [1] https://www.youtube.com/watch?v=r8mtXJh3hzM https://www.youtube.com/watch?v=r8mtXJh3hzM
- devjab 3y agoMonoliths aren’t very useful in many organisations where you need to build and connect 300+ systems. They also stop having simple architecture if you try. Most architecture conferences and talks tend to focus more on the enterprise side of things, and really, why would you need full time software focused architects if you’re building something like stackoverflow. I do think things have gotten a little silly in many places with too much “building like we’re Netflix” because often your microservices can easily be what is essentially a bunch of containerised monoliths. I think the main issue is that your IT architecture has or should have) very little to do with tech and everything to do with your company culture and business processes. Sometimes you have a very homogeneous focus maybe even on a single product, in which case microservices only begin to matter when you’re Netflix. Many times your business will consist of tens-thousands of teams with very different focuses and needs, and in these cases you should just never do monoliths unless you want to end up with a technical debt that will hinder your business from performing well down the line.
- bluGill 3y agoBuilding like NetFlix is better than random unguided architectures that result from not thinking. It might not be the best for your problem though. If you don't need thousands of servers, then the complexity that Netflix has to put into their architecture to support that may not be worth the cost. However if you do scale that far you will be glad you choose an architecture proven to scale that large. However I doubt Netflix has actually documented their architecture in enough detail that you could use it. Even if you hire Netflix architects they may not themselves know some important parts (they will of course know the parts they worked on)
- nercury 3y agoIt pains to see the need for a microservice to even start thinking about system architecture. As if the additional database and additional set of classes could not be done on the same instance. And then everyone shrieks in pain when they see the monthly costs :)
- throwanem 3y agoI might be fully past the idea that what makes the difference is the architecture rather than the team. I am certainly past the idea that monoliths impose any kind of barrier to complexity. In many ways I find it to be precisely the converse. Sure, there's nothing meaningful to choose between one giant plate of spaghetti versus a dozen small plates flying in loose formation. I'd still rather have lasagna than either.
- pvdoom 3y ago> I might be fully past the idea that what makes the difference is the architecture rather than the team. SO much yes. You may have the prettiest architecture, and the best separation of concerns, and the most modular modularity, but if you don't have the right competencies, processes and people all that would go out the window before you can even finish the power point slides showing off your nice new architecture. It's like a garden - if you don't tend to it, it turns into a mess, and the fight against entropy never stops. If you also have to fight the team along the way you've already lost
- deleted 3y ago[deleted]
- bunderbunder 3y agoI think a lot of this comes from the additive cognitive bias, which is really deeply entrenched in most of our thinking. Here's a concrete example, stolen from JD Long's great NormConf talk, "I'd have written a shorter solution but I didn't have the time", which is itself drawing from "People systematically overlook subtractive changes" by Adams, et al., 2021: Give people a Lego construction consisting if a large, sturdy plinth with single small spire supporting a platform on top. The challenge is to get it to reliably support a brick. As is, it will collapse because that little spire is so flimsy. Ask participants to modify the structure so that it will support the brick. Incentivize simpler solutions by saying that each additional brick costs $0.50. Given just this information, people universally try to fix the problem by adding a bunch more bricks to overbuild the structure, and they spend a lot of energy trying to come up with clever ways to reduce the number of bricks they add. But then the research team makes one small tweak to the instructions: they explicitly point out that removing bricks doesn't cost anything. With that nudge, people are much more likely to hit on the best solution.
- perrygeo 3y agoIn software, it's clear why we don't prefer subtractive changes - complexity. If there's any chance that the code in question has non-local effects that can't be reasoned about at the call site, it's risky to make subtractive changes. Additive changes have the advantage of having a corresponding additive feature to test - you don't need to touch or even understand any of the existing complexity, just glue it on top. So the cost structure is likely inverted from the study you describe. Additive changes are (locally) cheap. Subtractive changes are potentially expensive.
- hiAndrewQuinn 3y agoThis is a big factor in why Haskell is widely considered a really fun language to refactor in. The enforced purely functional paradigm makes adding nonlocal effects much more annoying, so later contributors can much more confidently reason about the state of their code (assuming you can find any later contributors in such a small community!). I don't know whether the Lisps have a similar "fun to refactor" quality to them, since while they are in the functional camp, they're totally different and more flexible beasts architecturally.
- whizzter 3y agoAs a young gun coming from working in games before touching "internet"/"enterprise" software back around 2006 I had an eye on performance matters and all the early Google papers caught my eye (esp as I was on a project with an overpositive sales CEO that had in his mind that we'd run to Google valuations within a year). A sobering account was our second CTO who told us that their previous 65000 user application ran on a single database/server, so for the rest of that project we just kept most our application on a single DB and focused on tuning that where needed.
- hannofcart 3y agoI work at a company with several 100k MAU. Single db + 1 standby replica. No problems. I believe even Stackoverflow used to run on something similar, not sure.
- palata 3y agoI believe it is as easy to over-engineer as it is to under-engineer. Architecture is the art of doing "just enough"; it must be as simple as possible, but as complex as necessary. But that is hard to do, and it takes experience. And one thing that does not describe the IT industry well is "experience": don't most software developers have less than 5 years experience? You can read all the books you want and pass all the certifications you can like a modern Agile manager, but at the end of the day you will have the same problem they have: experience takes time. Inexperienced engineers throw sexy tech at everything, inexperienced manager throw bullshit Agile metrics at everything. Same fight.
- geodel 3y agoWell I have seen lot of people with 20 years of experience which is actually 2 year experience repeated 10 times.
- palata 3y agoThat's not what I am saying. I am saying that you cannot make 20 years of experience in 2 years. You are saying that some people with 20 years of experience are worse architects than others.
- bjornsing 3y ago> Architecture is the art of doing "just enough"; it must be as simple as possible, but as complex as necessary. Or as Albert Einstein phrased it: “Everything should be made as simple as possible, but not simpler!”
- jimnotgym 3y agoI got told the other day that an ecommerce to ERP integration I built 8 years ago at a company I don't work for anymore, is still running without so much as a reboot. Apparently it is on it's third different website with no changes. Linux, Bash, Python FTW. Everything was designed to be as simple as humanly possible. I mostly built it in my spare time too. I once showed it to a real developer and he was horrified that some long messages that had to be sent were hardcoded into a file and concatenated to the one bit that changes...it was my prototype that worked so well I never changed it. It only ran every 15 minutes, since all the systems that depended on the order ran less frequently than that. Everything was handled sequentially, and quite deliberately so. It actually had a lot of functionality it gained over a couple of months, it had to print some stuff, detect fraud, fix addresses etc. My favourite bit is that several companies had offered to build it for £mega and decided it couldn't be done! I wish I could describe it in full...
- ericholscher 3y agoStrongly agree here. We wrote a similar post on how we’re scaling to a pretty big size with stock Python and Django: https://www.ethicalads.io/blog/2021/07/handling-100-requests-per-second-with-python-django/ https://www.ethicalads.io/blog/2021/07/handling-100-requests... So much of the content around the programming web is about huge scale and domain-specific stuff. We’re in a pretty magical place where the core technologies we use can scale to the size of a successful business without much work. We should promote that more!
- mxstbr 3y ago> Default GQL encoding is redundant and we care a lot about limiting size because many of our customers have low bandwidth I'd love to know how you ended up combating this! I'm assuming something like graphql-crunch[0] or graphql-deduplicator[1], but I'd love to know what worked well in practice. [0]: https://github.com/banterfm/graphql-crunch https://github.com/banterfm/graphql-crunch [1]: https://github.com/gajus/graphql-deduplicator https://github.com/gajus/graphql-deduplicator
- mattbillenstein 3y agoLEPP stack is very effective imho - Linux, Nginx, Python, Postgres. I've solved a lot of the issues he brings up - gevent, no orm - well-known transaction boundaries, etc. It's pretty pleasant to work in.
- ranjanprj 3y agoMicro services is a deployment pattern and not a development pattern you could build monolith and expose various services to and various parts with an Ingress and point of to the same monalic and for example in java project these various end points of the services inside the same on it would only load up the classes/objects which are relevant to that service. There is no overhead in terms of memory or CPU by placing monolith as micro services exposed by end points
- randomdata 3y agoMicro services is a team organization pattern, emulating the software service model, except within a micro economy (i.e. a single business). In practice, this means that teams limit communication to the sharing of documentation and established API contracts, allowing people to scale without getting bogged down in meetings.
- brodouevencode 3y agoCould it be that deployment patterns and team organization patterns are the same thing, especially in this age of build-run teams?
- randomdata 3y agoConway might find some correlation, but strictly speaking, no. A service is not bound to any particular deployment pattern. Consider services in the macro economy. Each individual business providing a service is bound to do things differently. As micro services are merely emulation of macro services in the micro, each team is equally free to do things however they wish.
- treflop 3y agoThe problem is that most people have never actually built something in all the architectures they are considering. They just read blog posts of what to do. As an analogy, I’ve manufactured a lot of stuff out of wood, concrete, plastic (3D printed) and increasingly more metal. When I need a jig, I know what each material will be like and what I will be getting out of it.
- bluGill 3y agoIf I tell you that clay is better for your next project then you don't know enough. Am I right or wrong - should you invest a lot of money into clay equipment, and time into learning to use clay? You need to make a decision based on what others say about the advantages of clay - maybe clay isn't better, maybe it is better but not by enough to be worth learning. If this is just for fun maybe you say you want to learn clay so you spend months learning to do it, but if this is for a job your really wants some confidence that clay is worth learning before investing your time to learn it.
- treflop 3y agoWell if my day job is building stuff and it’s the reason I picked this career and it seems companies pay $$$$, give great benefits, and lets me take 2-4+ week vacations wherever I want if I’m good at it, and going to work is great because everyone gives you the fun problems knowing very well you know your shit… Yes, it's worth learning a little about clay. Maybe I'll even enjoy it. (And I know you’re trying to make an example, but I have already looked into clay a bunch of times. Clay just doesn't have the material properties that my projects tend to need. It'd be like learning COBOL expecting to build front-end apps.)
- lovebes 3y agoEven his website follows simple HTML stack architecture
- dimgl 3y agoInteresting article on simplicity because halfway through is a massive plot twist in which author attempts to justify using GraphQL and k8s.
- brodouevencode 3y agoBut he does attempt to make a point about that in the end. I don't agree with the point, but at least he tried.
- brodouevencode 3y agoI get Dan's desire for minimalistic styling but a little margin around the page would be nice for readability purposes. But on a more contextual note: I would contend that microservice architectures are in effect much simpler than monoliths. The UNIX philosophy of small tools that do one thing well is still very applicable. It's easier to deploy small changes quickly than the massive deploys that could take significant amounts of time. Deploying to a FaaS is quick and easy for almost all things. If your product requires complex coordination/orchestration just as an operational modality then I'd question the value of that product design regardless of architecture type implementation, even for web-scale products. AND this is really a different discussion.
- lolinder 3y ago> The UNIX philosophy of small tools that do one thing well is still very applicable. It's easier to deploy small changes quickly than the massive deploys that could take significant amounts of time. The UNIX philosophy was conceived in the context of a single computer—with dynamic linking the cost of splitting out a new binary is close to zero, so making each module boundary an executable boundary makes some degree of sense. In the context of a cloud computing network, there's a lot more overhead to splitting out a million tiny modules. Cloud service provider costs, network latency, defending against the possibility of downtime and timeouts—these are all things that UNIX programs never had to deal with but that are everyday occurrences on the cloud. The trade-offs are very different and so the UNIX philosophy is not equally applicable. You have to weigh the benefits against the risks.
- brodouevencode 3y ago> In the context of a cloud computing network, there's a lot more overhead to splitting out a million tiny modules. Don't get me wrong - this can be taken to an extreme and from my experience the places where MS seems to fail (the service is not used, or hated by the engineering teams) is in scenarios where it was absolute overkill. > The trade-offs are very different and so the UNIX philosophy is not equally applicable. There is a reasonableness standard that exists in both contexts and applies to both in the same way.
- deleted 3y ago[deleted]
- emseetech 3y agoArguing for simple architectures is hard. Everyone wants to argue that yes, they ARE going to need it. Maybe not now but someday, therefore they should have it. Always reminds me of this scene from Arrested Development. https://www.youtube.com/watch?v=VVtOkX-gUxU&t=132s https://www.youtube.com/watch?v=VVtOkX-gUxU&t=132s
- bluGill 3y agoI've been in the situation where someone argued we didn't need something so go simple - turns out they were wrong (isn't hindsight nice) but now the system was based around this incorrect assumption and really hard to rework into the thing we needed. This is why architecture is hard. It is about making the decisions in advance that you will regret getting wrong.
- emseetech 3y ago> now the system was based around this incorrect assumption How big of a userbase and what made it particularly difficult to refactor?
- bluGill 3y agoI work on embedded systems so userbase isn't really a concern. However we have > 10 million lines of C++, and the change would have been a major refactoring of most of them.
- emseetech 3y agoSo I'm assuming this decision was made quite a while ago? Years, maybe even over a decade?
- bluGill 3y agoIt took a decade to find the data to show that this decision we made 10 years ago was bad - for those entire 10 years we all thought it was good until we we looking at a performance issue and realized the roots case what a decision made in the early days had an unexpected side effect.
- popcorncowboy 3y agoNot to take anything away from the angle (which is bang on), but the "we're X people valued at $YBILLIONS" is a weird way to open and detracts from the message. I suppose it's a proxy for.. seriousness? I dunno. Valuations are just bets on NPV given "what could go right" scenarios, so congrats on having a convincing story to tres commas your val. But opening a pitch on architecture with "we're a small team building a simple numbers app but lol $BILLIONS" and then using some other company (SO) as the case study ref.. ok yup what. This affected casual "#winning but like whatever" style is everywhere now. But I'm a salty old fuck so it's probably just me it offsides.
- troupe 3y ago> "we're X people valued at $YBILLIONS" is a weird way to open and detracts from the message. The most common argument against simpler architecture is, "but that won't scale and we are going to grow to be a valuable company." So the idea that they aren't a $10 million company does seem somewhat relevant.
- panqueca 3y agoI couldn't agree more. Even when you decide to use a dead simple cloud provider (fly.io for example), you still have to spend time to understand: - the CLI - the cost model - the cost optimizations I'm tired of this endless looping. A cheap VPS + Docker is enough and in most of cases (it's even easier to scale/migrate)
- panqueca 3y agoLet's create an awesome-simplicity on github. A repo for not hyped, dead simple solutions, to work with.
- imiric 3y agoGood article! I like that it suggests a pragmatic approach, and introduces complexity only when it's necessary and makes sense to do so. Often engineers advocating for KISS end up (poorly) reimplementing the complex version, when just adopting the "complex" alternative would've avoided them all the development and maintenance headaches. That said, "simple" and "complex" are subjective terms, and they're not easily defined. Even when everyone aligns on what they are, complexity can still creep in. So it takes constant vigilance to keep it at bay. In the infinite wisdom of grug[1]: > given choice between complexity or one on one against t-rex, grug take t-rex: at least grug see t-rex > grug no able see complexity demon, but grug sense presence in code base [1]: https://grugbrain.dev/#grug-on-complexity https://grugbrain.dev/#grug-on-complexity
- a1o 3y agoI don't like this grugbrain approach because complexity is subjective, as you mentioned, and the grugbrain mentions simply saying "no" instead of telling a dev to articulate why something shouldn't be in the codebase properly. I mention this because I've been a lot of times in a place where instead of adopting "well maintened library that everyone is using since more than a decade" I had to write and maintain my own solution just to appease someone else because they thought it would be less work (it wasn't, maybe for them, definitely not for me). We need less posts in software development that people try to argue in absolutes.
- imiric 3y agoI mean, I think that grug also agrees that saying "ok" to complexity makes sense sometimes. :) I agree that this is a deep topic that requires a nuanced discussion, but my point is that I like the pragmatic approach mentioned in the article. You see threads here arguing that GraphQL and k8s are not simple, which is true, but I think it's wrong to hardheadedly avoid these technologies because of their "complexity", than to reach for them when the right time comes to use them.
- a1o 3y agoYes, I agree with you, nuance is key. I just have bad experiences of people throwing me sentences stolen from these types of articles as an argument of "why I should not do X" and then these people just never do anything throughout the development cycle just keep arguing as dead weight and failing to deliver cycle after cycle. Sorry, lots of trauma here.
- 5cott0 3y agois there a patreon tier that adds css margins? if you’re gonna beg for handouts you could at least make the site readable
- drivers99 3y agoJust hit the reader view button.
- hiAndrewQuinn 3y ago"Simple" is an interesting term. I've always found it to be very relative to what someone's actual experiences and knowledge bases are. For example, virtual machines are something I and probably most other people consider "simple". They're pretty much just little computers. For the most part, I can just work with VMs the same way I would work with computers. No sweat. My DevOps pedigree, however, also means I consider Docker containers and even some light k8s stuff as pretty "simple" - when these two things feel to other people like massive overcomplications. On the other hand, I'm pretty new to GraphQL, and it feels to me vastly more confusing than good old fashioned REST API endpoints, where I can crack open the code and actually see exactly how that particular endpoint works. I am mostly alone in my org when it comes to this feeling, because I haven't digested the abstractions that make GraphQL work as well. I don't really have a good answer then for what simple is beyond "I know it (kinda) when I see it".
- armanboyaci 3y agoVery good and important observation. In his talk "Simple made easy" [1] Rich Hickey defines simple as opposite of complex and easy as opposite of hard. The easiness is relative (as you described) and depends on the things you are familiar with. For example, Docker containers and k8s stuff is easy (for you), and GraphQL is hard (for you). The simplicity should be assessed (somehow) more objectively. [1] https://www.youtube.com/watch?v=SxdOUGdseq4 https://www.youtube.com/watch?v=SxdOUGdseq4
- hardwaregeek 3y agoHmm I dunno, this architecture feels simple in some ways but genuinely pretty complex in others. Like they defined their own protocol? That's pretty not-simple. It's like the StackOverflow example. Sure, the architecture is conceptually simple, but you still bought servers and are maintaining them yourself. That's pretty complicated unto itself. Probably the right decision, but not the "simplest".
- SPascareli13 3y agoThis is the thing about simple things, usually to maintain a simple "face" they require quite a lot of sophistication on the inside. Like the stackoverflow example, they have a simple architecture, but to make that work they did a lot of very low level optimizations, have a deep understanding of their stack and database, and also hosted their own servers. Basically, it takes a lot of skill to build something "simple".
- vendiddy 3y agoI like to treat simplicity as an ingrained attitude. When hiring someone, I love to see if they are visibly annoyed when something is over-engineered. Or when a user interface is too complex. If they have strong emotional reaction, it's a good cultural fit :) The inverse is true too. If someone "gets off" to complexity, I view it a red flag.
- IceMichael 3y agoWall of text
- drivers99 3y agoReader view
- bigstrat2003 3y agoIt was a genuine joy to see a website in this day and age which doesn't try to impose margins on text. I want my entire monitor to be used, and this site delivers.
- MH15 3y agoYou might be alone in this take. While I agree a lot of websites do it poorly, the only way I personally can read Danluu is when I make the window smaller.
- notapoolshark 3y agoAgree with this article 100%. At my old company we chose to write our server in Go instead of Java. We ended up regretting it because it was significantly harder to hire developers who could write in Go vs. Java. Later, I read a Paul Graham essay where he says that a company should choose its programming language based on how fast they can iterate in that language. And it clicked for me.
- Lacusch 3y agoWhen did this happen? From what I head and what I see go is starting to get quite popular. Not Java level of course but it shouldn't be impossible to hire go devs now. Especially that it's not the hardest language to learn.
- ed_blackburn 3y agoRails and Django are brilliant when they can host all your capabilities. Keeping it simple is the operational mantra, and rightly so. What's more complex is defining simple. My organisation wants to focus on the business domain, automating business processes for our customers. That means thinking as little as possible about the hosting and operational complexities of what executes that logic. The perceived wisdom would be to build a Django monolith, put it on Postgres and run it in a container. We did that and worked until we needed better scheduling of those containers and in-walks K8s. What's our solution for simplifying our operational platform? It's to pay AWS to do it for us. And now we use Fargate and Lambda for hosting. Is that simpler? Or exotic and more complicated? There are tradeoffs, which will vary from team to team and organisation to organisation. To one team, slapping functions in Lambda and knowing how to support them are more straightforward than a team of experts who know how to operate monoliths at scale. For me, the real conversation is about something other than simplicity. Simplicity is subjective. It's about familiarity and competency. Pick what your organisation is familiar with or competent with (or has the ability find people who are...)
- annowiki 3y ago> Another area is with software we’ve had to build (instead of buy). When we started out, we strongly preferred buying software over building it because a team of only a few engineers can’t afford the time cost of building everything. That was the right choice at the time even though the “buy” option generally gives you tools that don’t work. In cases where vendors can’t be convinced to fix showstopping bugs that are critical blockers for us, it does make sense to build more of our own tools and maintain in-house expertise in more areas, in contradiction to the standard advice that a company should only choose to “build” in its core competency. Much of that complexity is complexity that we don’t want to take on, but in some product categories, even after fairly extensive research we haven’t found any vendor that seems likely to provide a product that works for us. To be fair to our vendors, the problem they’d need to solve to deliver a working solution to us is much more complex than the problem we need to solve since our vendors are taking on the complexity of solving a problem for every customer, whereas we only need to solve the problem for one customer, ourselves. This is more and more my philosophy. I've been working on a data science project with headline scraping (I want to do topic modeling on headlines during the course of the election) and kept preferring roll your own solutions to off the shelf ones. For instance, instead of using flask (as I did in a previous iteration of this project a few years ago) I went with Jinja2 and rolled my own static site generator. For scraping I used scrapy on my last project, on this one I wrote my own queue and scraper class. It works fantastically.
- cityguy33 3y agoThe most sophisticated arch ever needed for any scale in my FAANG and F500 jobs are a ssl-supported load balancer, multiple app servers with thread pools, a sharded database, and message queues. Everything else is just a dressed up version of this
- mr_tristan 3y agoI find that architecture should benefit the social structure of the engineering team, and there are limits. I work on one of these “simple architectures” at large scale… and it’s absolute hell. But then, the contributor count to this massive monorepo + “simple architecture” hell numbers in the thousands. Wave financial is only 350 people according to wikipedia - I doubt that’s 350 engineers. I know only of Google and Meta that can even operate with a massive monorepo, but I wouldn’t call their architecture “simple”. And even they do massive internal tooling investments - I mean, Google wrote their own version control system. So I tend to think “keep it simple until you push past Dunbar’s number, then reorganize around that”. Once stable social relationships break down, managing change at this scale becomes a weird combination of incredible rigidity and absolute chaos. You might make some stopgap utility and then a month later 15 other teams are using it. Or some other team wants to change something for their product and just submits a bunch of changes to your product with unforseen breakage. Or some “cost reduction effort” halves memory and available threads slowing down background processes. Keeping up with all this means managing hundreds of different threads of communication happening. It’s just too much and nobody can ever ask the question “what’s changed in the last week” because it would be a novel. This isn’t an argument for monoliths vs microservices, because I think that’s just the wrong perspective. It’s an argument to think about your social structure first, and I rarely see this discussed well. Most companies just spin up teams to make a thing and then don’t think about how these teams collaborate, and technical leadership never really questions how the architecture can supplement or block that collaboration until it’s a massive problem, at which point any change is incredibly expensive.
- mattbuilds 3y agoThe way I tend to look at it is to solve the problem you have. Don't start with a complicated architecture because "well once we scale, we will need it". That never works and it just adds complexity and increases costs. When you have a large org and the current situation is "too simple", that's when you invest in updating the architecture to meet the current needs. This also doesn't mean to not be forward thinking. You want the architecture to support growth that will more than likely happen, just keep the expectations in check.
- Zopieux 3y agoHighlight that 99% of companies should take away from this piece: >since we’re only handling billions of requests a month (for now), the cost of this is low even when using a slow language, like Python [and simple synchronous code], and paying retail public cloud prices.
- lxe 3y ago> Our architecture is so simple I’m not even going to bother with an architectural diagram. What's described is far from a simple architecture. Synchronous python? Kubernetes? I'm guessing there's a legacy monolith with a few microservices or load-balancers? Then... GraphQL... why? This is just a hodgepodge of stuff in dire need of actual refactor.
- caerwy 3y agoand by simple architecture that includes graphql, k8s, and custom network protocol! LMAO, LMFAO!!
- ijidak 3y agoIt's the same reason that cooking recipes often become overly complex. (A sprig of this and a pinch of that.) We are often embarrassed by the simple. The simple makes us feel small, unsophisticated, and unimportant. I always find it amusing when I find a way to solve a problem simply, and my coworkers answer somewhat directly that it seems very simple. To me that's mark of success, but to many it's uncomfortable. Of course if we didn't work on it then it's over complicated it needs to be rewritten. Go figure.
- kulikalov 3y agoI like the article and am a big proponent of simple architectures. But. The described use cases have homogenous workloads. Hence simple architecture. Extrapolate the rest. And of course there are for sure cases of people increasing complexity for the sake of being needed. That's a topic for sociologists/psychologists to reason about, not for engineers.
- jokoon 3y agoGall's law: "A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a working simple system." It's quite funny how unknown this quote is. Imagine all the developers that would be out of work if we had simpler systems. It's hard to admit, but developers get more jobs when their work is complicated, it's the hostage taker syndrome. Software as a thing, is pretty recent, it's important to remember it has a large Silicon Valley influence, and software quality is just unregulated because of freedom of speech warriors. The software we have today, is just the combination of good government funding and marketing maniacs.
- eadmund 3y agoI agree with the majority of this with respect to simplicity in general, and only really take issue with this bit, about GraphQL: > • Our various apps (user app, support app, Wave agent app, etc.) can mostly share one API, reducing complexity This could of course be done with a RESTful API. > • Composable query language allows clients to fetch exactly the data they need in a single packet roundtrip without needing to build a large number of special-purpose endpoints This, too, can be done with a RESTful API. Two approaches which immediately spring to mind are passing desired items as query parameters or passing a template item as a query parameter or request body. > • Eliminates bikeshedding over what counts as a RESTful API This may actually be a benefit of GraphQL! There’re a ton of soi-disant ‘RESTful’ APIs which simply don’t follow REST principles at all (e.g.: ‘REST’ ≠ ‘JSON RPC’; also HATEOAS is hugely important, even when the hypermedia is in a non-HTML format such as JSON). But I also think that real REST really is a powerful framework for distributed computing. Sometimes the discussion really is bikeshedding, but sometimes it is a definition of terms.
- tveita 3y ago> Two approaches which immediately spring to mind are passing desired items as query parameters or passing a template item as a query parameter or request body. I've implemented this twice, you quickly end up at something resembling GraphQL after a couple of rounds of "iOS needs the the profile picture in two different sizes, dependent on native screen size, and with version 2 of the blurhash" Might as well use GraphQL and get schemas, libraries for clients and servers and IDE support out of the box at that point. It's no panacea - many of the backend libraries were somewhat low quality last time I checked - but I wouldn't hesitate to use it if I had a somewhat complex main product served by multiple frontends following different UI guidelines.
- chocolateacc 3y agoI wonder if new serverless platforms, like Modal [0], are even simpler than monoliths. I've been reading some books on software engineering, and it seems clear that network calls, multiple services, integration points, etc. all cause complexity. However, I do wonder if things like Modal allow you to focus only on writing business logic. No dealing with deploys, network comms, memory, etc. (No, I don't work at Modal, just wondering "what comes after monolith" -- Modal, Temporal, etc. all seem quite good) [0] https://modal.com/ https://modal.com/
- nonethewiser 3y agoWow, this guy's patreon is something else. https://www.patreon.com/danluu https://www.patreon.com/danluu $16/month "Short-form posts" $256/month "Sponsor" $2,048/month "Major Sponsor" $16,384/month "Patron" You certainly can't fault the guy for trying, although it does make him seem a bit crazy. And I'm aware of scenarios where raising prices doesn't have the negative effect you might expect. You never know what people might spend but I can't imagine this is a tempting proposition for anyone. Maybe it's all a ploy to get you to spend $16/month to see how many "Sponsor", "Major", and "Patron" level subscribers there are.
- neilk 3y agoIn this very comment page, there is a guy who flew Dan to a different city, just to hear this thoughts on random issues. Also, if you look at his other writings, he's often noted trends in how software developers are paid. And the paradox that with even small tweaks, he's sometimes saved his employers far more than he could have earned in ten lifetimes. He's a free agent now... so why not charge what his advice is actually worth? Dan is a very unusual person, in that he tries to do what is predicted by the data he has, rather than waiting for it to become conventional wisdom.
- yayitswei 3y agoOld and boring doesn't always mean simple. New ideas can simplify the architecture as well (the author cites GraphQL as an example). Agree that unnecessary complexity should be avoided. This talk explores the tradeoffs: https://www.youtube.com/watch?v=SxdOUGdseq4 https://www.youtube.com/watch?v=SxdOUGdseq4
- 0xbadcafebee 3y agoCouple thoughts: > Despite the unreasonable effectiveness of simple architectures, most press goes to complex architectures We're over-simplifying these terms. What's simple in one way is complex in another way. It makes for great blog posts to use generic terms like "simple" and "complex" for broad-ranging and highly technical topics, but it means nothing. Be specific or you're just tilting at windmills. > The cost of our engineering team completely dominates the cost of the systems we operate. Could this be because you decided to invent a new kind of truck, thus requiring lots of costly engineers, when getting two mechanics to weld a crane onto a flatbed would have done the trick? NIH is rampant in tech. Everybody thinks they need to invent something new when they can't find off-the-shelf parts that do what they want. When in reality, just making their system a bit more complicated in order to accommodate off-the-shelf would have been faster and cheaper. Sometimes more complex is simpler. Later on in the article Dan mentions build vs buy, but it's not that simple. You can buy and then modify, and you can build in a way that's cheaper and easier, if uglier and more complex. Design and engineering decisions aren't binary. There are more options than just "only use a complete product" vs "build your own everything", and more business and engineering considerations than just time to market and "scale". > Rather than take on the complexity of making our monolith async we farm out long-running tasks (that we don’t want responses to block on) to a queue. See, here's the thing with "simple" vs "complex". It's not "simpler" to use a queue than async. Both are complex. Queues may look simple, but they're not. Async may look complex, and it is. You didn't pick simple over complex, you picked something that looked easy over something that looked hard. You made a bet. Which is fine! But let's not pretend this is somehow good design. You just ignored all the complexity you're going to run into later when your queue becomes a problem. Maybe it won't be a problem? But maybe async wouldn't have been a problem at scale either. "Maybe" doesn't equal "good design", so let's not pretend it does (re: the idea that it's simpler and thus better). > Some choices that we’re unsure about [..] were using RabbitMQ [..], using Celery [..], using SQLAlchemy [..], and using Python [..]. [...] if we were starting a similar codebase from scratch today we’d think hard about whether they were the right choice This is a sign of a lack of engineering experience. I don't mean that as a diss; I only mean that the correct choice (of these options) is clear to somebody really familiar with all these options. If you don't have that experience, you need to go find someone that does and ask them. This is one of the best reasons why you don't want to engineer something yourself: you probably aren't the best engineer in the world, and so probably don't know the kind of problems you are going to run into. However, if you are engineering something yourself, and don't know the right answer, you need to go ask somebody (or many somebodies). If you were inventing some new kind of device that nobody had ever invented, maybe nobody knows? But you probably aren't doing that, so somebody does know. And if for some reason you can't or won't go ask somebody, then you should use the thing that you[r team] is most familiar with and already know all the pitfalls of, regardless of nearly any other downside from its use. Unexpected problems are a much bigger thing than expected problems. > By keeping our application architecture as simple as possible, we can spend our complexity (and headcount) budget in places where there’s complexity that it benefits our business to take on. And this is still good advice. But, again there is no such thing as a binary choice of "simple vs complex". It's all shades of gray.
- godisdad 3y agoThis post read like a “we want an operationally simple setup,” until the bit about selecting Kube as an orchestration technology. I think it’s still a service oriented architecture and still has to reason about asynchronicity given it uses celery and queues.
- benreesman 3y agoThis one is a classic (instant classic), I can't say anything about this better than Dan did. What I can offer is a personal anecdote about what an amazing guy he is. I had been a fan of his blog for a while, and at one point I decided to just email him and offer to fly to wherever he was because I wanted to hear his thoughts on a number of topics. This was in maybe 2016, but even then I didn't expect someone who must get a zillion such emails to even reply, let alone invite me up to Seattle at my leisure! I think I had the flight booked on a Wednesday for a departure on Friday, for one night's stay, and Dan was profoundly generous with his time, we stayed up late into the night chatting and I learned a great deal, especially about the boundary between software and hardware (a topic on which he is a first-order expert with an uncommon gift for exposition). I had the great fortune of spending some real time with Dan not just once but twice! When I went to NYC to get involved with what is now the Reels ML group, he happened to also be in NYC, and I had the singular pleasure to speak with him at length on a number of occasions: each illuminating and more fun than you can have without a jet ski. Dan is a singularly rigorous thinker with the dry and pithy wit of a world-class comedian and a heart of gold, truly generous with his expertise and insight. I'm blessed to have met and worked with a number of world-class hackers, but few, few if any are such a joy to learn from.
- dang 3y agoDiscussed at the time: In defense of simple architectures - https://news.ycombinator.com/item?id=30936189 https://news.ycombinator.com/item?id=30936189 - April 2022 (189 comments)
- rapfaria 3y agoWhat's Wave?
- neilk 3y agohttps://www.wave.com/en/ https://www.wave.com/en/ Fintech targeting Africa
- dustedcodes 3y agoLook I love the http://motherfuckingwebsite.com http://motherfuckingwebsite.com and think it's hilarious and I totally agree with the underlying message, to cut out a lot of the shit and just keep the web simple sometimes, but is it really necessary to have absolutely no style whatsoever which makes reading this blog post an absolute chore. It's so off putting that I can't bring myself to read it. Anyone else or just me?
- dshah 3y agoVery much clicked for me. Loved this line: "I’ll discuss a few boring things we do that help us keep things boring."
- jameshart 3y agoThere's a weird belief that monoliths are a 'simple' architecture and micro services are 'complicated'. Microservices are simple. Request handlers or queue listeners, transformation and data layers, caching, database connection pools, clients to other systems. They're easy. Monoliths are where you come across some of the most godawful complicated architectures. Unified object-relational mapping layers. Shared cache systems with per-value QoS support. Hacked runtime hooks that tweak the garbage collection or memory management for particular use cases. Homegrown monitoring stacks and instrumentation systems. External configuration management tools. Custom build tool integrations with Jira. And the upgrade slogs... when the database engine needs to be updated, or a new version of the underlying web technology is released. Simple to build and simple to add to are not the same thing as 'simple'.
- Uptrenda 3y agoI grant him his point about simple architectures but now I'm interested in more technical details about Wave's architecture? He mentioned synchronous Python... everything about that sentence goes against what I've learned about network programming. Python is single-threaded, and blocking I/O means that any APIs built with it couldn't handle other customers waiting. Unless they're processed so fast that there's no appearance of delays? Something that seems apparent with handling money in accounting systems (and trading systems) is you can't really do concurrency any way. If someone changes their account you need to lock those database records from access to any other thread and make everything atomic. Otherwise it can lead to race conditions where the same funds can be spent multiple times (this is something that has effected Bitcoin exchanges before quite ironically.) So maybe they use a sequential design because it makes more sense from an accounting perspective and eliminates the potential for race conditions? But then I'm still very curious about how performant such an approach is?
- mleonhard 3y ago> We’re currently using boring, synchronous, Python, ... We previously tried Eventlet, an async framework ..., but ran into so many bugs ... I had a similar experience using async Rust to make a boring HTTP server. Debuggers can't trace across `await`, so debugging was a very slow manual process. Also, I wasted a lot of time dealing with borrow-checker errors. I finally gave up and tried using Rust HTTP servers that let you write threaded request handlers, but there was only one (Rouille) and it had show-stopping problems. So I wrote a good one: https://crates.io/crates/servlin https://crates.io/crates/servlin You can use Servlin to make a boring HTTP server in Rust, with threaded request handlers (no async). I use Servlin to serve https://www.applin.dev https://www.applin.dev , running on Render. I'm also using Servlin (and Applin) to build a mobile app.
- deleted 3y ago[deleted]
- huntoa 3y agoWhen I think financial services and simple architecture, I think of Python, ORM, Kubernetes, Cloud, GraphQL and admission of "data-integrity bugs" and "paying retail public cloud prices". The article itself mostly discusses tech choices rather than architecture. Half of their choices, they seem to regret. On the service itself: It seems detrimental for African countries (or any country) to allow external financial services to get ingrained and allow them to milk their own populace and prevent the development of state-owned, cost-neutral, non-profit, long-term solutions for the public good. Payment should be public infrastructure, not private profiteering. Is anyone here donating Dan $180k/year (+VAT) for his blogging?