Conclusion

The MonitorService example presented in this chapter represents a real program designed to meet specific needs and accommodate future requirements. Several features of the program enable this flexibility.

First SQL Server tables let the underlying engine know what to do. As we will see in Chapter 15, we can add further flexibility by allowing Web clients to view and modify this information store.

Second the tables control virtually all of the program's operation, even down to the functions called by the underlying MonitorService engine. The four sample functions in TestMonitor barely scratch the surface of what we can do using MonitorService. For example, we can add functions that test connectivity to IPX and APPC machines the same way that Ping allows us to determine the status of a TCP/IP client. We can add more functions to TestMonitor to allow it to perform tasks similar to those performed by TestSQLServerStatus against other database servers. Mail monitoring is another natural extension. We can create mail messages with return receipt capabilities, generating pinglike abilities to connect to mail servers.

It's important to remember that a program like MonitorService can do much more than monitor network activity. Any process that can live within the restrictions dictated by the MONITOR_CONTEXT structure can operate as part of this service, allowing any operation that needs to be performed periodicallyperhaps once per dayto operate reliably, logging activities and notifying users of failure.

Of course, the version of MonitorService covered in this chapter does not allow easy monitoring of output by people who are uncomfortable using a tool that allows them to look into a SQL Server database. In Chapter 15, I will add the ability to interact with the service in interesting and powerful ways.



Inside Server-Based Applications
Inside Server-Based Applications (DV-MPS General)
ISBN: 1572318171
EAN: 2147483647
Year: 1999
Pages: 91

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net