When asking about the capacity of a program, you also need to consider what happens when you decide to stop using the program

Raymond Chen

Raymond

An internal customer had a question about a tool, let’s call it Program Q.

As part of our gated checkin system, the system creates a new record in a Program Q table to record details of the checkin. (What tests were run, who did the code review, that sort of thing.) We are considering incorporating the Program Q record number as part of our version number: major.minor.service­pack.hot­fix.record­number. What is the maximum number of records per table supported by Program Q?

Now, the easy way out is to just answer the question: The theoretical maximum number of records per table is 2³²−1. Even if your gated checkin system’s throughput is one checkin per second, that gives you over a century of record numbers.

But answering the question misses the big picture: The limiting factor is not the capacity of Program Q. The limiting factor is how long you plan to keep using Program Q! Before the century is up, you probably won’t be using Program Q. What is your transition plan?

In this case, it’s probably not that complicated. Suppose that at the time Program Q is retired and replaced with Program R, the highest record number is 314159. You could just say that the version number in the binary is the Program R record number plus 400000.

If you’re clever, you can time the switch from Program Q to Program R to coincide with a change to the major.minor.service­pack.hot­fix, at which point you can reset the record­number to 1.

Raymond Chen
Raymond Chen

Follow Raymond   

0 comments

Comments are closed.