map function for link-walking

Nicolas Fouché nicolas at
Mon Jul 12 11:16:10 EDT 2010

Discussing about this with danoyoung and seancribbs on IRC, I created
two Ruby gists which implement this "custom-link"-walking solution.


On Sun, Jul 11, 2010 at 5:03 PM, Bryan Fink <bryan at> wrote:
> On Sun, Jul 11, 2010 at 9:19 AM, Nicolas Fouché <nicolas at> wrote:
>> I did not find any doc about preloading javascript functions. Is it
>> the same as storing JS files in a bucket and load them thanks to the
>> "bucket" and "key" fields, as described in the "Map" paragraph of the
>> Fast Track ?
> Oops.  You're right - we haven't documented this feature well.  The
> best I've found is Kevin Smith's reply to another thread on this list:
> It involves modifying your app.config file to set the js_source_dir
> variable for the riak_kv app.  For a good example of how to structure
> a preloaded-JS file, check out the one that ships with Riak:
> All of the functions in that file are available to Javascript
> map/reduce functions as Riak.<function name>.  Those functions will
> still be available even after you set js_source_dir.  You might
> consider wrapping your application's useful functions in a MyApp class
> or some such.
> It's also useful to know about "bin/riak-admin js_reload" if you're
> doing this.  That command will re-read all of your preloaded
> Javascript files.
> -Bryan

More information about the riak-users mailing list