Re: Using DataSet and remoting to implement distributed cache--pattern

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Sam Santiago (ssantiago_at_n0spam-SoftiTechture.com)
Date: 08/13/04


Date: Fri, 13 Aug 2004 09:41:09 -0700

Have you looked at the Caching Application Block provided by the Pattern and
Practices Group from Microsoft:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/cachingblock.asp

>From reading your outline, it sounds like you are introducing a lot of
overhead and complexity in order to provide caching. It's a judgment call
whether in the long run all the effort would be truly worth it. Especially,
if you are writing your own caching layer. See if the application block
fills your needs and keep it simple. That's my 2 cents ;-).

Thanks,

Sam

-- 
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
"Liam Davis-Mead" <Liam Davis-Mead@discussions.microsoft.com> wrote in
message news:3B1C5E8D-F185-490E-A30B-E69A12F21EFC@microsoft.com...
> I'm interested in implementing a data access layer which uses typed
DataSets
> as data transfer objects.  I would like for the assembler which is
> responsible for managing each DTO and its corresponding DataAdapter to
> maintain a static cache--a larger DataSet of the same type as the DTO.
Any
> record which is retrieved from the database to fill a business object
should
> be cached when the DTO is filled.  Additionally, the assembler should
attempt
> to fill DTOs from the cache first (the assumption here is that the typical
> business object will be a single row of some primary table in the dataset,
> and if that row is present in the dataset, all related rows in related
tables
> will be, too).  However, I want this cache to be able to scale accross
> multiple application servers in a web farm, so I need to propagate updates
to
> the other caches.
>
> The approach I was considering would be for the cache local to the update
to
> enlist the caches of the other servers in a distributed transaction along
> with the database.  Upon enlisting, each cache would assert a local lock
> preventing updates to that particular DataSet.  The database would be
> updated, and if everything went smoothly, the DataSet diffs sent out to
the
> other caches (potentially through a reliable multicast).  If none of the
> caches had problems, all DataSets would approve their changes, and the
> database transaction would be committed.
>
> I have provided a much more in-depth description of the method at
>
http://episteme.arstechnica.com/eve/ubb.x?a=tpc&s=50009562&f=6330927813&m=476000945631.
>  For the sake of brevity, I only included the outline here, as I suspected
> this would be a more specifically knowlegeable audience.
>
> Has anyone heard of a similar implementation, or could provide references
or
> guidance for implementing a distributed cache in the data layer?


Relevant Pages

  • Re: Datasets fundamental
    ... loading from the Database into this "cache" and you want to update on a ... another option is using SQL 2005 Express and having it ... You then move from a custom "cache" solution to a normal replication type of ... engine is better at caching than you. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: VIOC: sizing and performance
    ... VIOC rather than XFC file caching. ... I see Read Hit Rates of 58% (database node, 512000 maxsize), ... Is it the read hit rate, ... "Sets size for closed file cache. ...
    (comp.os.vms)
  • [PATCH 1/2] Bcache: Version 7 - Writeback
    ... Bcache is a patch for caching arbitrary block devices with other block devices ... default sequential IO bypasses the cache. ... but the code should be fairly sane in design. ...
    (Linux-Kernel)
  • Re[2]: [PHP] dynamic -> static
    ... As I wrote already this issue is mainly because of search engines ... incompatibility with dynamic content sites (to be more exact - with ... You can cache your code using PHP Accelerator or Turck ... MM> implementing a caching layer between your application and your database. ...
    (php.general)
  • Re: [PHP] Aggressive PHP Smart Caching
    ... i have begun to experiment w/ your caching tool. ... it is also important that the script calling ob_end_flushhave access to ... the header method in the first bit of code in the cache tool. ...
    (php.general)