From: <no...@so...> - 2002-11-10 09:24:07
|
Patches item #503740, was opened at 2002-01-15 07:20 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=303248&aid=503740&group_id=3248 Category: BZFlag Group: None Status: Open Resolution: Remind Priority: 6 Submitted By: Dave Brosius (dbrosius) >Assigned to: Kevin Avila (eddienull) Summary: Colin Bayer's world cache patch Initial Comment: This patch, caches world files on the client's machine. On startup, the client requests a 'digest' of the server's world file. If it can find a local copy of it, it doesn't download the world again. Thanks to Colin for the idea, and 99% of the code. I just came along and fixed it up, and tried to steal the credit. May need some work for unix file systems. Thanks, Colin ---------------------------------------------------------------------- >Comment By: David Trowbridge (davidtrowbridge) Date: 2002-11-10 09:24 Message: Logged In: YES user_id=66583 updated for gcc 3.1, 'nix cache-file directory ($HOME/.bzflag-cache) ---------------------------------------------------------------------- Comment By: Dave Brosius (dbrosius) Date: 2002-11-10 06:28 Message: Logged In: YES user_id=66596 updated to latest cvs... hint hint ---------------------------------------------------------------------- Comment By: Dave Brosius (dbrosius) Date: 2002-01-15 18:57 Message: Logged In: YES user_id=66596 BTW, Both the client and server are forwards and backwards compatible. Thanks Colin!!! ---------------------------------------------------------------------- Comment By: Dave Brosius (dbrosius) Date: 2002-01-15 18:40 Message: Logged In: YES user_id=66596 Added MD5.h and MD5.cxx to VC build. Do I need to do anything for unix? ---------------------------------------------------------------------- Comment By: Dave Brosius (dbrosius) Date: 2002-01-15 18:39 Message: Logged In: YES user_id=66596 Ok, Put Md5 back in. The directory issues still exist. Is it ok to put a bzflag directory in where the current config is (named what the config file was) and move config file (renamed), and world caches there? ---------------------------------------------------------------------- Comment By: Daniel Léonard (danleo) Date: 2002-01-15 18:00 Message: Logged In: YES user_id=22615 > As for directories... on win32, my config file is in > C:\WINNT\Profiles\dave\Personal\bzflag.bzc > > how does this correlate to > > ~/.bzflag > on unix? IIRC, on win32 there is a value similar to Java "user.dir" property. This value is the home directory of the current user. On UNIX, the file is named .bzflag and on win32 bzflag.bzc (probably because of fear that the dot file do not work well, however they work well). The value changes depending on which win32 system you are on. On win98SE, it is by default C:\WINDOWS (or whereever windows was installed in). If there are users in win98SE, the "user.dir" will be C:\WINDOWS\Profiles\<user> which relates to you value (win2000 I believe). I know it wasn't banking, it is just that people associate message digest to MD5 as most people makes no difference between windows and computer. Daniel ---------------------------------------------------------------------- Comment By: Dave Brosius (dbrosius) Date: 2002-01-15 16:37 Message: Logged In: YES user_id=66596 LOL. I don't think I care if someone tampers with the digest on it's way to my machine. This isn't banking here. I just want a way to reasonably know whether the world file I have on my machine is the same as the world file on the server. As for directories... on win32, my config file is in C:\WINNT\Profiles\dave\Personal\bzflag.bzc how does this correlate to ~/.bzflag on unix? ---------------------------------------------------------------------- Comment By: Daniel Léonard (danleo) Date: 2002-01-15 16:27 Message: Logged In: YES user_id=22615 Hello, > Could someone 'splain what I should use as a universal > platform path for the map cache. Right now I'm using > getenv ("TEMP") + '/' + digestName.bzw. I've since been > informed that TEMP's a no go for unix. What should I use? With a little more work, instead of making a ~/.bzflag as a file, this name could become a directory. Just rename the config file and drop the cached worlds into this directory. I remember seeing the code for that, it is pretty simple, you just have to build on it. Daniel ---------------------------------------------------------------------- Comment By: Daniel Léonard (danleo) Date: 2002-01-15 16:22 Message: Logged In: YES user_id=22615 Hello, Why everyone think about MD5 for message digest. MD5 is no longer secure (I know it is not for cryto) :( I invite people to go see the Hashing Function Lounge at http://planeta.terra.com.br/informatica/paulobarreto/hflounge.html and choose another. If you want speed, use MD4, it is faster than MD5 (that I know). As for security, SHA-512 is probably more secure (that I guess). I you feel the need to change, I invite the new coder to http://www.iro.umontreal.ca/~leonard/java/src/fork/crypto/ for Java code that works (converting it to C/C++ would be easy). A final point, is the server taken into account in the hash. If two identical worlds comes from two different servers, is the computation for the cache done ? Should it be done ? Daniel ---------------------------------------------------------------------- Comment By: Dave Brosius (dbrosius) Date: 2002-01-15 14:38 Message: Logged In: YES user_id=66596 >>One more thing: this originally got the MD5 digest of the file in question Hehe, while developing i was getting a new md5 digest everytime I computed it. I wondered if it was because the md5 algorithm would do that, just generate _A_ digest, not _THE_ digest. Therefore I changed it to my own. Later, I realized I was a boob, and was running the server using the server generate world, which is random, and that was the reason the digest had changed. doh! My algorithm should've be fine, but I'll go back and install the md5 one today, will be trivial. Could someone 'splain what I should use as a universal platform path for the map cache. Right now I'm using getenv ("TEMP") + '/' + digestName.bzw. I've since been informed that TEMP's a no go for unix. What should I use? ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2002-01-15 13:11 Message: Logged In: NO Thx, Dave. ;) One more thing: this originally got the MD5 digest of the file in question... the scheme you implemented should work, but I'm not sure. :/ -- Colin AKA SIGKILL AKA vogon_jeltz <vo...@ic...> ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=303248&aid=503740&group_id=3248 |