Determine if app fails...

B

Bill

Okay, crazy question.

I have a tcp client/server app running on a machine. The app takes a string, delimited by various characters (hl7), parses it, and then Acks
back to the client. The problem we are having is at times, the client (a different vendor's application) sends unexpected trash in the
string. It is nearly impossible for us to code for every "Trashy" event that may occur. At this point, our app (rarely!) Hangs and is unable
to ack back.
The question is: Is there anyway to determine if the application is still running, but "Hung up"??? I know this is a vague question, but any
help would be greatly appreciated.

Thanks!!

Daniel
 
G

Guest

Biffster ([email protected]) wrote in
The problem we are having is at times, the client (a different
vendor's application) sends unexpected trash in the string. It is
nearly impossible for us to code for every "Trashy" event that may
occur.

Why not? There are several methods of validing strings from using regular
expressions to brute for parsing.
At this point, our app (rarely!) Hangs and is unable to ack
back.

Shouldn't you disconnect the socket? I mean there should be no reason why
your app hangs...
The question is: Is there anyway to determine if the application
is still running, but "Hung up"??? I know this is a vague question,
but any help would be greatly appreciated.

You could use SNMP, WMI, or some other management framework. Typically this
type of monitoring is handled via some sort of heartbeat mechanism.
 
G

Guest

what about creating another app (or service) that will check your process
every so often....like every 5 minutes it check to see if your app is
responding. if it isnt, it kills it and restarts it.....
 
T

Tom Leylan

It's not a crazy question, though as Spam Catcher has mentioned... it seems
a bit unusual that you can't trap the parsing error, reject the request and
continue on. Even if you can catch the error you may want to add a
"heartbeat" on an important server in any case.

I would avoid "testing" the server via the front-end and deciding that the
lack of a response meant it hung rather I'd suggest you choose another port
to send a signal to. You simply monitor that port to see if you have a
signal. An added bonus is that it can send various signals, a heartbeat (at
a regular interval) but also "query received", "response sent", "I'm idle"
and/or any other signal you might want to keep an eye on.

I'd suggest you search the Internet as I have little doubt that somebody has
written something and placed it in the public domain. I wouldn't limit your
search to VB or .Net as it shouldn't be too hard to translate from Java or
C++ if that's what you end up with.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top