943,579 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1782
  • Java RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Jan 8th, 2009
0

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

Click to Expand / Collapse  Quote originally posted by ~s.o.s~ ...
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".

Click to Expand / Collapse  Quote originally posted by ~s.o.s~ ...
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.

Click to Expand / Collapse  Quote originally posted by ~s.o.s~ ...
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.
Reputation Points: 120
Solved Threads: 7
Junior Poster in Training
neilcoffey is offline Offline
53 posts
since Dec 2008
Jan 8th, 2009
0

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

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

Quote ...
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.
Moderator
Featured Poster
Reputation Points: 1764
Solved Threads: 574
Moderator
jbennet is offline Offline
16,485 posts
since Apr 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Connect 4 java program help
Next Thread in Java Forum Timeline: Display how sort works? Please help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC