[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Irmin API evolution



Hi Thomas,

> First, Irmin seems to be trying to do two things:
> 
> 1. Provide a Git-like API that isn't tied to ocaml-git, and that
> provides higher-level functions such as "merge" and
> "find-common-ancestor".

And a notification mechanism, and transactions. But yes, the merge combinators 
(that you are not using at all in Cuekeeper :p) are an important part of Irmin.

> 2. Use Git to implement a mutable key-value store (by making a commit
> each time you update something).
> 
> Secondly, I think the current API makes it too easy to introduce
> races. The simplest way to use Irmin is roughly:

Yes, the idea is to provide an API similar to the the usual mutable key-value 
store that users already know, but with a way to efficiently fork and merge 
parallel universes to handle concurrency in a safe way. So yes, if you are 
using the mutable key-value store API without using the branches, you are 
deemed to have the usual problems with concurrency. I agree that this is not 
very well expressed in the current API, so I'll try to improve that in the next 
version.

> I feel that the key-value store is just one possible use of Irmin and
> should be an optional component built on top of it. For CueKeeper at
> least, I found it easier to think in terms of immutable trees and
> commits rather than mutable key-value stores. CueKeeper's Irmin
> wrapper is really more of an "unwrapper".

Yes, I think the Git data-model is really great to express all of various sort 
of concurrency models (and we don't really know yet which one is the best one, 
although exposing the immutability has lots of appeals to me), so I really like 
Irmin to continue to be the basis for experimenting on this. I'm already quite 
happy to see that a lot of different use-cases (IMAP, ARP, XenStore, Graph 
databases, multi-tabs browser apps, distributed builder, etc.) fit into that 
model more or less naturally (which sometimes requires some complete rewrite of 
parts of Irmin...) so I'll continue to improve the API to have more crazy 
version-controlled applications in the future :-)

> Anyway, thanks for looking into this! Hopefully there's something of
> use in the above...

That's very useful, thanks!

Thomas


_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.