<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Riak Demo: Stickynotes</title>
	<atom:link href="http://blog.beerriot.com/2009/08/17/riak-demo-stickynotes/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.beerriot.com/2009/08/17/riak-demo-stickynotes/</link>
	<description>The making of BeerRiot and other thoughts.</description>
	<lastBuildDate>Wed, 28 Oct 2009 04:17:24 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: J</title>
		<link>http://blog.beerriot.com/2009/08/17/riak-demo-stickynotes/#comment-1688</link>
		<dc:creator>J</dc:creator>
		<pubDate>Wed, 28 Oct 2009 04:17:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=195#comment-1688</guid>
		<description>Thanks Bryan! That clarifies things :)</description>
		<content:encoded><![CDATA[<p>Thanks Bryan! That clarifies things <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan</title>
		<link>http://blog.beerriot.com/2009/08/17/riak-demo-stickynotes/#comment-1687</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Wed, 28 Oct 2009 02:08:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=195#comment-1687</guid>
		<description>Aha!  The important paragraph was the one just before the bit you quoted - the part where it talks about the affect_write/4 function in the notes module.

When using the stickynotes app, instead of curl, the notes bucket is marked as being handled by the &#039;notes&#039; module.  When objects are stored in the notes bucket, functions from this module are called, and it is one of those functions that adds the reverse link to the groups object.

If you wanted to do the same with just curl, you&#039;d need to execute something like:

&gt; curl -X PUT -H &quot;content-type: application/json&quot; http://127.0.0.1:8098/jiak/notes --data &quot;{\&quot;bucket_mod\&quot;:\&quot;notes\&quot;}&quot;

Assuming you&#039;re using the stickynotes riak config file, and therefore have the stickynotes ebin in your code path, and the notes and groups atoms exist, riak will make the calls you expect, and notes:affect_write/4 will add that reverse link for you.

HOWEVER, the curl command described required that you pull the latest riak (as of this evening).  I just patched a bug while writing this reply.  If it&#039;s inconvenient for you to update riak, you can get the same effect by typing the following two lines at the erlang shell running riak (assuming you used the debug-fresh.sh script):

&gt; {ok, C} = riak:local_client().
&gt; C:set_bucket(&lt;&gt;, [{bucket_mod, notes}]).</description>
		<content:encoded><![CDATA[<p>Aha!  The important paragraph was the one just before the bit you quoted &#8211; the part where it talks about the affect_write/4 function in the notes module.</p>
<p>When using the stickynotes app, instead of curl, the notes bucket is marked as being handled by the &#8216;notes&#8217; module.  When objects are stored in the notes bucket, functions from this module are called, and it is one of those functions that adds the reverse link to the groups object.</p>
<p>If you wanted to do the same with just curl, you&#8217;d need to execute something like:</p>
<p>&gt; curl -X PUT -H &#8220;content-type: application/json&#8221; <a href="http://127.0.0.1:8098/jiak/notes" rel="nofollow">http://127.0.0.1:8098/jiak/notes</a> &#8211;data &#8220;{\&#8221;bucket_mod\&#8221;:\&#8221;notes\&#8221;}&#8221;</p>
<p>Assuming you&#8217;re using the stickynotes riak config file, and therefore have the stickynotes ebin in your code path, and the notes and groups atoms exist, riak will make the calls you expect, and notes:affect_write/4 will add that reverse link for you.</p>
<p>HOWEVER, the curl command described required that you pull the latest riak (as of this evening).  I just patched a bug while writing this reply.  If it&#8217;s inconvenient for you to update riak, you can get the same effect by typing the following two lines at the erlang shell running riak (assuming you used the debug-fresh.sh script):</p>
<p>&gt; {ok, C} = riak:local_client().<br />
&gt; C:set_bucket(&lt;&gt;, [{bucket_mod, notes}]).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J</title>
		<link>http://blog.beerriot.com/2009/08/17/riak-demo-stickynotes/#comment-1686</link>
		<dc:creator>J</dc:creator>
		<pubDate>Tue, 27 Oct 2009 21:32:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=195#comment-1686</guid>
		<description>Sorry, I wasn&#039;t very clear in stating my confusion. Ignoring my final curl command, I did everything according to the blog instructions including the following:

&quot;...I can now use the Jiak utility jaywalker to get all of the notes in the todo group with a single query:
$ curl http://127.0.0.1:8098/jiak/groups/todos/notes,_,_&quot;

But at this point, I received an empty &quot;results&quot; list, as I&#039;ve shown, instead of receiving &quot;all of the notes&quot; as it is stated. Did I misunderstand this sentence?</description>
		<content:encoded><![CDATA[<p>Sorry, I wasn&#8217;t very clear in stating my confusion. Ignoring my final curl command, I did everything according to the blog instructions including the following:</p>
<p>&#8220;&#8230;I can now use the Jiak utility jaywalker to get all of the notes in the todo group with a single query:<br />
$ curl <a href="http://127.0.0.1:8098/jiak/groups/todos/notes,_,_" rel="nofollow">http://127.0.0.1:8098/jiak/groups/todos/notes,_,_</a>&#8221;</p>
<p>But at this point, I received an empty &#8220;results&#8221; list, as I&#8217;ve shown, instead of receiving &#8220;all of the notes&#8221; as it is stated. Did I misunderstand this sentence?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan</title>
		<link>http://blog.beerriot.com/2009/08/17/riak-demo-stickynotes/#comment-1684</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Mon, 26 Oct 2009 22:33:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=195#comment-1684</guid>
		<description>Yep.  Sounds like you understood it backward.

Your first curl command creates the &quot;todos&quot; item in the &quot;groups&quot; bucket.

Your second curl command creates the &quot;blog&quot; item in the &quot;notes&quot; bucket.  You&#039;ve added a link in the &quot;notes/blog&quot; item that points to the &quot;groups/todos&quot; item.

Your third curl command asks Riak to start at the &quot;groups/todos&quot; item and follow all &quot;notes&quot; links it has.  The &quot;groups/todos&quot; item has no links at all, so Riak finds nothing to give you.

Your final curl command asks Riak to start at the &quot;notes/blog&quot; item and follow all &quot;groups&quot; links it has.  It has one link (the one you added in the second curl command), so it follows that one, finds the &quot;groups/todos&quot; item and returns it to you.

Make sense?</description>
		<content:encoded><![CDATA[<p>Yep.  Sounds like you understood it backward.</p>
<p>Your first curl command creates the &#8220;todos&#8221; item in the &#8220;groups&#8221; bucket.</p>
<p>Your second curl command creates the &#8220;blog&#8221; item in the &#8220;notes&#8221; bucket.  You&#8217;ve added a link in the &#8220;notes/blog&#8221; item that points to the &#8220;groups/todos&#8221; item.</p>
<p>Your third curl command asks Riak to start at the &#8220;groups/todos&#8221; item and follow all &#8220;notes&#8221; links it has.  The &#8220;groups/todos&#8221; item has no links at all, so Riak finds nothing to give you.</p>
<p>Your final curl command asks Riak to start at the &#8220;notes/blog&#8221; item and follow all &#8220;groups&#8221; links it has.  It has one link (the one you added in the second curl command), so it follows that one, finds the &#8220;groups/todos&#8221; item and returns it to you.</p>
<p>Make sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J</title>
		<link>http://blog.beerriot.com/2009/08/17/riak-demo-stickynotes/#comment-1683</link>
		<dc:creator>J</dc:creator>
		<pubDate>Mon, 26 Oct 2009 18:27:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=195#comment-1683</guid>
		<description>I have ran the following curl commands:

$ sudo ./start-fresh.sh config/riak-demo.erlenv
$ curl -X PUT -H &quot;Content-type: application/json&quot; http://127.0.0.1:8098/jiak/groups/todos -d &quot;{\&quot;bucket\&quot;:\&quot;groups\&quot;,\&quot;key\&quot;:\&quot;todos\&quot;,\&quot;object\&quot;:{\&quot;name\&quot;:\&quot;todo\&quot;},\&quot;links\&quot;:[]}&quot;
$ curl -X PUT -H &quot;Content-type: application/json&quot; http://127.0.0.1:8098/jiak/notes/blog -d &quot;{\&quot;bucket\&quot;:\&quot;notes\&quot;,\&quot;key\&quot;:\&quot;blog\&quot;,\&quot;object\&quot;:{\&quot;text\&quot;:\&quot;finish blog post\&quot;,\&quot;x\&quot;:0,\&quot;y\&quot;:0,\&quot;z\&quot;:0,\&quot;color\&quot;:\&quot;green\&quot;},\&quot;links\&quot;:[[\&quot;groups\&quot;,\&quot;todos\&quot;,\&quot;open\&quot;]]}&quot;
$ curl http://127.0.0.1:8098/jiak/groups/todos/notes,_,_
{&quot;results&quot;:[[]]}
$ curl http://127.0.0.1:8098/jiak/notes/blog/groups,_,_
{&quot;results&quot;:[[{&quot;object&quot;:{&quot;name&quot;:&quot;todo&quot;},&quot;vclock&quot;:&quot;a85hYGBgzGDKBVIsjGWr2jOYEhnzWBk4EqKO8GUBAA==&quot;,&quot;lastmod&quot;:&quot;Mon, 26 Oct 2009 18:01:44 GMT&quot;,&quot;vtag&quot;:&quot;23zAcKJCpRQzn8HKxdy5jh&quot;,&quot;bucket&quot;:&quot;groups&quot;,&quot;key&quot;:&quot;todos&quot;,&quot;links&quot;:[]}]]}

Based on your instructions and from my understanding of links the results for the 4th and 5th commands seem to be switched. Did I miss something?</description>
		<content:encoded><![CDATA[<p>I have ran the following curl commands:</p>
<p>$ sudo ./start-fresh.sh config/riak-demo.erlenv<br />
$ curl -X PUT -H &#8220;Content-type: application/json&#8221; <a href="http://127.0.0.1:8098/jiak/groups/todos" rel="nofollow">http://127.0.0.1:8098/jiak/groups/todos</a> -d &#8220;{\&#8221;bucket\&#8221;:\&#8221;groups\&#8221;,\&#8221;key\&#8221;:\&#8221;todos\&#8221;,\&#8221;object\&#8221;:{\&#8221;name\&#8221;:\&#8221;todo\&#8221;},\&#8221;links\&#8221;:[]}&#8221;<br />
$ curl -X PUT -H &#8220;Content-type: application/json&#8221; <a href="http://127.0.0.1:8098/jiak/notes/blog" rel="nofollow">http://127.0.0.1:8098/jiak/notes/blog</a> -d &#8220;{\&#8221;bucket\&#8221;:\&#8221;notes\&#8221;,\&#8221;key\&#8221;:\&#8221;blog\&#8221;,\&#8221;object\&#8221;:{\&#8221;text\&#8221;:\&#8221;finish blog post\&#8221;,\&#8221;x\&#8221;:0,\&#8221;y\&#8221;:0,\&#8221;z\&#8221;:0,\&#8221;color\&#8221;:\&#8221;green\&#8221;},\&#8221;links\&#8221;:[[\"groups\",\"todos\",\"open\"]]}&#8221;<br />
$ curl <a href="http://127.0.0.1:8098/jiak/groups/todos/notes,_,_" rel="nofollow">http://127.0.0.1:8098/jiak/groups/todos/notes,_,_</a><br />
{&#8220;results&#8221;:[[]]}<br />
$ curl <a href="http://127.0.0.1:8098/jiak/notes/blog/groups,_,_" rel="nofollow">http://127.0.0.1:8098/jiak/notes/blog/groups,_,_</a><br />
{&#8220;results&#8221;:[[{"object":{"name":"todo"},"vclock":"a85hYGBgzGDKBVIsjGWr2jOYEhnzWBk4EqKO8GUBAA==","lastmod":"Mon, 26 Oct 2009 18:01:44 GMT","vtag":"23zAcKJCpRQzn8HKxdy5jh","bucket":"groups","key":"todos","links":[]}]]}</p>
<p>Based on your instructions and from my understanding of links the results for the 4th and 5th commands seem to be switched. Did I miss something?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Serge</title>
		<link>http://blog.beerriot.com/2009/08/17/riak-demo-stickynotes/#comment-1675</link>
		<dc:creator>Serge</dc:creator>
		<pubDate>Tue, 20 Oct 2009 00:51:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=195#comment-1675</guid>
		<description>Terrific - I think that auto-generated riak_util:unique_id_62 will never fall into one vnode. Or event e-mail addresses for that matter.

I still miss those ordinary 1,2,3... ids like the known @@identity or SEQUENCE, but I admit that they might be non-adequate to the volatile networking multi-node environment with no master node in it.</description>
		<content:encoded><![CDATA[<p>Terrific &#8211; I think that auto-generated riak_util:unique_id_62 will never fall into one vnode. Or event e-mail addresses for that matter.</p>
<p>I still miss those ordinary 1,2,3&#8230; ids like the known @@identity or SEQUENCE, but I admit that they might be non-adequate to the volatile networking multi-node environment with no master node in it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan</title>
		<link>http://blog.beerriot.com/2009/08/17/riak-demo-stickynotes/#comment-1674</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Mon, 19 Oct 2009 19:18:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=195#comment-1674</guid>
		<description>One vnode overflowing before all others is very unlikely, unless you happen to store some single object big enough to fill an entire vnode on its own.  Otherwise, the consistent hashing function and ring partition claim strategies are well-distributed enough that all vnodes should fill approximately evenly.

There is currently nothing in the dets_backend watching for a potential overflow, but limit-checking code could be added.

...or you could choose among the other available backends.</description>
		<content:encoded><![CDATA[<p>One vnode overflowing before all others is very unlikely, unless you happen to store some single object big enough to fill an entire vnode on its own.  Otherwise, the consistent hashing function and ring partition claim strategies are well-distributed enough that all vnodes should fill approximately evenly.</p>
<p>There is currently nothing in the dets_backend watching for a potential overflow, but limit-checking code could be added.</p>
<p>&#8230;or you could choose among the other available backends.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Serge</title>
		<link>http://blog.beerriot.com/2009/08/17/riak-demo-stickynotes/#comment-1673</link>
		<dc:creator>Serge</dc:creator>
		<pubDate>Mon, 19 Oct 2009 17:52:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=195#comment-1673</guid>
		<description>I was close to that in my assumptions, but not that definite, of course. To summarize that (please correct me if any), the &quot;small&quot; DB for _corporate_ use can be set up as
 - one box with 
 - one node on it
 - with 16 (say) vnodes assigned to it 
will be able to hold 16x2 = _lotsa_ textual data, provided the BLOBs will be placed directly into the file system and the static links will go into the dets instead.

The last straw of fear before the thing is that under improbable conditions one of vnodes gets overflown way earlier than the others. Are there any triggers implemented or in mind to face that? Or it is totally unlikely?</description>
		<content:encoded><![CDATA[<p>I was close to that in my assumptions, but not that definite, of course. To summarize that (please correct me if any), the &#8220;small&#8221; DB for _corporate_ use can be set up as<br />
 &#8211; one box with<br />
 &#8211; one node on it<br />
 &#8211; with 16 (say) vnodes assigned to it<br />
will be able to hold 16&#215;2 = _lotsa_ textual data, provided the BLOBs will be placed directly into the file system and the static links will go into the dets instead.</p>
<p>The last straw of fear before the thing is that under improbable conditions one of vnodes gets overflown way earlier than the others. Are there any triggers implemented or in mind to face that? Or it is totally unlikely?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan</title>
		<link>http://blog.beerriot.com/2009/08/17/riak-demo-stickynotes/#comment-1672</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Mon, 19 Oct 2009 16:45:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=195#comment-1672</guid>
		<description>dets_backend is, in fact, subject to all of the limitations of dets.

BUT, you must realize that Riak, by its distributed nature, mostly skirts the space limitations of dets.

Each Riak vnode using the dets_backend will open its own table.  The number of vnodes is determined by the ring_creation_size parameter in the configuration file.  This is often set to something like 16 in developer setups, or 1024 or more in production deployments.  16*2GB or 1024*2GB is a different ballgame.

Furthermore, it is *not* a requirement of Riak that the entire dataset fit on one node.  In fact, data stored with a N-value less than the number of nodes in your cluster will not be stored on all nodes.  Therefore, the &quot;maximum capacity&quot; of a given cluster configuration is not as simple as the &quot;maximum capacity&quot; of any given node or backend.</description>
		<content:encoded><![CDATA[<p>dets_backend is, in fact, subject to all of the limitations of dets.</p>
<p>BUT, you must realize that Riak, by its distributed nature, mostly skirts the space limitations of dets.</p>
<p>Each Riak vnode using the dets_backend will open its own table.  The number of vnodes is determined by the ring_creation_size parameter in the configuration file.  This is often set to something like 16 in developer setups, or 1024 or more in production deployments.  16*2GB or 1024*2GB is a different ballgame.</p>
<p>Furthermore, it is *not* a requirement of Riak that the entire dataset fit on one node.  In fact, data stored with a N-value less than the number of nodes in your cluster will not be stored on all nodes.  Therefore, the &#8220;maximum capacity&#8221; of a given cluster configuration is not as simple as the &#8220;maximum capacity&#8221; of any given node or backend.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Serge</title>
		<link>http://blog.beerriot.com/2009/08/17/riak-demo-stickynotes/#comment-1671</link>
		<dc:creator>Serge</dc:creator>
		<pubDate>Mon, 19 Oct 2009 15:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=195#comment-1671</guid>
		<description>Yes, I have read about R&lt;N great feature of &quot;always available&quot;, &quot;consistency - may be later&quot; in the original. I have seen yours and Karger et al references on it, that is the starting point of all things here.

  My question was rather about that later moment. When all nodes are back up again or connection gets restored - I strongly believe the consistensy will be back for deleted keys as well. The test (experiment) will certainly demonstrate it. 
And you are right - the reset won&#039;t need to delete the bucket, clearing all keys will suffice for my purposes.

The last (is there such thing?) question: is dets_backend capable to hold more than that notorious 2Gb? This one seems critical in the persistent storage selection and I could not find any definite answer yet.

Thank you.</description>
		<content:encoded><![CDATA[<p>Yes, I have read about R&lt;N great feature of &quot;always available&quot;, &quot;consistency &#8211; may be later&quot; in the original. I have seen yours and Karger et al references on it, that is the starting point of all things here.</p>
<p>  My question was rather about that later moment. When all nodes are back up again or connection gets restored &#8211; I strongly believe the consistensy will be back for deleted keys as well. The test (experiment) will certainly demonstrate it.<br />
And you are right &#8211; the reset won&#039;t need to delete the bucket, clearing all keys will suffice for my purposes.</p>
<p>The last (is there such thing?) question: is dets_backend capable to hold more than that notorious 2Gb? This one seems critical in the persistent storage selection and I could not find any definite answer yet.</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
