<?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/"
		>
<channel>
	<title>Comments for Snail in a Turtleneck</title>
	<atom:link href="http://www.snailinaturtleneck.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.snailinaturtleneck.com/blog</link>
	<description>Kristina Chodorow&#039;s Blog</description>
	<lastBuildDate>Sat, 04 Feb 2012 07:29:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Ask Me Anything by Vaibhav Kaushal</title>
		<link>http://www.snailinaturtleneck.com/blog/ask-me-anything/comment-page-1/#comment-4504</link>
		<dc:creator>Vaibhav Kaushal</dc:creator>
		<pubDate>Sat, 04 Feb 2012 07:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.snailinaturtleneck.com/blog/?page_id=1653#comment-4504</guid>
		<description>Ok. I will. But I am not saying that MongoDB is to be backedup with MySQL (there is no need either). It is just that I want a feature of be available in a PHP framework. This helps the &#039;SQL&#039; guys get onto Mongo very easily - that is my intention coz if I had to made the transition alone, given the way Mongo is made, I won&#039;t have a trouble! 

ANyways, thanks for the suggestion. Will look into it :)</description>
		<content:encoded><![CDATA[<p>Ok. I will. But I am not saying that MongoDB is to be backedup with MySQL (there is no need either). It is just that I want a feature of be available in a PHP framework. This helps the &#8216;SQL&#8217; guys get onto Mongo very easily &#8211; that is my intention coz if I had to made the transition alone, given the way Mongo is made, I won&#8217;t have a trouble! </p>
<p>ANyways, thanks for the suggestion. Will look into it <img src='http://www.snailinaturtleneck.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Comments Conundrum by Vaibhav Kaushal</title>
		<link>http://www.snailinaturtleneck.com/blog/2012/02/02/the-comments-conundrum/comment-page-1/#comment-4503</link>
		<dc:creator>Vaibhav Kaushal</dc:creator>
		<pubDate>Sat, 04 Feb 2012 07:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.snailinaturtleneck.com/blog/?p=1730#comment-4503</guid>
		<description>Thanks. I will ask them. You got a point! :)</description>
		<content:encoded><![CDATA[<p>Thanks. I will ask them. You got a point! <img src='http://www.snailinaturtleneck.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ask Me Anything by Addie Sze</title>
		<link>http://www.snailinaturtleneck.com/blog/ask-me-anything/comment-page-1/#comment-4502</link>
		<dc:creator>Addie Sze</dc:creator>
		<pubDate>Fri, 03 Feb 2012 22:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.snailinaturtleneck.com/blog/?page_id=1653#comment-4502</guid>
		<description>Hi Kristina,

Trying to use mongoDump&#039;s query ability to create incremental database dumps and hit a roadblock.

A query in the form of
&gt;db.oplog.rs.find({ts:{&#039;$gte&#039;:Timestamp(ISODate(&quot;2012-01-20 20:15:27&quot;),9899)}})
works perfectly in a mongo shell, however won&#039;t work in mongoDump.
&gt;mongodump --port 8011 -o tran --db local --collection oplog.rs -q &#039;{ts:{&#039;$gte&#039;:Timestamp(ISODate(&quot;2012-01-20 20:15:27&quot;),9899)}}&#039;connected to: 127.0.0.1:8011Fri Feb  3 17:08:59 Assertion: 10340:Failure parsing JSON string near: ts:{:Times0x5817f2 0x5282f4 0x52866e 0xaa151b 0xa97e6d 0xa9be02 0x3d44e1d994 0x4fdfd9 mongodump(_ZN5mongo11msgassertedEiPKc+0x112) [0x5817f2] mongodump(_ZN5mongo8fromjsonEPKcPi+0x444) [0x5282f4] mongodump(_ZN5mongo8fromjsonERKSs+0xe) [0x52866e] mongodump(_ZN4Dump3runEv+0x33b) [0xaa151b] mongodump(_ZN5mongo4Tool4mainEiPPc+0x169d) [0xa97e6d] mongodump(main+0x32) [0xa9be02] /lib64/libc.so.6(__libc_start_main+0xf4) [0x3d44e1d994] mongodump(__gxx_personality_v0+0x3c9) [0x4fdfd9]assertion: 10340 Failure parsing JSON string near: ts:{:Times
This is version 2.0.2.

Is this a bug? Can you suggest a work around?

Also, I realize that mongoDump version 2.1 added $timestamp capability for pulling partial oplog but I couldn&#039;t find any documentation of its usage and syntax. Can you shed some light on this?

You help is truely appreicated.

Regards,
Addie

</description>
		<content:encoded><![CDATA[<p>Hi Kristina,</p>
<p>Trying to use mongoDump&#8217;s query ability to create incremental database dumps and hit a roadblock.</p>
<p>A query in the form of<br />
&gt;db.oplog.rs.find({ts:{&#8216;$gte&#8217;:Timestamp(ISODate(&#8220;2012-01-20 20:15:27&#8243;),9899)}})<br />
works perfectly in a mongo shell, however won&#8217;t work in mongoDump.<br />
&gt;mongodump &#8211;port 8011 -o tran &#8211;db local &#8211;collection oplog.rs -q &#8216;{ts:{&#8216;$gte&#8217;:Timestamp(ISODate(&#8220;2012-01-20 20:15:27&#8243;),9899)}}&#8217;connected to: 127.0.0.1:8011Fri Feb  3 17:08:59 Assertion: 10340:Failure parsing JSON string near: ts:{:Times0x5817f2 0x5282f4 0x52866e 0xaa151b 0xa97e6d 0xa9be02 0x3d44e1d994 0x4fdfd9 mongodump(_ZN5mongo11msgassertedEiPKc+0&#215;112) [0x5817f2] mongodump(_ZN5mongo8fromjsonEPKcPi+0&#215;444) [0x5282f4] mongodump(_ZN5mongo8fromjsonERKSs+0xe) [0x52866e] mongodump(_ZN4Dump3runEv+0x33b) [0xaa151b] mongodump(_ZN5mongo4Tool4mainEiPPc+0x169d) [0xa97e6d] mongodump(main+0&#215;32) [0xa9be02] /lib64/libc.so.6(__libc_start_main+0xf4) [0x3d44e1d994] mongodump(__gxx_personality_v0+0x3c9) [0x4fdfd9]assertion: 10340 Failure parsing JSON string near: ts:{:Times<br />
This is version 2.0.2.</p>
<p>Is this a bug? Can you suggest a work around?</p>
<p>Also, I realize that mongoDump version 2.1 added $timestamp capability for pulling partial oplog but I couldn&#8217;t find any documentation of its usage and syntax. Can you shed some light on this?</p>
<p>You help is truely appreicated.</p>
<p>Regards,<br />
Addie</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Hacking Chess: Data Munging by Anonymous</title>
		<link>http://www.snailinaturtleneck.com/blog/2012/01/27/hacking-chess-data-munging/comment-page-1/#comment-4501</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 03 Feb 2012 18:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.snailinaturtleneck.com/blog/?p=1796#comment-4501</guid>
		<description>Nice :)</description>
		<content:encoded><![CDATA[<p>Nice <img src='http://www.snailinaturtleneck.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ask Me Anything by Anonymous</title>
		<link>http://www.snailinaturtleneck.com/blog/ask-me-anything/comment-page-1/#comment-4500</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 03 Feb 2012 18:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.snailinaturtleneck.com/blog/?page_id=1653#comment-4500</guid>
		<description>I don&#039;t think that adding transactional abilities or MySQL backing are very high priorities for us right now, but you might want to go on the mailing list and see what people think.  We&#039;re happy to offer free support if you have any questions.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think that adding transactional abilities or MySQL backing are very high priorities for us right now, but you might want to go on the mailing list and see what people think.  We&#8217;re happy to offer free support if you have any questions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Comments Conundrum by Anonymous</title>
		<link>http://www.snailinaturtleneck.com/blog/2012/02/02/the-comments-conundrum/comment-page-1/#comment-4499</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 03 Feb 2012 18:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.snailinaturtleneck.com/blog/?p=1730#comment-4499</guid>
		<description>Thank you :)

Yo ho ho, I&#039;m glad you were able to get a copy.  If you&#039;d like a copy, please ask bookstores to carry it if you can&#039;t find it on their shelves (that helps them know to order more MongoDB books).</description>
		<content:encoded><![CDATA[<p>Thank you <img src='http://www.snailinaturtleneck.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Yo ho ho, I&#8217;m glad you were able to get a copy.  If you&#8217;d like a copy, please ask bookstores to carry it if you can&#8217;t find it on their shelves (that helps them know to order more MongoDB books).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ask Me Anything by Vaibhav Kaushal</title>
		<link>http://www.snailinaturtleneck.com/blog/ask-me-anything/comment-page-1/#comment-4498</link>
		<dc:creator>Vaibhav Kaushal</dc:creator>
		<pubDate>Fri, 03 Feb 2012 12:27:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.snailinaturtleneck.com/blog/?page_id=1653#comment-4498</guid>
		<description>Hi Kristina,

You probably work on the PHP driver for MongoDB. You could help me a little (and MongoDB for that matter). And no, I am not asking for &quot;private support&quot;. I am currently using PostgreSQL for creating a small website of my own based on a PHP development framework named QCubed ( http://qcu.be/ ). The framework relies heavily on something called &#039;code generation&#039;. Speaking briefly about it, code generation would read in all the catalog info and create an ORM layer in PHP for the databases. A few examples: http://examples.qcu.be would help understand. 

Now, I am keen on MongoDB and want to use it later on. Have a 1.8 installation running on my machine too (although I dont get enough time to play around). Since MongoDB comes the closest to SQL while remaining in the NoSQL world, I thought about creating a virtual mapper for QCubed which could take in the Schema of a RDBMS and apply it to the collections on Mongo. Of course the driver can be used to add any additional data in any structure within the documents. Doing the RDBMS to MongoDB mapping has a little benefits of its own:

1. We are effectively using the transactional ability of an RDBMS with the speeds and flexibility of Mongo. So in case some data gets irrecoverable with Mongo, the RDBMS is always there. Plus, RDBMS will handle all the writes ONLY, making Mongo do all the tough job. This will effectively use RDBMS for transactional abilities and MongoDB for all the speed. Also, mongo could be used for gathering and analyzing statistical data and logs in realtime. 

2. With MySQL on a Blackhole engine, only MongoDB will work while schema changes will just require the schema change in MySQL. Blackhole engine will destroy incoming data so no extra space consumption (if so be the need). 

3. IIRC, mongoDB will create a new Key or Collection if I happen to mis-spell any. With QCubed, all tables are accessed via ORM Objects. Spelling mistakes will be next to dead (unless someone issued a custom query). 

4. I plan to make it a write twice, read once model - wherein the data is saved to both the RDBMS as well as Mongo and the read is preferably done only via Mongo and fallbacks reads are done from the RDBMS (such as when reading from secondaries to whom the changes have not propagated yet, but we know that the data was inserted). 

All of this is going to require a lot of insight, specially in the querying mechanism. With recent development, I think it would be easier but a help is surely appreciated from you / the MongoDB team. 

Regards</description>
		<content:encoded><![CDATA[<p>Hi Kristina,</p>
<p>You probably work on the PHP driver for MongoDB. You could help me a little (and MongoDB for that matter). And no, I am not asking for &#8220;private support&#8221;. I am currently using PostgreSQL for creating a small website of my own based on a PHP development framework named QCubed ( <a href="http://qcu.be/" rel="nofollow">http://qcu.be/</a> ). The framework relies heavily on something called &#8216;code generation&#8217;. Speaking briefly about it, code generation would read in all the catalog info and create an ORM layer in PHP for the databases. A few examples: <a href="http://examples.qcu.be" rel="nofollow">http://examples.qcu.be</a> would help understand. </p>
<p>Now, I am keen on MongoDB and want to use it later on. Have a 1.8 installation running on my machine too (although I dont get enough time to play around). Since MongoDB comes the closest to SQL while remaining in the NoSQL world, I thought about creating a virtual mapper for QCubed which could take in the Schema of a RDBMS and apply it to the collections on Mongo. Of course the driver can be used to add any additional data in any structure within the documents. Doing the RDBMS to MongoDB mapping has a little benefits of its own:</p>
<p>1. We are effectively using the transactional ability of an RDBMS with the speeds and flexibility of Mongo. So in case some data gets irrecoverable with Mongo, the RDBMS is always there. Plus, RDBMS will handle all the writes ONLY, making Mongo do all the tough job. This will effectively use RDBMS for transactional abilities and MongoDB for all the speed. Also, mongo could be used for gathering and analyzing statistical data and logs in realtime. </p>
<p>2. With MySQL on a Blackhole engine, only MongoDB will work while schema changes will just require the schema change in MySQL. Blackhole engine will destroy incoming data so no extra space consumption (if so be the need). </p>
<p>3. IIRC, mongoDB will create a new Key or Collection if I happen to mis-spell any. With QCubed, all tables are accessed via ORM Objects. Spelling mistakes will be next to dead (unless someone issued a custom query). </p>
<p>4. I plan to make it a write twice, read once model &#8211; wherein the data is saved to both the RDBMS as well as Mongo and the read is preferably done only via Mongo and fallbacks reads are done from the RDBMS (such as when reading from secondaries to whom the changes have not propagated yet, but we know that the data was inserted). </p>
<p>All of this is going to require a lot of insight, specially in the querying mechanism. With recent development, I think it would be easier but a help is surely appreciated from you / the MongoDB team. </p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Comments Conundrum by Vaibhav Kaushal</title>
		<link>http://www.snailinaturtleneck.com/blog/2012/02/02/the-comments-conundrum/comment-page-1/#comment-4497</link>
		<dc:creator>Vaibhav Kaushal</dc:creator>
		<pubDate>Fri, 03 Feb 2012 04:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.snailinaturtleneck.com/blog/?p=1730#comment-4497</guid>
		<description>Wow :) As usual a great post. I thought this was something which was a lot easier. Since I am building my system on a RDBMS system (well, due to my hosting env. restrictions) and want to shift onto Mongo later on, I am trying to learn about mongo as much as possible.  I had not thought that it was easy to embed comments and search for comments for something like a blog (my project has one). Thanks for telling how it is. Gonna help in taking some decisions during migration. Keep posting good stuff. I love your posts. Much easier than the online Docs. Also, tried to purchase your book &quot;The Definitive Guide&quot;. No local stores have it and I do not have a credit card to pay for an online purchase and my address is not that &#039;reachable&#039; either. Ended up downloading the books from torrents. Sorry. On a fine day when I will have a way, I will purchase a copy (who doesn&#039;t like to not-feel-guilty). </description>
		<content:encoded><![CDATA[<p>Wow <img src='http://www.snailinaturtleneck.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  As usual a great post. I thought this was something which was a lot easier. Since I am building my system on a RDBMS system (well, due to my hosting env. restrictions) and want to shift onto Mongo later on, I am trying to learn about mongo as much as possible.  I had not thought that it was easy to embed comments and search for comments for something like a blog (my project has one). Thanks for telling how it is. Gonna help in taking some decisions during migration. Keep posting good stuff. I love your posts. Much easier than the online Docs. Also, tried to purchase your book &#8220;The Definitive Guide&#8221;. No local stores have it and I do not have a credit card to pay for an online purchase and my address is not that &#8216;reachable&#8217; either. Ended up downloading the books from torrents. Sorry. On a fine day when I will have a way, I will purchase a copy (who doesn&#8217;t like to not-feel-guilty). </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Comments Conundrum by Anonymous</title>
		<link>http://www.snailinaturtleneck.com/blog/2012/02/02/the-comments-conundrum/comment-page-1/#comment-4496</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 02 Feb 2012 23:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.snailinaturtleneck.com/blog/?p=1730#comment-4496</guid>
		<description>It&#039;s always a tradeoff.  I haven&#039;t seen any numbers yet on the aggregation framework, but I wouldn&#039;t be surprised if you were correct, particularly about examples 2 and 3.  However, if 99% of your requests are for a post with its comments, it seems reasonable to optimize for that case vs. a &quot;top&quot; list you might compile once an hour.</description>
		<content:encoded><![CDATA[<p>It&#8217;s always a tradeoff.  I haven&#8217;t seen any numbers yet on the aggregation framework, but I wouldn&#8217;t be surprised if you were correct, particularly about examples 2 and 3.  However, if 99% of your requests are for a post with its comments, it seems reasonable to optimize for that case vs. a &#8220;top&#8221; list you might compile once an hour.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Comments Conundrum by George</title>
		<link>http://www.snailinaturtleneck.com/blog/2012/02/02/the-comments-conundrum/comment-page-1/#comment-4495</link>
		<dc:creator>George</dc:creator>
		<pubDate>Thu, 02 Feb 2012 23:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.snailinaturtleneck.com/blog/?p=1730#comment-4495</guid>
		<description>Curious what the performance implications of the above are vs. simply having comments in their own collection.   As always, I think the answer is it depends on what one is trying to do but I am curious as to whether your team have come up with any usage suggestions.  

Using the examples you provide, here are some alternative solutions:Example 1:alternative is to get all the posts by user, then go out and get all the related posts and assemble.  If there were a significant number of posts, the alternative might be slower due to sending lots of data across the wire.Example 2:alternative same as 1 but would probably be much faster since 

Example 3:
alternative would simply do the aggregation against the comments collection and the posts collection would never come into play.  I am guessing this will be a lot faster.

Are my assumptions correct?  

Thanks,

George G.</description>
		<content:encoded><![CDATA[<p>Curious what the performance implications of the above are vs. simply having comments in their own collection.   As always, I think the answer is it depends on what one is trying to do but I am curious as to whether your team have come up with any usage suggestions.  </p>
<p>Using the examples you provide, here are some alternative solutions:Example 1:alternative is to get all the posts by user, then go out and get all the related posts and assemble.  If there were a significant number of posts, the alternative might be slower due to sending lots of data across the wire.Example 2:alternative same as 1 but would probably be much faster since </p>
<p>Example 3:<br />
alternative would simply do the aggregation against the comments collection and the posts collection would never come into play.  I am guessing this will be a lot faster.</p>
<p>Are my assumptions correct?  </p>
<p>Thanks,</p>
<p>George G.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

