Which are the best options available if I want my MirageOS unikernel to store some information on an external DB (doesn't matter the type)? I had a look at different solutions but it seems that none of the libraries offering DB bindings are XEN-compatible. Last one I tried is Redis but apparently the ocaml library cannot be compiled for XEN.
Asked
Active
Viewed 190 times
1 Answers
2
The Redis code looks like it should work on Xen. It appears (from a quick look) that there is a Redis
core module and a separate Redis_lwt
that applies it to Lwt_unix
. You probably need to write a Mirage-equivalent version of this:
https://github.com/0xffea/ocaml-redis/blob/master/src/redis_lwt.ml
Most bits would be the same, but things using Unix APIs would need changing. E.g the Lwt_unix.socket
would need changing to using Mirage's TCP/IP API.

Thomas Leonard
- 7,068
- 2
- 36
- 40
-
Thanks for the suggestion! Anyway do you know if there are any other MirageOS/XEN-ready DB libraries? – Vittorio Cozzolino Feb 23 '16 at 09:29
-
Curious about this, did you end up actually getting that to work ? Taking a look at the code, it seems there are references to unix stuff in more than redis_lwt.ml unfortunatly, at least now – Ulrar Jul 07 '18 at 10:30