Comment by hinkley
6 years ago
Interesting. You know, I would’ve sworn I had a pat answer to this question, but it turned out I had to think about a little bit.
They say that some of the most rewarding interactions for teachers are the ones where they learn something, not jus the student. Every once in a while I get an example of that in real life.
So what are some examples? Programming language is often difficult to change. This is sometimes listed as a pro for microservices. Because I get to change my mind for every new area of the app, which makes it cheaper to reverse directions.
The most obvious answers that I have are load balancers and external caches. I shouldn’t have a big knockdown drag out argument over haproxy vs nginx. Now, a load balancer is almost a given. It’s possible that someday in the future, someone will invent an SMP machine with 256 cores that gets some economy of scale by running a whole website on two machines. It’s easier to reduce the number of machines behind a load balancer than it is to add a load balancer to a mature product. So put one in, but don’t fight about which one. We don’t know if we need haproxy features, or if we want paid support from nginx now. Just flip a coin and move on.
Similarly, external caches are usually easier to turn off than internal ones. With internal caches, people start to pass around IDs instead of objects, assuming object lookup is “free”. It becomes integral to the information architecture. A rat’s nest of lazy and duplicate lookups. External caches are cheap but never free. Access tends to leave bigger footprints in the code. And there’s some small hope that you can get a direct lookup down to a small multiple of the cache lookup time if it really becomes necessary.
Database architecture is another big one, for certain dimensions. Going with Oracle is hard to take back. MySQL vs Postgres is smaller. KV store versus MVCC SQL database is also harder. For a prototype it might make sense to pick one that is obviously a placeholder, like SQLite, until you know what your customer’s needs really are. Do they need audit trails? Are they addicted to graphs? Multitenant security? On and on. You can stave off fights with SQLite because it’s effectively a promise to revisit this later.
No comments yet
Contribute on Hacker News ↗