Nah, I don't much like the tone of this article. Not at all. The engineering message should be: keep your architecture as simple as possible. And here are some ways (to follow) on how to find that minimal and complete size 2 outfit foundation in your size 10 hoarder-track-suite-eye-sore. Do we really need to be preached at with a warmed over redo of `X' cut it for me as a kid so I really don't know why all the kids t…
In defense of simple architectures
141–150 of 196 posts
Re: In defense of simple architectures
#142I was interviewing for software jobs recently, and while I was studying up on the "system design" portion I kept circling around the same insight that Dan Luu writes about so well here. I would sit down at an interview and try to create these "proper" system designs with boxes and arrows and failovers and caches and well tuned databases. But in the back of my mind I kept thinking, "didn't Facebook scale to a billion…
- Cassandra (based on dynamo/big table)
- wrote a custom KV store named RocksDb that is open source/now a company
- wrote a custom photos storage system that replaced an NFS based design
- wrote another custom binary object store
- wrote a custom geo distributed graph db (Tao)
- wrote an in house distributed FS replacement for HDFS
https://www.cs.cornell.edu/projects/ladis2009/papers/lakshma...
https://www.usenix.org/legacy/event/osdi10/tech/full_papers/...
https://www.usenix.org/system/files/conference/osdi14/osdi14...
https://www.usenix.org/system/files/conference/atc13/atc13-b...
https://www.cs.princeton.edu/~wlloyd/papers/tectonic-fast21....
https://m.facebook.com/nt/screen/?params=%7B%22note_id%22%3A...
Re: In defense of simple architectures
#143I was interviewing for software jobs recently, and while I was studying up on the "system design" portion I kept circling around the same insight that Dan Luu writes about so well here. I would sit down at an interview and try to create these "proper" system designs with boxes and arrows and failovers and caches and well tuned databases. But in the back of my mind I kept thinking, "didn't Facebook scale to a billion…
What am I missing?
Re: In defense of simple architectures
#144Simple architectures work well, until they don't. A good example is ye olde ruby on rails monolith. Dead simple to set up and iterate quickly, but once you reach a certain organization and/or codebase size, velocity starts to degrade exponentially
How often do you hit ‘that certain size’ when velocity starts to degrade anyway?
X works well until it doesnt… is not exactly a compelling argument. That can be said of simple and complex architectures, or just anything at all
Re: In defense of simple architectures
#145I don't know how the author can claim that they run a "simple" architecture. From their job pages: Our stack : backend: Python 3 (+ mypy) API layer: GraphQL android frontend: Kotlin/Jetpack iOS frontend: Swift/SwiftUI web frontend: TypeScript/React database: Postgres infrastructure: GCP / Terraform orchestration: Kubernetes That is not simple by any stretch of the imagination.
How would you simplify this?
Re: In defense of simple architectures
#146Earlier quoted context omitted.
> database is an append-only file of JSON objects separated by newlines. When the app restarts, it reads the file and rebuilds its memory image. All data is in RAM Apps like this tend to perform like an absolute whippet too (or if they dont, getting them to perform well is often a 5 line change). It's really freeing to be able to write scans and filters with simple loops that still return results faster than a networ…
> The problem is always growth, either GC jank from a massive heap, running out of RAM, or those loops eventually catching up with you Absolutely. The challenge is having enough faith that it will take long enough to catch up to you. Statistically speaking, it won't catch up to you and if it does, it will take so long you should have seen it coming from miles away and had time to prepare. In my systems that use an in…
Re: In defense of simple architectures
#147There are some web apps still in production that I wrote almost a decade ago in Node+Express in the simplest, dumbest style imaginable. The only dependencies are Express and some third-party API connectors. The database is an append-only file of JSON objects separated by newlines. When the app restarts, it reads the file and rebuilds its memory image. All data is in RAM. I figured these toys would be replaced pretty…
Built-in first-class concurrency (ala node, golang, rust, etc.) is a huge win for simple architectures, since it lets you avoid adding a background queue, or at least delay it for a very long time. I think people are also too quick to add secondary data stores and caches. If you can do everything with a transactional SQL database + app process memory instead, that is generally going to save you tons of trouble on ops…
>For example: instead of memcache/redis, set aside ~100 MB of memory in your app process for an LRU cache.
Erlang/Elixir for the win with (almost transparent multi-core) concurrency and ETS ;)
Re: In defense of simple architectures
#148I don't know how the author can claim that they run a "simple" architecture. From their job pages: Our stack : backend: Python 3 (+ mypy) API layer: GraphQL android frontend: Kotlin/Jetpack iOS frontend: Swift/SwiftUI web frontend: TypeScript/React database: Postgres infrastructure: GCP / Terraform orchestration: Kubernetes That is not simple by any stretch of the imagination.
How would you simplify this?
Re: In defense of simple architectures
#149Earlier quoted context omitted.
Doesn't the fact that its opened in append only mode (Linux) mitigate data races with regards to writes?
Your write will be fine; that is, it's not as if data from one write will be interspersed with the data from another write. It's just that the order might be wrong, or opening the file multiple times (possibly from multiple processes) could be fun too. The program or computer crashing mid-write can also cause problems. Things like that. Again, may not be an issue at all for loads of applications. But I used a lot of…
Are you sure? I thought it could be if the first write had more data than the size of the kernel/fs-driver buffer, not all of it would be written, and then it could be interrupted when another thread calls write() with a small buffer that gets written in one go.
Re: In defense of simple architectures
#150Earlier quoted context omitted.
Another issue with "just a JSON file" as a database is that you need to be a bit careful to avoid race conditions and the like, e.g. if two web pages try to write the same database at the same time. It's not an issue for all applications, and not that hard to get right, but does require some effort. This is a huge reason I prefer SQLite for simple file storage needs.
Doesn't the fact that its opened in append only mode (Linux) mitigate data races with regards to writes?