CodeSmith Community
Your Code. Your Way. Faster!

Nettiers Caching Best Practices - example needed

Latest post 05-26-2007 8:30 AM by katokay. 8 replies.
  • 10-15-2006 8:46 PM

    • Faulcon
    • Top 150 Contributor
    • Joined on 12-12-2005
    • Posts 32
    • Points 1,040

    Nettiers Caching Best Practices - example needed

    Greetings, All -

     I have a smart client application using Nettiers (latest builds) and Ent Lib 2.0. Basically, this is a distributed workflow app, so several different user will be accessing it at the same time, potentially from different locations. For several of the forms, I am populating grids with TLists of various object types.

    What I'd like to do is cache these TLists, and ideally, I'd like ot use SQLConcurrency, so that when user2 updates a workitem record, user1's cached TList of workitems is invalidated. I'd also like to invalidate any open workitem records that are updated by another user.

    The problem is, I have limited experience using nettiers with entlib, beyond the out of the box functionality. What's the best way to do this?

    Mark Faulcon

    Filed under: ,
    • Post Points: 35
  • 10-25-2006 10:48 PM In reply to

    • Faulcon
    • Top 150 Contributor
    • Joined on 12-12-2005
    • Posts 32
    • Points 1,040

    Re: Nettiers Caching Best Practices - example needed

    bump.
    • Post Points: 35
  • 10-29-2006 8:07 PM In reply to

    • alexeib
    • Not Ranked
    • Joined on 10-07-2006
    • Posts 5
    • Points 85

    Re: Nettiers Caching Best Practices - example needed

    Mark,

    Your application is just an application that has Enterprise Library linked to it. So, just treat it as such and feel free to use whatever EL has to offer, including CacheManager.

    I would create my own cache manager config entry and use that to cache those lists.

     a 

    • Post Points: 5
  • 10-30-2006 6:55 AM In reply to

    • mwerner
    • Top 50 Contributor
    • Joined on 03-02-2006
    • Sweden
    • Posts 106
    • Points 2,376

    Re: Nettiers Caching Best Practices - example needed

    Excuse my ignorance but what's this SQLConcurrency you are referring to? I have a similar problem so I'm interested in any existing solution. No need to reinvent the wheel. I've searched the documentation as well as the web and nothing turned up under "SQLConcurrency".

    Best regards, Magnus Werner
    • Post Points: 35
  • 10-30-2006 8:33 AM In reply to

    Re: Nettiers Caching Best Practices - example needed

    Hi Magnus

    I think that this (SQLConcurrency) may be a terminology mix-up (apologies in advance if that's not the case Mark) so not sure how this would help you.

    As for your situation, I suppose it depends on what version of SQL you're using - SQL2005 offers Query Notification which, as far as I understand it, means that the server will fire out a message to all registered/interested parties when the selected items change, while SQL 2k doesn't (but there are ways around that - one regularly used technique is to have a proc that runs off a trigger on any table insert/updates etc - this proc makes a change to a file that's accessible via the client app, and this file is watched client-side using a filesystemwatcher so you're client app will know when any changes are made - hope that makes sense but if not let me know and I'll dig out an article on codeproject that discusses this technique).

    HTH

    Martin

    • Post Points: 35
  • 05-23-2007 2:57 AM In reply to

    • kinguru
    • Not Ranked
    • Joined on 05-10-2007
    • Posts 8
    • Points 160

    Re: Nettiers Caching Best Practices - example needed

    Stop talking guys!

    Where is live example of how to work with netTiers objects to cache them through application?

     

    • Post Points: 35
  • 05-23-2007 8:13 AM In reply to

    • katokay
    • Top 25 Contributor
    • Joined on 07-09-2006
    • Salt Lake City, UT
    • Posts 143
    • Points 3,190

    Re: Nettiers Caching Best Practices - example needed

    Set enableEntityTracking="true" in the applications config file. Then if you want to look through the logic, the Fill method in the generated base classes in the DataRepository is what uses this setting.
    • Post Points: 35
  • 05-25-2007 3:57 PM In reply to

    • mwerner
    • Top 50 Contributor
    • Joined on 03-02-2006
    • Sweden
    • Posts 106
    • Points 2,376

    Re: Nettiers Caching Best Practices - example needed

    To be picky entity tracking is not the same as caching. You would use the Caching Application block for caching where as entity tracking makes sure you get the same instance for an object. If you only use caching you may sometimes end up with different entities depending on your caching settings. So if you are using entity tracking it's not much point in using caching as well.

    If I have some spare time I'll throw together an example.

    Best regards, Magnus Werner
    • Post Points: 35
  • 05-26-2007 8:30 AM In reply to

    • katokay
    • Top 25 Contributor
    • Joined on 07-09-2006
    • Salt Lake City, UT
    • Posts 143
    • Points 3,190

    Re: Nettiers Caching Best Practices - example needed

    Although I get your point and agree to some degree. Entity tracking is caching the objects and pulling from it's "cache" to get the same instance always, caching does not always mean enterprise library caching. However, to your point my suggestion would not meet the requirements of the initial request and I realize that.
    • Post Points: 5
Page 1 of 1 (9 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems