So last Thursday evening it was decided that I should go and collect my LadyFriend from her place of employment and transport her to my place of residence as she was not feeling well and did not need to endure the perils of public transport. The route home involves crossing the East Link bridge so I topped up my e-tag at about six thirty and headed off knowing that my vendor claims it takes up to 90 minutes to process the top up but Dublin traffic meant it would be two hours before I hit the toll bridge.
So two hours later I drive up to the toll barrier and get a lovely “account suspended” error. I had driven up to a barrier with a cash option as I feared that the 90 minute update interval was wishful thinking so I threw some cash in the basket and drove home. The next morning the LadyFriend was very much not well so after awhile I drove her back to work. At this point it was nearly midday so I was confident my top up would have been processed by then.
This was pure folly. “account suspended” flashed on the display once more. I had in a moment of misplaced faith in the NRA and NTR driven up to a barrier with no cash option and so caused some traffic delays while waiting for the Lady to come out and take my money. During this transaction a brief discussion ensued as to the length of time it takes an account update to be process. Two days is what she tells me. I am shocked. This is the kind of nonsense I expect from the banks but not from a modern system only put in place in 2007.
My gut reaction was that if someone was to propose a system design to me to implement that took more than 2 seconds to propogate updates from a tag vendor to a toll operator then something was seriously flawed with the design. I can only presume that the National Roads Authority and the various toll operators use carrier pigeons to implement their system.
After about a day of being this cocky about how I or any of the people I work with could do this much better I began to wonder how I would build it and so just to prove to myself that yes this could be done I have written up my design and included it below as it may prove of use to someone.
Only read beyond this point should you actually be interested in how I would build this system and actually think things like message queuing and distributed systems are fun.
(more…)