3 ms·
Sure. You can draw conclusions about what will be a good design, or where a problem is occurring, or what you should optimize from doing "the math." The simple
by ericb 7y ago
Sure. You can draw conclusions about what will be a good design, or where a problem is occurring, or what you should optimize from doing "the math."
The simplest example is probably using a Big O approach to view how to walk a large data structure. The math works out that certain approaches to walking it are cheap enough in terms of total operations at small scales, and incredibly expensive at large scales. By doing the math, I mean that you can both know when you can get away with sloppy approach, and when you have to be careful to not touch each object more than once.
I didn't just mean big O, though. You might do calculations like "if every user creates these structures in a database, every 5 minutes, we can expect that this table will have n records by time y. If that happens, one, is the size tractable, does it need an index, and do we want to reconsider this approach in favor of a cleverer design that can avoid this query? Things like that.
A recent example for me was researching max zookeeper writes per second and deciding if it can be used for super high volume writes in a system. The conclusion, based on some napkin math of the system needs, and some benchmarking of ZooKeeper was that a different tool needs to fill that spot in the architecture because it was too write-heavy for zookeeper.
- aledalgrande 7y agoInteresting, somewhat similar to what I do, but at a deeper level.