Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

For our main system, we have a small monitor application that sits outside our network and periodically tries to log in to verify the system still works. We have a problem with the monitor though in that the communications component set (Asta 3 inside Delphi applications) doesn't always connect through. Overall, I'd say it's about 95% reliable, but that other 5% kills the monitor since it will try to log in and hang on the connection attempt (no timeout in the component). This really isn't an issue on the client side of the system since the clients don't disconnect and reconnect repeatedly on the same application instance, but I need a way to make sure the monitor stays up and continues working even when the component fails on a run. I have a few ideas as to which way to have the program run, the main idea being to put the communications inside a threaded data module so that if one thread crashes then another thread can test later and the program keep going. Does this sound like a valid way to go? Any other ideas how to ensure a reliable monitoring application with a less than 100% reliable component? Thanks.

P.S. Not sure these tags are the most appropriate. Tried including "system-reliability" as one, but not high enough rep to create.

share|improve this question
    
Who will govern the government? –  P.Brian.Mackey Jan 4 '11 at 22:13

1 Answer 1

up vote 3 down vote accepted

Is there a reason you dont switch to an networking component that supports a timeout? That would seem to be the common sense solution here.

Can you use Indy or Synapse or a simple TSocket connection?

Edit:

Since you cant realistically switch, you can:

  1. Create a command line program that does the check, and use CreateProcess from a parent app to start it and stop it if it hangs.

  2. Pester the people who make ASTA to put in a timeout setting. It seems awfully wierd for there not to be one there already.

share|improve this answer
    
I would switch, but it would be a logistical nightmare (even more so than now). Asta is too deeply embedded in the system, and it has quite a few quirks that would require a lot of addition to anything else to make this work right. I found out just how big it is, and how deep it is in our system when I analyzed it for a conversion project that would remove our dependence on Asta (as well as a few other out-of-date or broken components). –  Tom Jan 4 '11 at 20:33
    
@Tom, see updated answer –  GrandmasterB Jan 4 '11 at 21:24
    
When we got Asta, it was 1999 (well before me), development was quite active, and it was pretty much the thing to use (according to internal docs). Development pretty much stopped in 2001, and no one has been able to convince the author to continue. I'd consder taking the source code and modifying it myself, but I'm not that good with components yet. Otherwise, I like the command line program idea, might do that as a simple alternative to the multi-threaded app I had thought about. –  Tom Jan 4 '11 at 22:15
    
The command line program is working extremely well, even when the computer is locked. thanks. –  Tom Jan 6 '11 at 21:49
    
Excellent! Glad to hear it helped! –  GrandmasterB Jan 7 '11 at 19:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.