Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2006

Tip: Looking for answers? Try searching our database.

Looking for design inspiration with swapping algorithm

Thread view: 
exits funnel - 03 Aug 2006 20:19 GMT
Hello,

I'm working on a project for which I've 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.  Up to
this point, the collections have existed entirely in memory but now the
requirement has been added to support swapping to disk.  I've played
around a bit with the DataInputStream/DataOutputStream classes and
reading/writing blocks of pages 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 effiecently.  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?  Even general ramblings will be appreciated.  Thanks in
advance for any thoughts.

-exits
Furious George - 04 Aug 2006 03:17 GMT
> Hello,
>
[quoted text clipped - 16 lines]
> similar problem?  Even general ramblings will be appreciated.  Thanks in
> advance for any thoughts.

I would suggest you use a database.

> -exits


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.