This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I have a program that try to detect any of its files updates(Datas), because some updates are necessary to make the program work correctly, well for long time I've been comparing the last change of File in my FTP With the user File in his System.
Well but that way is kindly complicated, because if FTP Update for some reason, all files are going to be updated for the user(Also some users experienced problems, like not finding updates), then I decided to make a new system and started with a file checksums comparator, well it take (UserFile CheckSum, then take URL File Checksum) and compare each other, well it works but the problem is that I have to compare the same amount of bytes, and to make 100% sure that the file is the same I have to compare the whole file, and to compare the Whole File from URL Take too much time to do in each program startup, and without some updates the program may crash so those are important.
So... I'm here to ask you a suggestion on how I Could make a decent file updater I'm trying to avoid store each file version in files or something like that...
Edit: What I was thinking, is write all files CheckSum in a file, then user when startup program and check file and read all checksums and compare them ^^ The bad thing of that is... That on every update I gotta create a new list of CheckSums ^^
Or I could make it connect to a server that will send the list of checksums ^^ but that's a bit annoying ;/
Doesn't your FTP client software give you a way to find the last changed date of a file on the server? Using that date would be easier than using a checksum.
Joined: Aug 27, 2011
As I said that's what I'm doing for loong time, checking last file changed date, but that way is not good.
Oh well then you agree with me about make an Update Server :p
As I said, I don't like the "last changed" way to make those updates, if I make an update server I can compare by checksum as the server will send checksums instead of client read them from file itself :p
PS: Still searching for more suggestions :p
Thanks, maybe I'll get more opinions, by the way I already created my Update Server, when client login it open connection to update server then send a packet asking for all file checksum, then server parse packet and send the checksum that are stored in a list that refresh every 20 seconds, then client compare each checksum received that come with filename, with local computer files, if there are any file with different checksum the client will send another packet requesting the download of file that's different :p, then server will parse this packet and send file to client :p What about?
But I'm crazy for more suggestions, because Idk... what if update server become off-line I need an optional way :p