Race condition Deja Vu

scrottie on 2010-01-12T17:07:57

Part of the last gig involved doing high availability and extreme high reliability (large amounts of money involved) between two systems without locking primitivies. Perhaps a future version of XML or SOAP will include locking primitives. Rather than speaking HTTP, it was just raw XML over SSL (with, as per regs, authentication repeated inside of the SSL connection... no single point of failure was the guiding design). Either the server could be rebooted or any of the clients or both at any moment and they'd figure out where they were. This wasn't properly planned for to start with and it proved to be a major bugbear that kept cropping up. The regs also required that once something was done, it would not be un-done. The nanosecond that a random number was produced, it had to be preserved. Even if someone had an ultra sensitive EMI reader and could pick the randoms out of RAM as they're generated (and the generator churned constantly so picking up the seeds with EMI would be of limited utility) and had the ability to crash the server at any moment if the randoms selected weren't to their liking, it still wouldn't matter because they would just re-appear after the server came back up. This means that the server could make an important decision such as what a random was going to be, send it to the client, then the client would crash before it actually got then, and when it came back up, it would have to figure out that the server was further ahead of it and it would have to replay things happen in the future. Sync without locking is a bugbear.

So, now I'm doing web stuff with XML/SOAP, memcached, DBIx::Class, etc with async agents that push...

-scott