Print Page | Close Window

Best Practices for Refreshing

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2418
Printed Date: 08-May-2025 at 9:57pm


Topic: Best Practices for Refreshing
Posted By: jipock
Subject: Best Practices for Refreshing
Date Posted: 04-Jan-2011 at 6:50am
Good Morning / Happy New Year....
 
I'm in the process of implementing an application with DevForce and didn't know if there are recommendations / how-tos on how to refresh an EntityManager's cache from the database. In our app, there will be multiple people running it at one time. Some people might edit records and everyone needs to have (at some point) a refresh to get those changes.
 
I am seeing the query strategy. I'm assuming this is what I'd use, but I didn't know if anyone has some practical insights.
 
Much thanks!



Replies:
Posted By: WardBell
Date Posted: 04-Jan-2011 at 3:14pm
A QueryStrategy would play a role in your solution ... but there is much more to it than this ... and everything depends upon application-specific factors such as
* number of active users
* variety of entity types that need to be refreshed
* interval between mandatory refresh
* when refreshes should be expected/allowed.
* whether users tend to be interested in the same information (e.g., stock prices, inventory levels) or changes in data of individual interest (e.g., purchases of Slinkies)
 
There are async polling approaches and push approaches (note: don't assume that push is always better!).
 
If the variety of entity types to track is high, you may want to create a ChangesTable and listen to that; such a table is often a by-product of change auditing.
 
It's a big topic - and important topic.
 
As is typical with such topics, there is no single answer.
 
If you care to elaborate (especially with respect to the listed dimensions), we may be able to offer more targeted advice.
 
Happy New Year!
 
 


Posted By: jipock
Date Posted: 05-Jan-2011 at 5:21am
This is an application where most of the entities won't be changed that frequently.  
 
Right now, our target user count is no more than 20 (more likely 15).
 
There is one entity which need the latest / greatest information (open spots in a schedule). But the other entities need only a casual refresh (caller information being updated, etc..).
 
Much thanks for your insights!
 
 



Print Page | Close Window