Looking for some design inspiration

From: exits funnel <exNOitsfunSPAMMYnel_at_yahoo.com>
Date: Thu, 03 Aug 2006 13:27:38 -0700
Message-ID: <l0tAg.18043$Nv.16536_at_fed1read10>



Hello,

I apologize in advance if this is off-topic but it seems like the sort of problem database implementors must have spent a great deal of time thinking about.

I'm working on a project for which I've written what is essentially a custom collection class - an instance of which is roughly analogous to a relational table. The elements of the collection then are rows and the collection is divided into logical pages of a fixed (at compile time) number of rows. Each page is backed by a number of array instances none of which span pages. Up to this point, the collections have existed entirely in memory but now the requirement has been added to support swapping to disk effectively limiting the amount of RAM allocated to the sum of all collections at any given time. I've played around a bit with reading/writing blocks of pages to/from disk and this bit seems not to difficult a task but I'm in need of some inspiration for the management machinery. I imagine a single system wide disk file and writing blocks consisting of various pages from different instances of the collection but I'm not sure how to track the blocks so that when I need to swap in a given page, I can find it efficiently. I'm confident that left to my own devices I can craft something which works, but I'm much less confident that I can craft something which will perform satisfactorily. Can anyone suggest some useful patterns? Or possibly some discussion of the solution to a similar problem? I should mention that the implementation language is java so java references would be ideal though I'd also welcome any pointers to C/C++ references which address the topic. Even general ramblings will be appreciated. Thanks in advance for any thoughts.

-exits Received on Thu Aug 03 2006 - 22:27:38 CEST

Original text of this message