archivator
October 11th, 2007, 11:45 AM
Ok, here's my new project.
You know how every single file-sharing program has its own way of hashing things? And how every time you start a program it rechecks to see if anything has changed since last time? Well, I hate this part.
First, it's a pure waste of I/O operations. Why read the same thing twice (or three times) when you can read only once and hash it two different ways. Second, it really prevents you from just launching the program and start using it. You have to wait for the hashing to finish and only then can you share your files. May the Force help you if have more than 20 GB to share..
My idea is to create a daemon that would monitor certain folders for changes and would hash their contents by using various algorithms. Then, one could simply export the revelant data to a program of his choice and be sure that when he launches the program, it won't spend hours hashing his files. Best case scenario, the daemon would expose an API that programs could use to access the hashes.
Now, here comes the real bugger - what language do I write it in?
I'm really considering only C++ and Python. However, I can't make up my mind.
If I choose C++, I can rely on speed and vast libraries of cryptographic functions. However, building a plugin system in C++ is a PITA (and I'm thinking the hashing/output modules should be plugins).
If I choose Python, I can easily implement a plugin system but I might need to sacrifice some speed. And really, a daemon in Python?
Any thoughts are welcome.
You know how every single file-sharing program has its own way of hashing things? And how every time you start a program it rechecks to see if anything has changed since last time? Well, I hate this part.
First, it's a pure waste of I/O operations. Why read the same thing twice (or three times) when you can read only once and hash it two different ways. Second, it really prevents you from just launching the program and start using it. You have to wait for the hashing to finish and only then can you share your files. May the Force help you if have more than 20 GB to share..
My idea is to create a daemon that would monitor certain folders for changes and would hash their contents by using various algorithms. Then, one could simply export the revelant data to a program of his choice and be sure that when he launches the program, it won't spend hours hashing his files. Best case scenario, the daemon would expose an API that programs could use to access the hashes.
Now, here comes the real bugger - what language do I write it in?
I'm really considering only C++ and Python. However, I can't make up my mind.
If I choose C++, I can rely on speed and vast libraries of cryptographic functions. However, building a plugin system in C++ is a PITA (and I'm thinking the hashing/output modules should be plugins).
If I choose Python, I can easily implement a plugin system but I might need to sacrifice some speed. And really, a daemon in Python?
Any thoughts are welcome.