Staying ahead of trouble

The other day I decided to play with the idea of facilitating the notification of issues back to us. Our users are off-site.. So I decided to hook up to the SMTP capabilities of VW. As a proof of concept, I decided to modify the Notifier so that instead of providing a “copy stack” button it provides a “Send Stack” button. This is pretty easy to do by simply overriding:

DebuggerService>>>
openDebugger: aDebugger contents: aString1 label: aString2 proceed: mayProceed displayAt: aPoint

it will be quite apparent where to make the mods.

I then use MailMessage to send an email to my work account as well as to my cell phone. It is a simple as this:

| message smtpClient |
message := MailMessage newTextPlain.
message from: 'santa@northpole.net';
to: 'timmy@yourmail.net';
subject: 'Start making your list now';
text: 'What would you like for Christmas?'.
smtpClient := SimpleSMTPClient host: 'smtp.northpole.net'.
smtpClient sendMessage: message.

The above is straight from the VisualWork’s documentation. Messages can also carry attachments. For more info check out the NetClientDevGuide.pdf which comes with the VisualWorks Cincom distribution.

The overriding need is not for bugs per se but rather for production events such as abnormal termination of batch jobs etc. My plan is to make the application much more aware and responsive of runtime issues. Partly by perhaps incorporating VW’s SNMP framework but also by simply more carefully tracking runtime events in the daily business cycle.

SMTP seems like a reasonable viable possibility. Mail messages can of course be sent programatically. The question is whether the users will feel this to be a security risk. We should be able to encrypt mail. Well, we shall see how this turns out.