The ACID test: Teaching With Examples From Other AreasPosted: March 20, 2012
I’ve just returned from teaching an intensive module on Distributed Systems – no, don’t go, I have a point for everyone, not just the Computer Scientists in the audience. Dealing with computations that take place over several computers can be tricky because it can be difficult for everyone to agree whether all the things that they wanted to happen have actually happened. Combine that with the problems that occur when two or more people try to change the same thing at the same time and we need a strong mechanism to deal with it. The properties that refer to this are usually represented with the acronym ACID.
We use something called a transactional model – what we’re trying to achieve either happens or, if there’s a problem, we make it as if it never occurred (we call this atomicity). When we make change we want to keep the overall system consistent with regard to some key requirements (consistency). If two things are happening at once, but could fail, we set it up so that they don’t take account of each other’s changes until we’re sure that they’ve finished and are going to hang around (isolation). Finally, speaking of hanging around, once we’ve made something stick, we want it to stay stuck – that’s durability.
Why have I covered this? Because I want you to understand how I can take ACID (atomicity, consistency, isolation, durability) out of computer science and make students think about it in a different framework – that of the legal system. Here’s the question I posed to my students as part of a tutorial:
“Using Transaction Properties (ACID), discuss whether a person simultaneously accused of two crimes should be tried, in both cases, as if only one crime had been committed.”
Now this doesn’t seem related, but the complex issues in the presumption of innocence, not declaring previous crimes until sentencing and the nature of appeal can lead to a quite complicated and involved discussion. I like to start students off by getting them to think about the problem individually and asking questions to clear up any definitional problems. Then they go to their neighbour, then into small groups of 4-5. By the time we’re done the rooms full of discussion and we bring it together to illustrate that thinking about the problem in this way gets us away from memorised jargon inside the originating discipline and forces students to describe the situation based on their understanding of the concept.
This is a third year course so the question is designed to make people think – there are some answers that are better than others but almost all pathways based on careful thought will head towards a good answer.
Stepping outside the original discipline can be fun and useful – just make sure that you’re keeping the analogies accurate, precise and not too far from the original material. Hope this is useful to you!