Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF: images & caching.



On Mar 9,  3:01pm, Scott Wedel wrote:
> Subject: Re: CF: images & caching.
> A more efficient scheme would first presume client already has most of the
> info, use checksums to determine differences and then deal with resending
> that range.
>
> For instance if client has 1238 images in local cache:
>
> C->S: Request_Number_of_Image_Names
> C->S: Req_Image_CKSM 0 1237	(request checksum of image names and image
> 				 contents)
> S->C: Num_Images 1249		(client learns there are additional images)
> S->C: Rsp_Image_CKSM 0 1237 ab8302ad def75749 (client
>
> So client can see if it has current images for lots of images in one
> message.  And when client needs update then it could ask for smaller
> checksum chunks until it discovers what it locally has that is different
> from server.  And instead of recalculating checksum of image contents each
> time it would be faster if instead it sent the checksum of image checksums
> so each image would be checksummed once and checksum saved.

 You have to remember that image ordering in crossfire can change.  If I add
say a new map, with 10 new images, those new images might be #100, #101, #650,
#1350, etc.  Under the above scheme, that is a lot of negotiating back and
forth to figure out where the new images are, or is much more complicated.

 Also, the above scheme would seem to fail if the 5 images are added and
removed - the number of images remain the same, but internal ordering may not.

 I noticed that the bmaps file, which contains roughly the amount of
information that needs to be transmitted, is 60K.  that means to download all
that data on a 28.8 connection is roughly 20 seconds.

 I am not  worried about out of date images much (image might look different,
but has the same meaning) - after all, if various distributions are made with
images stored in native format, checksums don't do a lot of good (or the client
won't care - it might want to use native format for various other reasons, such
as it looks nicer, than download an image from the server and convert it.)

-- 

-- Mark Wedel
mark@pyramid.com
[to unsubscribe etc., send mail to crossfire-request@ifi.uio.no]


References: