You could write some custom backends for https://irmin.org/ I guess.
> Irmin is an OCaml library for building mergeable, branchable distributed data stores.