Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

10.1: DBChecking scenario > 10.1: DBChecking scenario - Pg. 322

10.1 DBChecking scenario The DBChecking application is a utility application that illustrates how highly available singleton services can be used to maintain some global information that needs to be accessible to all cluster members. In our scenario, the global information that is maintained by the singleton service is the status of the database. This state is propagated to the application instances running on all cluster members so that the database is not accessed by the application when it is down. The DBChecking application achieves this by using WPF for the singleton service and ObjectGrid for maintaining the database state on all cluster members. This can be useful in a lot of scenarios. For example, if a database (represented by a datasource) is not available for some reason, the application accessing it will get an exception. The exception stacks will be written to a log file. If the application continues to access the database frequently while the database is still down, then lots of exceptions will be thrown and written to the log file. In cases where there are huge volumes of client requests, the log file size will quickly grow to huge proportions and may cause unforeseen problems. Furthermore, if the application is running on all cluster members, these exceptions will be logged in each cluster member causing unnecessary overhead as illustrated in Figure 10-1.