db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: New "segmented" StorageFactory Development
Date Fri, 05 May 2006 15:01:38 GMT
Rodrigo Madera wrote:

> Hello to all,
> 
> I'm Rodrigo Madera, software developer. I need a certain feature in
> the Derby database system, and I am volunteering to develop such a
> feature.

Great, please don't hesitate to ask questions on the list, people will
help you, though remember sometimes it takes time for people to respond.

> 
> My requirement is that a database can be spread into different
> directories (please read the Derby Users mailing list thread:
> "Spawning Data on Multiple Directories").

I think Andrew's idea for the Storage factory is a good idea. I think
the storage factory you would write would be pretty simple, the actual
writing to disk would be by the existing file system storage factory.
You factory would be making the decisions about which directory to
select for any file. Something like:

                         +------> FileSystemSF for dir1
                         |
  derby --> SegmentSF ---+------> FileSystemSF for dir2
                         |
                         +------> FileSystemSF for dir3

Thus the SegmentSF would be delegating to the FileSystemSF or maybe even
returning the FileSystemSF objects directly.

Something simple initially would get you going, say round-robin for file
placement, then worry about total size allocation as a secondary item.

It might make sense for the total size allocation to be a separate
storage factory, that could then be used without the segmenting.
E.g.


                         +------> SizeSF(150M)->FileSystemSF for dir1
                         |
  derby --> SegmentSF ---+------> SizeSF(100M)->FileSystemSF for dir2
                         |
                         +------> SizeSF(200M)->FileSystemSF for dir3


Welcome to the community!
Dan.



Mime
View raw message