A Computer for Christmas Sir Sangrathta and Mrs Claus we having a terrible row again. "You're always down at the factory", she said. "Even the reindeer see more of you than I do". "I can't help that", said Sir Sangrathta, "I have a very important job to do, and you know what happens if it doesn't get done." Both of them fell silent at the appalling thought of a failure to deliver the merchandise on time, to the right customers. Even worse than the impact on the customers, would be the impact on the customers' parents, driven close to insanity by this failure. "There are so many of them these days", complained Sangrathta, "and they all want so much, and it's all so complicated." "You ought to get a computer", said Mrs Claus. "I've got enough toys already", he replied. "No, I mean a proper one, a business machine." I was sitting at home, trying to write a device driver for a quarter inch tape drive, when some appalling noises came from the roof. The noises got louder, and started coming from the wall, and then suddenly, in my fireplace, there sat a bearded, rather portly, but distinguished looking gentleman in a dark blue pin-striped suit. He picked himself up, and introduced himself - it was Sir Sangrathta Claus. I looked at my watch. "You're a bit early, aren't you?" I said, noticing that it was only half past May. He ignored that, sat down and said "I have a problem." That little phrase is one I hear twenty times a day. Usually, I can help people over the phone, in five minutes, off the top of my head. Sometimes I have to spend a few hours unscrambling a disk for them. But occasionally, "I have a problem" turns into a major consulting project. Sir Sangrathta explained the problem, and it certainly sounded like a doozy. Each year, he received and had to process over two billion orders. Most of those were received in the month of December, most of them were in an illegible hand-written scrawl, most of them didn't give a delivery address, and they all had to be delivered on the same day. But order processing was only part of it. He also had to make sure that the manufacturing process ran smoothly, so that product was actually available in adequate quantities and to the correct product description, in several thousand categories. Raw materials had to be ordered and paid for, he needed invoicing of the orders (and statements to remind late payers drawn up) and last, and by no means least, delivery had to be arranged at the right place and, most importantly, at the right time. It was an administrative nightmare. "How did you get into this mess?" I asked. "It was fine a few hundred years ago", he replied. "I really enjoyed it then. Seeing the little faces of the customers light up made it all worth while. And life was simpler then, there were only a few product lines, and only a few million customers. But it just grew and grew, and I'm working twenty hour days, and I'm getting an ulcer, and I have rows with Mrs Claus, and I can't take it any more." He put his head in his hands, and looked miserable. "There there", I said, because I couldn't think what else to say. "Can you help me?", he said. "Why don't you just give it up?" I said. He looked at me. "Can you imagine the consequences of that?" I thought of my two, and the way they look forward to the Big Day, and how they write little notes, and leave a mince pie for the reindeer, and get up at 6am and start unwrapping. I thought about the alternative; I thought about a tree with no little parcels, about the disappointment and tears. But most of all I was multiplying two billion customers by ten presents by about £10 profit per customer, and I was losing track of the noughts, and I thought about one percent of that, and tears came to my eyes. I agreed to take on the job. I packed my warmest woollies, a portable PC, and we set off. I was quite surprised at the conveyance we used; I'd expected a sleigh, but it seems that 747s are much faster and more comfortable. We took the morning flight to Tokyo - this flies the great circle route over the North Pole, and if I was surprised to be on a jumbo jet, imagine the surprise of the stewardess when we left the plane at latitude zero. As we floated down on our parachutes, I had a chance to look around. There didn't seem to be any buildings or installations, but I could see a glowing red beacon, and we headed for that. As we got closer, I could see that the beacon was attached to a horse with horns, and when we landed nearby, I realised that I was looking at a genuine reindeer. Santa introduced me - "Dr Solomon, this is Rudolf the Red, my foreman." We were standing next to a small hut - surely this couldn't be the mighty Claus empire? He opened the door, revealing a flight of steps, and we hurried underground, out of the bitter cold. First, we went to reception. All the cryptic handwritten orders come here, to be decoded by expert graphologists, and typed neatly onto official order forms by the fairies. At the same time, the little customer's name, address and invoice address is added, as they often leave this out. Next, we went to the Great Hall. The place was gigantic. Bands of elves ran to and fro clutching papers, teams of trolls carried great palletised loads, and dwarves carrying axes and hammers ran around in groups of seven. It was a kind of organised chaos, but overhead was something truly remarkable. Do you remember when shops sent dockets and change around on overhead wires, and the sales person would put your order and payment in a little cylinder, pull a handle, and it would go "chung" and the cylinder carrying your order would fly off to the bowels of the shop. And then it would come back with your change in a little cylinder. Well, the air was thick with wires and cables, and the sound of pull-chung was going all the time. This was their communications system, and in 1888, it was the very latest technology. "When we put this in, we could pension off the pixies that used to carry messages; the pull-chung machines are much faster and more reliable" explained Santa. This contraption carried the orders from the fairies to the elves, who sorted them by product line and made out production dockets for the dwarves. The dwarves made product to satisfy these dockets, but they had a small number of goblins keeping an eye on raw materials, who sent messages back to Purchasing if anything ran low. Purchasing was run by a group of wood-nymphs, and they were constantly receiving requests for raw materials which they filled by sending orders down to the kobolds in the mines that were attached to the complex. Finished product was shrink-wrapped and palletised, carried by the trolls to the order-assembly points, where the griffins made up the orders, working from the elves dockets. These orders were passed to the reindeer, who sorted them out into geographical drops, ready for delivery on the big night. The whole thing was unbelievably complicated, and the same data was being copied again and again, but sometimes wrongly, and sometimes the pull-chung machines misrouted or got stuck, invoicing details were lost, delivery addresses weren't available, or the customer specified an inappropriate product and no-one noticed, or credit was being over-extended, or raw materials were ordered too late or in excess, and some products were being over-produced and lay in great unwanted heaps - it was a true shambles. Sir Sangrathta and I retreated into his office, away from the din of the pull-chung machines. "This is hopeless", I said. "I know", he said, "Do you think a computer would help?" What a question! Anyone with half a brain could see that they had a problem that was a standard business problem, solved with computers millions of times all over the world. the only difference was the scale of the problem, but computers have got pretty powerful these days. I set to work with a pencil (2B) and paper. People sometimes ask me why I use seventeenth century technology to design 1990s systems, but the answer is simple - if I sit down at a computer, the temptation to jump in and start coding is irresistable, and coding without design is a capital error. Obviously, we needed a LAN. Equally obviously, no ordinary LAN would do. We needed to put order entry on it, customer address look-up, order processing, invoicing, statements, delivery planning - the lot. And everyone in the Sangrathta organisation would need access to the database, which would be immense. I did a few sums; two billion customers, perhaps 1k of information each, means two terabytes (two million megabytes) of data. Um. I don't think you can get a disk that big. So how can I store two terabytes? There are really only two ways - the first is to use a mainframe (spit) and the second is to use 100,000 20mb hard disks. But to use 100,000 hard disks, you need 50,000 computers, as you can only put two disks in a computer, because of the way that hard disks are controlled. This isn't as silly as it sounds. I was going to need that many computers anyway, to act as data entry or display screens, and to control the output devices, and to do the processing. It all fitted together nicely, except that I couldn't see how to network that many computers. Networks can work in one of two ways; the problem is that you can't really have two computers sending messages down the network at once, they have to take turns, and the problem is how to organise that. The token passing method works like a relay race - whoever has the baton can do the running, and when you've finished with the baton, you pass it on to anyone who wants it. The good thing about this method is that it is very organised, and performance is very predictable. The trouble is, there is only one baton, and if you have 50,000 computers all competing for it, the ones at the far end will never see it. The other method is CDMA, otherwise known as free-for-all. Any computer wanting to use the network looks to see if it is free - if it is, it tries to grab it. If it isn't, it waits. If two computers try to grab the network at once, they collide, and they both back off and each waits a random time before trying again. This is much less organised, but at least every computer stands some chance of getting control of the network for a while. I decided to use this type of network, which means using Ethernet. In order to give each computer a chance to actually get some use of the network, I had to minimise the time that each one spent hogging it. So I had to go for a very fast system, capable of carrying a lot of traffic, and that meant optical fibres. Next, I had to think about which database to use. That wasn't very difficult, actually. End-user tools like dBase won't work in an environment where the data is spread over 50,000 computers. You have to use a truly relational database, which faithfully sticks to all Ted Codd's twelve rules. With such a database, it doesn't matter where the data is actually stored; your program doesn't have to worry about that. Unfortunately, there aren't any databases that conform to all the rules; and that left me rather stuck. But I shelved that problem for a while, and thought about the cabling. Cabling is always a nightmare. You have to take up the floors, or pull through ducts, and the curves are always too sharp, and there's always a fault at the most unreachable bit. It was worse here - there was no floor apart from the bare rock, and I didn't fancy taking that up. Nor was there a false ceiling to lay the cables over, I though, ruefully glancing up; then I realised that the pull-chung machines could serve a second purpose. I'd use them to carry my optical fibre cables. The file server was easy - we didn't need one, as the database was totally distributed. But the output was difficult, as we needed to fake hand written greetings cards. My first thought was to use flat-bed plotters, but then I worked out that we'd need about a million of them, as they're quite slow, and we'd need a pixie to change the paper for each one. Then I remembered that hand writing is just a different kind of font, and I decided to use laser printers with soft fonts. Because lasers are quite fast, I only needed a thousand of them, and could attach them to the computers that were already in the network. I would also use those lasers for invoices, delivery notes, statements and reminders. I went to Sangrathta with my design. Naturally, he noticed the hole immediately - "Where are you going to get a relational database?", he asked. I admitted that I didn't know of one, and mumbled something about asking Ted. He beamed. "I've got a better idea", he said. "Would you like your present early this year?". I must say I didn't believe he could do it, as writing a truly relational database isn't something you tackle lightly, but when he summoned the Chief Fairy, and explained what he wanted, and the Chief Fairy waved his magic wand, and there was a poof, and a nicely wrapped box appeared out of nowhere, I swallowed my doubts. And when I unwrapped it, it was called "Truly Relational Database", by Ted Codd and blow me, it was. So the plan was complete - all we had to do was implement it. Have you ever tried to buy 50,000 computers? We tried Amstrad, but they wouldn't give us any kind of discount, even for that quantity, as we were end-users. We tried several of the lesser-known manufacturers, but they all said that 50,000 was more than they sold in a month of Sundays, and they couldn't supply. Just as we were about to give up, and buy lots and lots of different brands (which would lead to lots and lots of incompatibility problems), I remembered one more supplier that we ought to try, who was probably big enough to supply, and who offered Volume Purchase Agreements to major customers. I phoned up IBM. IBM were surprisingly helpful. Yes, they could supply that quantity; Yes, we could have a large volume discount; Yes they could deliver (although I heard a strangled noise when I told him where to) and Yes there was a local dealer to support us - Moomintroll Technologies. The Moomins were very helpful indeed, which wasn't surprising when I went to visit their premises; they weren't terribly big, they'd only ever sold one other computer before (apparently, the first one went to Rudolf the Red, and was being used to run the union). Then I thought about the Ethernet cards - again, the problem was getting 50,000 of them. I went to the largest card manufacturer I could think of; Western Digital, who make just about every hard disk controller that is ever sold. They didn't sell an Ethernet card, but when I explained what I wanted it for, and that we'd want 50,000, they did a few sums and designed one just for us (which they now market generally, and quite successfully). Putting the network together went well. The computers were solid IBM, the Ethernet cards were good quality, and even stringing the cables was done easily by the nimble elves, running along the pull-chungs and tying them to the wires with pretty pink bows. To help write the software, we drafted in a herd of Unicorns. This might sound unusual, but remember that Unicorns are already familiar with Unix (indeed, that operating system was named after them) and so are at home in a multi-user environment. They seemed to get on well with Truly Relational Database, so I left them to it, and started organising the training. Yes, training. I've seen too many major projects fail because no-one thought to train the users in how to use it. Even with the most user-friendly systems, people are nervous about using it until they've been shown how. So we organised mammoth training sessions, and it turned out to be just as well, as most of the users had never seen a computer before. Round about December, we were ready. The hardware worked (and if a computer failed, a squad of dwarves would rush in and replace it). The network worked (unlike most networks) because this one had been properly designed. The software worked, because Unicorns are fabulous beasts, and magic to boot. So nothing could possibly go wrong - and if you believe that, you'll believe any fairy story. The problems came from an unexpected direction. Sir Sangrathta decided, without telling me, that the system would work first time. So when I tried to run the system in parallel with the old system, I found that the old system had been chucked away, and we had to go live on an untried system. To my surprise, the system worked - the unicorns had worked their usual magic. Everything was running smoothly right up till December 23rd, when the reindeer started to use the system to organise the deliveries, and then all hell broke loose. In particular, what happened was, Rudolf the Red called a strike. It seems that reindeer hate unicorns - something to do with having the wrong number of horns. So when Rudolf's herd started using the system, they complained about the user-unfriendliness of the system "Reminds me of Unix", said Rudolf. Then they complained that the keyboards were too small (and looking at their hooves, I could sympathise) and about the radiation hazard that they'd heard VDUs represented, and about the chairs they were supposed to use (again, I suppose I hadn't really thought about the fact that reindeer are a different shape). The strike spread, until the whole works was out. I went to see Sir Sangrathta, but he'd left a note for me that said something about nervous breakdowns and he'd done a bunk with Mrs Claus. So here I sit, all alone in this huge, deserted, Great Hall, trying to wrap up twenty billion presents. I've done about three hundred so far. I haven't even thought about how I'm going to get them delivered, or invoiced, or anything. I need help, and soon. Please come and give me a hand, or a lot of little customers are going to be terribly disappointed this year. Drive down to Heathrow, and park in the Long-term car park - this is going to take a while. Get on to flight BA242 to Tokyo, and when you compass needle spins and tries to stand on end, open the door, shout "Geronimo", and jump. Oh, and don't forget to put your parachute on first.
Saturday, 21 December 2013
A Computer for Christmas
I wrote this story nearly 30 years ago, so the techology has moved on since then - but not by much. Although you can buy four terabyte hard drives now.
Subscribe to:
Post Comments (Atom)
Great story HO Ho Ho.
ReplyDeleteHave a wonderful cache free Christmas !!
Have you seen the new 100 cache series at Angmering estate (near Worthing ), 'Wear the Fox Hat'