Offline client notification

Offline client notification

Old forum URL: forums.lhotka.net/forums/t/1141.aspx


Michael Hildner posted on Wednesday, September 06, 2006

Hi,

I have this Windows Forms app that uses a lot of large images. Images are stored in the DB and clients connect to the DB over a VPN. Since we didn't want to pull the image from the DB each time the client uses one, we cached the image on the client. In the .Get factory method of the business object, I check to see if the image is on the client machine. If it is, we use that, if it's not, we pull from the DB and write to the cache folder, so it's available the next time. The cached images are named by the PK.

Now we need to update images. The application does this, but the problem is that the old image is on several client machines, and since the PK is the same, the business object uses the cached image and not the new image in the DB.

I'm trying to figure out the best way to let clients know, or have the clients check to see if an image has been updated. My first thought was to have a last modified column in the DB, but that would mean checking every time an image is used. The images are changed infrequently.

Just fishing for ideas on the best way to handle this. Any thoughts appreciated.

Thanks,

Mike

 

ajj3085 replied on Wednesday, September 06, 2006

Since you're running over a vpn and the images are large, I think the best bet is to go with the last modified date. Sending this over the wire is going to be much quicker and wont' require you to just always pull the image now and then.  You'll also be sure the images are always up to date.

If you don't want to send that data each time, you could only check every two weeks or something like that; record on the client the last time the image was checked and if it's more than two weeks old, do the simple check.  If the image hasn't changed, record that the check was made.  If it was, download the image.

HTH
Andy

Copyright (c) Marimer LLC