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

Re: [MirageOS-devel] Custom KV_RO Implementation



Sorry, sent too soon. I meant to say:

let r1 = implementation kv_ro () (module Rediskv.Kv)

(but that's assuming Kv isn't parameterised). Then you have to fix the compile error in Rediskv.Make. But after that:

Error loading config: error loading shared library: /home/luked/mirage/sad_butter/src/_build/config.cmxs: undefined symbol: camlRediskv

So I don't know if "mirage configure" actually supports your case of referring to another module from within config.ml

Luke


On 20 December 2014 at 00:26, Luke Dunstan <lukedunstan81@xxxxxxxxx> wrote:
I am new to Mirage too, so I could be quite wrong...

I don't see anywhere in your code where you are calling "impl". But anyway, "impl" is private because it's not exposed (as a val) in mirage.mli:


However, the function "implementation" is public and does basically the same thing. So you want:


Also, your Kv module probably shouldn't take another KV_RO module as a parameter, unless you need it for something (. The Crunch module doesn't take any such parameter.

Luke



On 19 December 2014 at 22:49, Brian Brietzke <bbrietzke@xxxxxxxxx> wrote:
I got a chance to see the video from CodeMesh London (Âhttps://www.youtube.com/watch?v=hAZhm66pwhc&feature=youtube_gdata ) and it help make some of the things in the Mirage code base makes sense. It also helped put me on the right path for building a configurable framework that could be used along and inside of Mirage. Make everything modules and use functors to provide the implementation!

Which sounds easy, but I'm struggling along.

What I would like to start off with is a new implementation of the KV_RO module but using Redis instead of crunch or the file system. Â

I think I need three things: Âone is the actual implementation module that implements the KV_RO interface / module, one module that provides the packages and libraries you need ( the Impl module? ) and then another for tie those together.

I think I'm struggling with the part of tying things together and making them work. Â

I started with the crunch kv_ro example since it was close enough to what I want to do. I have a module named Kv that provides the libraries/packages/configure roughed out and had ( and will add it back ) a module for the redis kv_ro.

I've had functors and just normal functions that try to create the modules based on the what is done for crunch ( impl kv_ro host (module Kv/KvRoRedis/etc )) and I'm told that impl cannot be found. When i try to use Kv or KvRoRedis directly, i receive an unbound constructor error.

Code can be found at:

Any help or guidance would be appreciated.

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

_______________________________________________
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®.