Is Java the wrong language for a duplicate file scanner?

Reply

Join Date: Dec 2008
Posts: 53
Reputation: neilcoffey will become famous soon enough neilcoffey will become famous soon enough 
Solved Threads: 6
neilcoffey neilcoffey is offline Offline
Junior Poster in Training

Re: Is Java the wrong language for a duplicate file scanner?

 
0
  #11
Jan 8th, 2009
Originally Posted by ~s.o.s~ View Post
Re MD5: I guess we are talking about two different things here: security and file uniqueness, hence the confusion. I would personally use MD5 hashing since it seems to be a widely used technique for testing file uniqueness and optimize if and only if required.
And I'd say that's a fair enough way forward. The other advantage of MD5 is that Java gives it you "out of the box".

Originally Posted by ~s.o.s~ View Post
Also, coming up with a good hash solution [if that is what you were suggesting to the OP] is far from a walk in the park, though it seems to be a good exercise in learning more about hash functions.
No, I was thinking the poster could just use a standard one. Numerical Recipes suggests one that I think would work reasonably well.

> Yep-- the OS will generally automatically cache data read from file.

Originally Posted by ~s.o.s~ View Post
If you are talking about kernel file caching which results from reliance on system calls to do I/O, memory mapping the file solves that issue.
In my head, I suppose I was actually discounting mapping the file because in practice, Java has (or has had) some severe problems with this, such as not providing a wap to unmap a section of file once it is mapped, and imposing a less-than-expected limit on the total size of mapped file sections. However, if the poster can get things working with file mapping, I'd be very interested to know.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,157
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 531
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Is Java the wrong language for a duplicate file scanner?

 
0
  #12
Jan 8th, 2009
Originally Posted by BestJewSinceJC View Post
Personally I would write this in C over Java. Only because Java is Object oriented and the problem you have posed isn't. Well sort of, but even more the fact that C will probably be much faster than Java for this project.
He wants it to be able to be run online in a web browser. Java can do that. C cant. He says

Im also going to try and make it available online, a bit similar to online virus scanning websites. Ive got the website up in HTML, but im willing to scrap that if the duplicate file scanner cant be added to the website code as a plugin / object etc. Is java the wrong language, is netbeans not the best IDE? Shall I consider AJAX
Last edited by jbennet; Jan 8th, 2009 at 10:00 pm.
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC