Future roadmap for indexed queries?

Kevin Smith ksmith at basho.com
Sat Feb 27 09:27:01 EST 2010


Preloading javascript functions will speed up their execution for two reasons: 

1. Anonymous functions are slow because Riak has to a) check to see if they're defined and b) define them if they don't exist

2. Preloading occurs at Javascript VM startup thus moving all the parsing/compiling for the functions to before any queries are run

What this _does not_ do is provide any data caching. Internally Riak will cache data fetched during a map phase until either the data is updated, thus invalidating the cache, or the cache ejection algorithm runs (which is, I think once per minute, but that's off the top of my head). We are investigating replacing the map cache with a fixed size LRU cache which would provide better cache effects for commonly queried data. That doesn't exist now so the cache will get flushed on a regular interval.

--Kevin
On Feb 26, 2010, at 7:11 PM, Preston Marshall wrote:

> Look in the riak config file for {js_source_dir, "/tmp/js_source"}.  Modify this to your likings, and Riak will parse each function in the file(s).
> On Feb 26, 2010, at 4:26 PM, Doug Tangren wrote:
> 
>> How do clients cache/register customer named map/reduce functions with the riak server?
>>  
>> -Doug Tangren
>> http://lessis.me
>> 
>> 
>> On Fri, Feb 26, 2010 at 4:57 PM, Preston Marshall <preston at synergyeoc.com> wrote:
>> John, Riak allows you to cache mapreduce queries if you create them as named queries.  In a way, this kind of creates an index, because I think it works a bit like CouchDB where the caches are added to when there is new data.  I think Riak also has a similar query paradigm to CouchDB, which is dynamic data, static queries.  I may be completely wrong here, so feel free to correct me.
>> 
>> Thanks,
>> Preston
>> 
>> On Feb 26, 2010, at 3:53 PM, John Lynch wrote:
>> 
>>> I am preparing to give a talk on Riak next week to a local Ruby user group here in San Diego, and wanted to get your thoughts on the future of Riak.  While in its current form it is awesome for loads of use cases, it falls short in the whole querying department, at least as it relates to building typical web applications. I get the map/reduce features, and the link features, but are there any plans to build in indexed query capabilities, a la MongoDB?  Mongo obviously has an easier time of this since it knows exactly what format your data is in (BSON). Or, is this something you would leave to third-parties to build as part of an ORM framework like Ripple, for example, which would have a better idea of the shape of the data and could create/maintain indexes accordingly...
>>> 
>>> 
>>> Regards,
>>> 
>>> John Lynch, CTO
>>> Rigel Group, LLC
>>> john at rigelgroupllc.com
>>> 
>>> _______________________________________________
>>> riak-users mailing list
>>> riak-users at lists.basho.com
>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>> 
>> 
>> _______________________________________________
>> riak-users mailing list
>> riak-users at lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>> 
>> 
> 
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com





More information about the riak-users mailing list