Quote:
Originally Posted by Stuart
One of the sites I maintain at work had to be taken off line yesterday when the software running a service it relies on suddenly decided to commit suicide at some point between 12am and 9am yesterday morning. After several hours, my colleagues managed to get the service back online, and the site is back. That's not the good news.
After being told by the service's original designer (it was custom written in Java) that it was impossible, I've managed to write a little bit of code that, should this service fail again, takes the site off line and emails me with the exact details of the error given by the service.
So, while it won't stop the service malfunctioning in the future, it should at least give me some advance warning when the service does malfunction.
Admittedly, the code is only working on our test site at the moment (it will be implemented on the live site along with a few other changes when we have tested them properly), and while the code functioned correctly when I was able to engineer failures of the service (the test site uses a test version of the service), but there is no real way to be 100% sure what will happen with an actual failure.
|
Mind you, although I consider him a friend, the original designer is lazy. One page on the site needed to obtain certain information from the service. Information that was not offered in a form that the site could use without having to generate a lot of calls to the service . The page needed to list equipment, but needed three calls to the service per item of equipment (and there are hundreds of items) to generate all the info it needed.
I told him what info I needed, and asked for a function to retrieve it. When he said No, write it yourself, I did, which resulted in a page that could generate up to 600 calls to the service and take several minutes to update. The guy left, and I talked to the guy who took over from him. Within 2 days, I had a function that retrieved all the info I needed with one call to the service and took 5-10 seconds as opposed to several minutes.