Kristian Waagan wrote:
Kasper Nielsen wrote:
Kasper Nielsen wrote:
Hi,
I'm evaluating Derby for a project of mine. I really would like to
avoid using SQL and just use Derby as a binary store. Is this possible?
My data consists of key -> value pairs where the keys are uniformly
distributed 160 bit numbers and the values are byte arrays.
For now, I need to support 2 basic queries
* Give me the value mapping for the key K or null if it doesn't exist.
* Give me a map of (key->value) for the key range of key_start to
key_end.
I had a look at the org.apache.derby.iap.store packages but wasn't
quite sure where to start.
Cheers
Kasper
Thanks for all the suggestions. I think I'll go ahead and create some
test cases and find out whatever overhead (space/performance) is
involved.
For those interested,
http://en.wikipedia.org/wiki/Distributed_hash_table pretty much
describes the usage. Because you a providing a general platform you
want to limit the storage functionality to simple put/get (key->value)
operations. Which is why I don't really need any advanced features. To
build more more advanced functionally (indexing, redundancy, ...) any
user must build on top of these put/get primitives.
Hi Kasper,
Just as a side note, I once implemented a simple DHT using the Chord
algorithm and Berkeley DB Java Edition. But this was some time ago and
before Oracle acquired BDB.
I actually just found a whitepaper
"Oracle Berkeley DB Java Edition vs Apache Derby: A Performance Comparison"
http://www.oracle.com/technology/products/berkeley-db/pdf/je-derby-performance.pdf
Just copying there conclusion here:
"The Berkeley DB Java Edition Persistence API is a high performance,
complete solution for Java object persistence. Berkeley DB Java Edition
performance exceeds Derby performance in every test, by a factor of 3 to
10, clearly demonstrating the superior performance of Berkeley DB Java
Edition"
Cheers
Kasper