db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kasper Nielsen <n...@kav.dk>
Subject Re: Using Derby as a binary store
Date Mon, 27 Nov 2006 23:08:44 GMT
David Van Couvering wrote:
> To be honest, this looks more like a job for BDB than for Derby.  I 
> would love to see the Derby store API made public at some point, but 
> currently it's not public and I suspect it may be difficult to work 
> with.  Are there reasons BDB/Java won't work for you?

Not besides the license:)

Its for an BSD licensed project, so BDB is pretty much out of the picture.

And since I haven't been able to find any projects resembling BDB my 
hope was that I could use Derby with some minor tweaking.

- Kasper

> David
> 
> Kasper Nielsen wrote:
>> Julius.Stroffek wrote:
>>> Do you need to store them also on a disk?
>>>
>>> Cheers
>>>
>>> Julo
>> Yes,
>>
>> I'm only interested in the actual storage/indexing. Any caching I'll 
>> take of myself.
>>
>> Let's for simplicity's sake say I need the following interface in my 
>> application.
>>
>> interface Store {
>>   void put(byte[] key, byte[] value);
>>   byte[] get(byte[] key);
>>   Map<byte[], byte[]> getRange(byte[] key_from, byte[] key_to);
>> }
>>
>> put and get works like the java.util.Map put/get operation.
>> getRange(83,103) would return all the existing key->value bindings for 
>> numbers between 83 and 103.
>>
>> I could implement this myself, but I would like to use the 
>> indexing/transactional features of Derby instead. However, I'm not 
>> willing to pay the performance cost for using SQL since I'm only 
>> storing byte[] arrays (if it is possible).
>>
>> Cheers
>>   Kasper
>>
>>>
>>> Kasper Nielsen wrote:
>>>> I'm just looking for a lightweight solution where I can store bytes 
>>>> (key->value pairs) and create a few indexes on the data.
>>>>
>>>>
>>>> Cheers
>>>>   Kasper
>>>>
>>>>
>>>>> On 11/24/06, Kasper Nielsen <news@kav.dk> 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
>>>>>>
>>>>>
>>>>
>>>
>>
>>
> 


Mime
View raw message