-
The twelve. by srdan
Scalable things come in dozens. If you ever find yourself coding something that you think you might want a whole bunch of, make it a multiple of 12. The reason is that sooner or later you’re gonna wanna split your code on multiple machines and nothing splits quite as well as a dozen.
If it’s true that in science, there are really only three numbers, 0, 1 and infinite [1], and in computer science there are only 0, 1, and 2*n [2] then in scalable computer architecture they are 0, 2 and n*12 [3].
There’s a reason old civilizations used dozens as their norm of “a bunch”. There’s twelve months, twelve hours, dozen eggs, 24 beers in a crate, etc. Imagine, they HAD to have noticed that they had 10 fingers and yet they assumed a way of counting their worldly possessions that threw that advantage away. Why? Because they knew that if they got a dozen coppers for standing around looking lurky, they could have a buddy come round to alleviate the boredom and share the loot evenly. Or two budies. Or three. Or five. Split evenly.
So when you’re building a service that has a bunch of workers doing something independently of one another, make it a multiple of 12. Then, once your anonymous service goes all facebook on you and you need more horsepower, you can easily scale it from one machine to 2, 3, 4 or 6 (and any multiple of that of course..).
[1] Either there’s no thing, there’s only one thing or there are an very many things, infinite amount AFAIC.
[2] Either there’s nothing, there’s one or there’s one paired together with another one.. and then you pair that pair with another pair. Like memory modules. You get a 2 gig module by compressing two 1 gig modules and nailing them together. (Note. I’m note sure that’s exactly how they do it. I mean, I’ve installed a couple of them ram modules and I’m yet to see a nail sticking out of one)
[3] Either you haven’t done anything, or you’ve made two of something to prove they can run in parallel without wrecking each others data, or you’re serious and you’ve made 12 of it, or some multiple of 12..