New Message on dotNET User Group Hyd

Database Cache Dependency with MS SQL 2000

Reply
  Reply to Sender   Recommend Message 5 in Discussion
From: Bondhyd

Hi,

Sorry for the Delay got stuck in work...........so didnt find time to key in things

 

Go throught this document and once done i will publish some code snippets about how to achive the same.

Overview :<o:p></o:p>

<o:p> </o:p>

The ASP.<st1:stocktickeruk w:st="on"><st1:stocktickerca w:st="on">NET</st1:stocktickerca></st1:stocktickeruk> Application Data Cache allows cached data to be expired based on various parameters, including dependencies on external files. However, most business applications frequently tend to follow the same pattern, where data extracted from a SQL Server database is stored in some data structure and cached in the ASP.<st1:stocktickeruk w:st="on"><st1:stocktickerca w:st="on">NET</st1:stocktickerca></st1:stocktickeruk> cache. The underlying data in the database may change due to any external event such as some one executing a SQL update against the database. It would be useful to have a mechanism to expire the cached data structure in response to such external changes, and have a callback mechanism to facilitate reloading and refreshing caching of the invalidated data, much in the same fashion as the dependency on external files work.<o:p></o:p>

<o:p> </o:p>

Unfortunately ASP.<st1:stocktickeruk w:st="on"><st1:stocktickerca w:st="on">NET</st1:stocktickerca></st1:stocktickeruk> does not provide such a mechanism. This code sample offers a glimpse on what is possible.<o:p></o:p>

<o:p> </o:p>

Caching Using WMI <o:p></o:p>

          The user makes a request for cached data to the Caching Manager. If the data exists in the cache memory, it is returned to the client; if the data is not cached, its retrieved from the Data source (File or Database table). Cache Manager then starts a watcher on the database object to check for any data change in the data source and invalidates the cache as and when the data changes this is achieved using WMI.<o:p></o:p>

          The user can keep the objects in the cache on specifying the key for that object. So that it can be used whenever needed. User can also set the dependencies to invalidate that object from the cache. This can be done on specifying the files and time span.<o:p></o:p>


<st1:stockticker w:st="on">WMI</st1:stockticker><o:p></o:p>

<o:p> </o:p>

Now that we will be using WMI in this process of achiving  cacheing dependency with SQl Server 2000 lets beging with a breef into on what WMI is all about.<o:p></o:p>

WMI provides extensive instrumentation to accomplish almost any management task for many high-end applications (for example, Microsoft Exchange, Microsoft SQL Server, and Microsoft Internet Information Services (IIS)). An administrator can perform the following tasks: <o:p></o:p>

  • Monitor the health of the applications. <o:p></o:p>
  • Detect bottlenecks or failures. <o:p></o:p>
  • Manage and configure applications. <o:p></o:p>
  • Query application data (use the traversal and querying of object relationships).<o:p></o:p>
  • Perform seamless local or remote management operations. <o:p></o:p>

<o:p> </o:p>

<v:shapetype id=_x0000_t75 stroked="f" filled="f" path="[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shape id=_x0000_i1025 style="WIDTH: 279.75pt; HEIGHT: 324.75pt" type="#_x0000_t75" alt=""><v:imagedata o:href="" src=""></v:imagedata></v:shape><o:p></o:p>

The <st1:stockticker w:st="on">WMI</st1:stockticker> architecture consists of the following three tiers: <o:p></o:p>

  • Clients <o:p></o:p>

Software components that perform operations using <st1:stockticker w:st="on">WMI</st1:stockticker> (for example, reading management details, configuring systems, and subscribing to events). <o:p></o:p>

  • Object manager <o:p></o:p>

A broker between providers and clients that provides some key services, such as standard event publication and subscription, event filtering, query engine, and so on. <o:p></o:p>

  • Providers <o:p></o:p>

Software components that capture and return live data to the client applications, process method invocations from the clients, and link the client to the infrastructure being managed. <o:p></o:p>

The provision of data and events and the ability to configure systems are provided seamlessly to clients and applications through a well-defined schema. In the .<st1:stockticker w:st="on">NET</st1:stockticker> Framework, the System.Management namespace provides common classes to traverse the <st1:stockticker w:st="on">WMI</st1:stockticker> schema.

<o:p></o:p>

Prerequisites <o:p></o:p>

In addition to the .<st1:stockticker w:st="on">NET</st1:stockticker> Framework,  Windows Management Instrumentation  should be installed on web server<o:p></o:p>

<o:p> </o:p>

<o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

View Attachment(s)

View other groups in this category.

Click here
Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.

Reply via email to