[Haskell-cafe] Map with incremental serialization

Carter Schonwald carter.schonwald at gmail.com
Sat Oct 11 14:36:47 UTC 2014


Another option would be to use something like sqlite or lmdb as a library.
On Oct 11, 2014 4:12 AM, "Chris Wong" <lambda.fairy at gmail.com> wrote:

> On Sat, Oct 11, 2014 at 10:06 AM, Britt Mathis <britt.mathis at gmail.com>
> wrote:
> > "Acid state has two logs on disk, one for events and another for
> > checkpoints. " - does this mean that I choose which to do (for
> > instance, I want the state to be saved every 10 minutes or so but
> > obviously just the events), or does acid-state handle this internally?
>
> It appends events to a journal automatically, but only saves
> checkpoints when you explicitly tell it to.
>
> Usually checkpointing happens when the server shuts down
> (saveCheckpointAndClose) but you probably want to trigger it manually
> every night or so. This process runs in the background, so your
> application can stay online while the checkpoint is saved.
>
> Note that saving checkpoints is only an optimization; acid-state can
> reconstruct your data from the event log alone. Having a recent
> checkpoint does makes startup/recovery faster though, and saves space
> on disk.
>
> Hackage is a very prominent user of acid-state. You might like to look
> into how they do things.
>
> Chris
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141011/776088ce/attachment.html>


More information about the Haskell-Cafe mailing list