File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

random access indexed file for java objects' serialization

 
Sudipta Dey
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am implementing a stategy for managing java object in memory thru swapping between memory & disk. I have throught of persistence mechanism for each object using java's object serialization. These objects are stored in an object array. This strategy works fine for small number of objects and give good results.
But in real scenario (the software tool where i am going use this strategy), there can be object count ranging from 50k to 500k. So serializing a each object to a file does not work for me, as the number of files in the disk will be a number where it becomes unmanagable by the OS or JVM.
So I am planning to write all the objects to a indexed file. I will access the Objects randomly from that file whenever needed. These objects differ in sizes and object size can increase or decrease during the run.

Can I get some suggestions how can I implement such kind of thing???

Thanks & Regards,
Sudipto
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First I'd wonder wether someone already implemented such an algorithm.

I'd also probably consider using a lightweight OO database.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13047
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You certainly would not be able to re-write a modified object to the same place in the random access file. A google search for "java object database" found lots of hits.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic