From: gabriele renzi Date: 2003-04-26T07:44:36+09:00 Subject: Re: Persistant data il Sat, 26 Apr 2003 05:43:03 +0900, Matt Lawrence ha scritto:: >Ok, I've been looking at Marshal, PStore, Madelaine and mnemonic. None of >them seem to provide the simple and transparent mechanism that I'm looking >for. > >I'd like to be able to do something like: > > arr = PersistantArray.use("") > hash = PersistentHash.use("") > >Where is the name of the file to read and write data from and >the resulting object has all of the methods of Array or Hash and all >changes to the Array of Hash are automatically stored. # this could be completely wrong I suppose that this is a work for persistence/prevalence layers, but I don't think thay would actually save *each* change. But it seem to me that working this way you'll have too many atomic writings, and you'll loose in performance. The Madeleine/prevayler approach should be to save the state of the application space with predefined time slices, while the persistence layer approach should be about using save/retrieve methods, so you'll just have to add a obj.save the way you'll use Marshal(obj,io). Possibly this performance/fault_tolerance problem is the same of the sync/async writing in filesystems, and a middle-way approach a-la Madeleine could be , imho, a good thing