* most efficient method of storing records held in array @ 2015-03-23 11:56 tonyg 2015-03-23 15:34 ` Jeffrey Carter ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: tonyg @ 2015-03-23 11:56 UTC (permalink / raw) I have several fairly long arrays of records that I want to store to disk on a as needed basis, but I don't want to use a database. Especially after reading that comparison between database speed and persistant objects that was recently floated. I did look at the persistent objects library in the Dmitrys Kazakov components library but I'm finding it difficult to understand what is going on there despite the large amount of documentation. Are there any other examples out there using this library? I was thinking of a generic library using direct io to save on the index whenever the values are changed. What do you guys think? ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: most efficient method of storing records held in array 2015-03-23 11:56 most efficient method of storing records held in array tonyg @ 2015-03-23 15:34 ` Jeffrey Carter 2015-03-23 17:35 ` Dmitry A. Kazakov 2015-03-26 11:05 ` tonyg 2 siblings, 0 replies; 4+ messages in thread From: Jeffrey Carter @ 2015-03-23 15:34 UTC (permalink / raw) On 03/23/2015 04:56 AM, tonyg wrote: > > > Are there any other examples out there using this library? I was thinking of > a generic library using direct io to save on the index whenever the values > are changed. I think efficiency is a poor reason to avoid a simple solution, at least until you have tried it and found it doesn't meet your timing requirements. However, it sounds as if, for your case, the simplest solution might be to hide the array in a package and provide Put and Get operations, with Put writing the new value to disk using Ada.Direct_IO. -- Jeff Carter "What's the amount of the insult?" Never Give a Sucker an Even Break 104 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: most efficient method of storing records held in array 2015-03-23 11:56 most efficient method of storing records held in array tonyg 2015-03-23 15:34 ` Jeffrey Carter @ 2015-03-23 17:35 ` Dmitry A. Kazakov 2015-03-26 11:05 ` tonyg 2 siblings, 0 replies; 4+ messages in thread From: Dmitry A. Kazakov @ 2015-03-23 17:35 UTC (permalink / raw) On Mon, 23 Mar 2015 04:56:40 -0700 (PDT), tonyg wrote: > I have several fairly long arrays of records that I want to store to disk > on a as needed basis, but I don't want to use a database. > > Especially after reading that comparison between database speed and > persistant objects that was recently floated. > > I did look at the persistent objects library in the Dmitrys Kazakov > components library but I'm finding it difficult to understand what is > going on there despite the large amount of documentation. > > Are there any other examples out there using this library? I was thinking > of a generic library using direct io to save on the index whenever the > values are changed. The implementation of the persistence layer is based on Direct_IO, actually. > What do you guys think? Everything depends on the intended usage. Whether data are immutable, how frequent in relation are insertion, seek, deletion, whether elements have fixed or variable size, should access be task-safe, which operations are required to be atomic, should the persistent structure survive hard system crashes, should the container file keep several structures, how they are identified (catalogue etc), could the structures be removed independently and so on. There is no ultimate solution and efficiency (defined in any of multiple possible ways) highly depends on the choices made. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: most efficient method of storing records held in array 2015-03-23 11:56 most efficient method of storing records held in array tonyg 2015-03-23 15:34 ` Jeffrey Carter 2015-03-23 17:35 ` Dmitry A. Kazakov @ 2015-03-26 11:05 ` tonyg 2 siblings, 0 replies; 4+ messages in thread From: tonyg @ 2015-03-26 11:05 UTC (permalink / raw) Thanks for the info Guys! Thats seems a nice easy and safe way Jeff. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-26 11:05 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-03-23 11:56 most efficient method of storing records held in array tonyg 2015-03-23 15:34 ` Jeffrey Carter 2015-03-23 17:35 ` Dmitry A. Kazakov 2015-03-26 11:05 ` tonyg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox