March 2009 - Posts

My bank’s website is down, and that’s pathetic. From my work as an IT professional I am fully cognisant of the impossibility of 100% up-time. Software breaks, and systems fail. Ѕhit happens. But I rather think a bank can afford two servers, not to mention enough IT staff to roster on for weekends. You upgrade your servers one at a time, so that if everything goes pear-shaped you just divert traffic away from the screw-up.

Ultimately, banks only provide three services: authentication, authorisation and bookkeeping. If these sound familiar, that’s because authorisation and authentication are the foundation of any security management system, including the one in the dotnet framework.

Once upon a time, banks provided real services. In particular, a big lock-up to put your gold in: a big armoured fireproof vault with a sodding great lock requiring multiple keys too far apart for single person operation, and time-locks and so forth. Now, they mostly serve as privatised tax collectors.

Every server in the IT universe can do authentication and authorisation. So why are we paying banks to do something you can get from a cheap machine? As they say in crime novels, if you want to know what’s really going on, follow the money.

Back when they really did provide an essential service, banks got thoroughly entrenched, operationally and psychologically in the minds, hearts and wallets of all the first world nations.

Large, slow-moving and thoroughly cashed-up, they provide easy targets for grasping governments. Politicians may be self-serving, but they aren’t as dumb as they pretend. They farm banks, giving them privileges enshrined in law to guarantee they grow fat, regulating them so they can’t run away, and milking them like mad. Better yet, once you retire from parliament, you can augment your meagre stipend by working on the board of a major bank or three.

As a result, governments regard finding an effective way to avoid using banks as a kind of tax evasion, which is pretty much what it is.

So, it’s hard to hate the banks. They’re just cattle, kept so the farmer doesn’t have to eat the grass.

In the meantime, they could at least provide the services they’re paid for.

Posted by peterw | with no comments

A monumental milestone has been achieved: I have replaced the entire ATOM protocol service with my own code. It is now

  • Small
  • Simple
  • Maintainable
  • Comprehensible to mortals
  • Easy to extend
  • Easy to debug
  • Modular
  • Fault tolerant
  • Suitable for clustering
  • Much faster
  • Vista/Server 2008 compatible

There is support for multiple databases, allowing per-customer administration of data. Multiple database servers are supported, allowing asymmetric clustering.

Communications, logging and notification are handled completely independently. It is possible to stop, start, reconfigure and even upgrade these services independently without service interruptions.

The communication hub uses MSMQ for reliable, fast, restartable delivery of inbound packets to the logger. Both the logger and the hub advertise subscriptions to device events, the difference being that logger notifications occur later but are guaranteed to pertain to data that is definitely in the database, and may describe second order events (derived rather than reported by a device).

AtomSmasher, the successor to Device Manager, does not require connection to the database. If the configured hub is available, devices connected to it can be managed. Otherwise, AtomSmasher lists such devices as may be connected via local serial ports.

USB serial adaptors are not only supported, they are preferred since this provides a convenient way to trigger redetection (unplug and reconnect) when handling several devices. A database connection is unnecessary for serial connections because AtomSmasher autobauds, making it unnecessary to look up connection parameters. As many devices may be connected as USB adaptors and ports are available. Better handling of resource contention and thread management means that large numbers of concurrent sessions are easily supported.

A greatly improved user interface combines a property-sheet editor with a scrolling device log, with all commands directly available from menus.

Internal data structures are a lot simpler too, with simple byte array backing stores and property getters and setters mapping properties to and from the bytes in which they are a stored, eliminating double handling and making serialisation trivial.

While it may be traditional for an incoming programmer to rag on the efforts of his predecessor, the codebase I inherited was so bad as to be comic: it violated 43 out of the first 50 of Microsoft’s framework design guidelines (after that I stopped counting). The use of threads ran counter to every piece of scalability advice offered (I had several white papers thrown back at me), exceptions were consistently swallowed unhandled and unreported, and locking was used so incompetently as to render the entire tottering edifice effectively single threaded, but with the complexity, difficulty of debugging and fragility of free-threading.

In this context it would have been difficult to fail to make radical improvements.

Paul wants me to put post-processing logic into the logger. I’m not going to, because if you do so you can’t manage server behaviour extensions independently.

There will be no frivolous, artificial dependencies in my creation. It is currently a work of art, and it is damn well going to stay that way.

Posted by peterw | with no comments

Evan died yesterday. He sat down wheezing in a squash court, said he needed a rest and went to sleep for the last time.

For his sake I hope he was right, even if I think it was bollocks.

It’s a curious thing: it doesn’t matter what you do, what you know, who you know or what resources you control, some time in the next hundred years you are going to die, and unless you are Mozart or Einstein or Michelangelo or Shakespeare, very soon you will be forgotten. The tide will come in and wash away your footprints, and it will be as though you were never there. Even if by some digital miracle you manage to leave a faithful and compelling recording of yourself, no one will care.

This is it. One time only. No rainchecks, no refunds, for a limited time only. Live now or don’t live at all. And since nothing of us shall endure, and all this shall pass like the wind in the willows, what profiteth a man to learn wisdom that fades into folly and then forgetfulness?

What, then, is the point of anything? The answer lies within. Do what seems to you the right thing, the appropriate thing, that which you think another should do. Do it because it pleases you. Or do it because it pleases someone you love, which is pleasing yourself anyway, in a nobly indirect sort of way.

Try not to be vindinctive to people, unless you truly think they deserve it so much that it is the right thing to do. And if you really think it’s the right thing to do, then do it well: aristeiae.

I should probably tell you his name, so that he is remembered somewhere, in some small way, and may therefore live on, if only in a small way: Evan Coulston. He is, I understand, survived by some sons. His wife died a few years ago, of cancer. So much for their loving god.

Posted by peterw | with no comments

Over the weekend I was trying to figure out why a service that worked perfectly on my workstation in the debugger would not cooperate on the test server.

Remote debugging is the obvious answer, and I duly installed the remote debugging service on the test server.

My login is a member of the Local Administrators group on the test server, conferring the permissions required for remote debugging, and attaching to the process is not so hard, but mysteriously I could not set a breakpoint.

Skipping the details of the quest for clues, the answer is that it’s a bit retarded about looking for symbols, and you have to tell it where the PDB files are. The help and messages on this topic are vague about the frame of reference in which this path is express, so I set up a network share on the target computer and put the symbol files there. This allowed me to express the location of the symbol files in a machine independent way, rather than using a local path that might be invalid out of context.

At this point it all started to work across the network in the office.

Over a VPN

Unsurprisingly. the VPN host is a gateway machine, rather than the test server. This has several consequences:

  • Name resolution failure. I couldn’t resolve the name of the test server. Adding it to my hosts file fixed that, and I promptly found that the test server couldn’t resolve the name of my notebook, resulting in another hosts file hack. Messy, and very fragile in the presence of DHCP.
  • Authentication problems. Lacking the required authentication token I could not connect to the debug service.

The only solution I can think of – and happily it should also resolve the name resolution issues – is to make the debug server a VPN host.

Posted by peterw | with no comments