<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	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>Simply Code</title>
	<atom:link href="http://tobami.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://tobami.wordpress.com</link>
	<description>Solving problems with code, in a simple way</description>
	<lastBuildDate>Sat, 24 Dec 2011 11:50:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='tobami.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Simply Code</title>
		<link>http://tobami.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://tobami.wordpress.com/osd.xml" title="Simply Code" />
	<atom:link rel='hub' href='http://tobami.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Micro-Pattern for abstracting PyMongo</title>
		<link>http://tobami.wordpress.com/2011/05/13/micro-patern-for-abstracting-pymongo/</link>
		<comments>http://tobami.wordpress.com/2011/05/13/micro-patern-for-abstracting-pymongo/#comments</comments>
		<pubDate>Fri, 13 May 2011 08:13:52 +0000</pubDate>
		<dc:creator>tobami</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[MongoDB]]></category>

		<guid isPermaLink="false">http://tobami.wordpress.com/?p=91</guid>
		<description><![CDATA[When writing a database driven application, there is a need to abstract SQL calls away. Why? Isn&#8217;t SQL syntax simple enough?. It is, but when your application is basking in the glory that is Python code , SQL seems like some arcane, clumsy dialect prone to obvious (SLQ injection anyone) and not-so-obvious security issues. With [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tobami.wordpress.com&amp;blog=17844450&amp;post=91&amp;subd=tobami&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When writing a database driven application, there is a need to abstract SQL calls away. Why? Isn&#8217;t SQL syntax simple enough?. It is, but when your application is basking in the glory that is Python code <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> , SQL seems like some arcane, clumsy dialect prone to obvious (SLQ injection anyone) and not-so-obvious security issues.</p>
<p>With a NoSQL DB like MongoDB, that may not be the case. While it is nice to have Django-like objects for your documents, such as MongoEngine provides, if write/update performance is critical, it may not be the best route, as <a title="my last experiments" href="http://tobami.wordpress.com/2011/02/28/benchmarking-mongodb/">my last experiments showed</a>. But after deciding to use PyMongo directly (a reader pointed out that MongoKit allows the direct use of PyMongo, so check out if that framework suites your needs), and working with it a bit, I felt the need for at least some tiny abstraction layer. Why?</p>
<p><span id="more-91"></span><br />
Interfacing with MongoDB is very easy. You want to insert a product in a collection called &#8216;products&#8217;?:</p>
<p><pre class="brush: python; light: true;">
from pymongo import Connection

connection = Connection()
db = connection['mydb']

db.products.insert({'article_number': '100', 'name': 'Cool Shoes'})
</pre></p>
<p>It is even <em>too</em> easy. Let&#8217;s insert a new product:</p>
<p><pre class="brush: python; light: true;">
db.productts.insert({'article_number': '101', 'name': 'Sunglasses Aviator'})
</pre></p>
<p>What&#8217;s wrong? A typo will cause your new product to be inserted to a wrong collection named &#8220;productts&#8221;. No, you have not previously defined any such collection, but PyMongo will create it on the spot, potentially leading to bad, nasty bugs. For this and other reasons, you need to abstract your MongoDB collections, which I do with some light-weight classes:</p>
<p><pre class="brush: python; light: true;">
from pymongo import Connection

connection = Connection()
db = connection['mydb']
Product.ensure_indexes()

class Product(object):
    collection = db.products

    def __init__(self, data):
        self.data = data

    @staticmethod
    def ensure_indexes(self):
        Product.collection.ensure_index(
            ('article_number', ASCENDING), unique=True)

    def save(self):
        current_date = get_timestamp()
        o = self.collection.find_one()
        self.collection.update(
            {'article_number': self.data['article_number']},
            {**self.data}, upsert=True, safe=True)
</pre></p>
<p>Now the error described previously won&#8217;t ever happen again, because you will always use your (non-instanciated) class:</p>
<p><pre class="brush: python; light: true;">
Product.collection.insert(
    {'article_number': '101', 'name': 'Sunglasses Aviator'})
</pre></p>
<p>or</p>
<p><pre class="brush: python; light: true;">
Product.collection.find_one({'article_number': '101'})
</pre></p>
<p>And you can build on your class as you like to add validation, timestamps, indexes, or any nicety you may need. In my example you can save a new document in this familiar way:</p>
<p><pre class="brush: python; light: true;">
p = Product({'article_number': '101', 'name': 'Sunglasses Aviator'})
p.save()
</pre></p>
<p>Of course, if you see that your wrapper classes grow in complexity and/or start impacting write speed, you should better use MongoEngine or MongoKit. But I think that this solution strikes a nice middle ground.</p>
<br /> Tagged: <a href='http://tobami.wordpress.com/tag/mongodb/'>MongoDB</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tobami.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tobami.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tobami.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tobami.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tobami.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tobami.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tobami.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tobami.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tobami.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tobami.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tobami.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tobami.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tobami.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tobami.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tobami.wordpress.com&amp;blog=17844450&amp;post=91&amp;subd=tobami&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tobami.wordpress.com/2011/05/13/micro-patern-for-abstracting-pymongo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ccdf2cd2659ddde24a89f08ce048694f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tobami</media:title>
		</media:content>
	</item>
		<item>
		<title>Benchmarking MongoDB</title>
		<link>http://tobami.wordpress.com/2011/02/28/benchmarking-mongodb/</link>
		<comments>http://tobami.wordpress.com/2011/02/28/benchmarking-mongodb/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 18:58:17 +0000</pubDate>
		<dc:creator>tobami</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[MongoDB]]></category>

		<guid isPermaLink="false">http://tobami.wordpress.com/?p=48</guid>
		<description><![CDATA[At work, I have started the implementation of a new data import backend. The current one has worked well, but as the number of products in the tracdelight network grows into the millions, the time needed to update the product list for every advertiser grows and the MySQL DB can no longer keep pace with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tobami.wordpress.com&amp;blog=17844450&amp;post=48&amp;subd=tobami&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At work, I have started the implementation of a new data import backend. The current one has worked well, but as the number of products in the <a title="tracdelight" href="http://www.tracdelight.com/start" target="_blank">tracdelight network</a> grows into the millions, the time needed to update the product list for every advertiser grows and the MySQL DB can no longer keep pace with it.</p>
<p>The new data import should be able to import or update a million products much quicker than the current 2 hours needed, and it should be able to keep scaling. MongoDB seems like a good candidate because it should be much faster than SQL. The new import will also be able to be executed as distributed jobs.</p>
<p>The new product store backend being written in Python, what abstraction should we use on top of MongoDB?. Working directly with <a title="PyMongo" href="http://api.mongodb.org/python/" target="_blank">PyMongo</a> is an option, but usually an Object Document Mapper (like SQLAlchemy or Django ORM) is preferable.</p>
<p><span id="more-48"></span></p>
<p>As it was my first time with MongoDB, I researched a bit, and <a title="MongoEngine" href="http://mongoengine.org/" target="_blank"> MongoEngine</a> looked best, as it has a similar syntax to Django and seems well supported. But will it be fast enough, or does it introduce too much overhead compared to bare PyMongo? Not being one that just <em>assumes</em> things, I went ahead and checked that out myself.</p>
<p><strong>The system I&#8217;ve built</strong> reads rows from a CSV, validates fields (for example that a given field is a valid price), and saves them to an storage backend. It is very modular, as not only is that usually a good design decision, but it allows me to have pluggable storage backends:</p>
<ul>
<li> <strong>to_file</strong> backend. This just drops the validated row or product into a new file. We need this as a baseline to now the absolute maximum speed rows could be saved at.</li>
<li>An <strong>SQL</strong> backend. This will serve as a comparison to a classical SQL system. I use the Django ORM here, and to not be unfair I enable the <a title="Bulk-like inserts with Django" href="http://tobami.wordpress.com/2010/11/23/bulk-like-inserts-with-django/" target="_blank">transactions.commit_on_success()</a> decorator and use a sqlite in-memory DB.</li>
<li><strong>MongoEngine</strong>. The code is nearly the same as in the Django ORM case. You can find it <a title="MongoEngine models" href="https://gist.github.com/831774" target="_blank">here</a>.</li>
<li><strong>PyMongo</strong>. This will directly use the MongoDB Python driver, using safe=True. The importing method looks like <a title="PyMongo code" href="https://gist.github.com/833407" target="_blank">this</a>.</li>
<li><strong>devnull</strong>. We all want to be <a title="Web Scale" href="http://www.xtranormal.com/watch/6995033/" target="_blank">web scale</a>, so I went ahead and implemented a devnull backend.</li>
</ul>
<p>The code is purposely a naive implementation, to test how fast each back end is without resorting to optimizations, hacks or tricks. There are probably ways of making it much faster. And even though the production code will be very different to this early experiment, it is not an evil, synthetic micro-benchmark: on the contrary, it is<strong></strong> a <strong>real</strong> application!</p>
<h3>Benchmark details</h3>
<ul>
<li>Average of three runs</li>
<li>Importing 2 small-medium sized product lists with 4000 and 8000 rows</li>
<li>100% updates (will be the most common case)</li>
<li>Code flow:
<ol>
<li>Set all existing entries to old=True</li>
<li>Upsert all new entries and set old=False</li>
<li>Delete all entries still marked old=True</li>
</ol>
</li>
</ul>
<h3>Results</h3>
<p><a href="http://tobami.files.wordpress.com/2011/02/mongodb_benchmark4.png"><img class="alignnone size-full wp-image-84" title="MongoDB_benchmark" src="http://tobami.files.wordpress.com/2011/02/mongodb_benchmark4.png?w=510" alt="MongoDB benchmark results"   /></a></p>
<h3><strong>Some take aways</strong></h3>
<ul>
<li>MongoEngine is 7x faster than SQL. This is actually eerily similar to <a title="MongoKit benchmark by Peter" href="http://www.peterbe.com/plog/speed-test-between-django_mongokit-and-postgresql_psycopg2" target="_blank">Peter&#8217;s</a> <a title="MongoEngine-MongoKit benchmark" href="http://www.peterbe.com/plog/mongoengine-vs.-django-mongokit" target="_blank">results</a>!</li>
<li>PyMongo 5x faster than MongoEngine</li>
<li>PyMongo 36x faster than SQL</li>
<li>Incredibly, the devnull backend is even faster than writing to a file!</li>
<li>PyMongo 40% as fast as writing to a file</li>
</ul>
<p>That last bit of data is nothing short of amazing. Since then, I have added a bit of an abstraction to the PyMongo storage engine, more MongoDB operations, per product/per field timestamps and more, and it is still every bit as fast.</p>
<p>This experiment has settled the matter: we will be using PyMongo directly (I am tempted to use the super-cool devnull backend, but I have heard that it is somewhat difficult to later retrieve data).</p>
<p>In the next post, I will be explaining how I&#8217;ll go about abstracting PyMongo a little bit, without taking away one ounce of its incredible speed.</p>
<br /> Tagged: <a href='http://tobami.wordpress.com/tag/mongodb/'>MongoDB</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tobami.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tobami.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tobami.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tobami.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tobami.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tobami.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tobami.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tobami.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tobami.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tobami.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tobami.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tobami.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tobami.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tobami.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tobami.wordpress.com&amp;blog=17844450&amp;post=48&amp;subd=tobami&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tobami.wordpress.com/2011/02/28/benchmarking-mongodb/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ccdf2cd2659ddde24a89f08ce048694f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tobami</media:title>
		</media:content>

		<media:content url="http://tobami.files.wordpress.com/2011/02/mongodb_benchmark4.png" medium="image">
			<media:title type="html">MongoDB_benchmark</media:title>
		</media:content>
	</item>
		<item>
		<title>Bulk-like inserts with Django</title>
		<link>http://tobami.wordpress.com/2010/11/23/bulk-like-inserts-with-django/</link>
		<comments>http://tobami.wordpress.com/2010/11/23/bulk-like-inserts-with-django/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 12:58:08 +0000</pubDate>
		<dc:creator>tobami</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Overmind]]></category>

		<guid isPermaLink="false">http://tobami.wordpress.com/?p=9</guid>
		<description><![CDATA[The Django ORM is really great. It allows you to design and code your web application in a very simple and readable way. Some projects have special needs, or are very demanding on the DB, and in that case the ORM can became a bottleneck. Fortunately, Django has different ways to avoid getting in your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tobami.wordpress.com&amp;blog=17844450&amp;post=9&amp;subd=tobami&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><!-- p { margin-bottom: 0.21cm; }a:link {  } --></p>
<p>The Django ORM is really great. It allows you to design and code your web application in a very simple and readable way.</p>
<p>Some projects have special needs, or are very demanding on the DB, and in that case the ORM can became a bottleneck. Fortunately, Django has different ways to avoid getting in your way.<br />
<span id="more-9"></span></p>
<h2>Inserting thousands of entries in the DB</h2>
<p>After the <a title="Overmind 0.1 rel﻿ease" href="http://groups.google.com/group/overmind-dev/browse_thread/thread/1b65a76c55ffa0ed" target="_blank">Overmind 0.1 release</a>, I have implemented the caching of provider images, so that the node creation form loads instantly. Once implemented though, a problem quickly became apparent: Amazon&#8217;s EC2 has nearly 3000 AMI images. Saving all of them using the Django ORM is extremely slow. It takes 10 minutes!</p>
<p>While Overmind will get a work queue and the user won&#8217;t have to wait after creating a new cloud provider, 10 minutes is way beyond reasonable. Then again, I really don&#8217;t want to start entering SQL code in this early stage of Overmind development, as we all know that “<a title="Premature optimization" href="http://www.theregister.co.uk/2007/06/22/premature_optimisation/" target="_blank">Premature optimization is the root of all evil</a>”[1].</p>
<p>Fortunately, Django has a nifty and often overlooked feature: <a title="transactions" href="http://docs.djangoproject.com/en/1.2/topics/db/transactions/" target="_blank">transactions</a>.</p>
<p>When you look for a solution to bulk inserts with Django, most <a title="answers" href="http://stackoverflow.com/questions/2252530/efficent-way-to-bulk-insert-with-get-or-create-in-django-sql-python-django" target="_blank">answers</a> recommend SQL statements and when someone proposes using transactions, they answer that they are not real bulk inserts and they won&#8217;t bring very big performance improvements. Let us put that to the test.</p>
<h2>Benchmarking transactions</h2>
<p>The tests consists in creating an EC2 provider in Overmind, and meassure how long it takes to complete the action. In the process, the nearly 3000 EC2 images will be imported into the local Overmind SQLite DB.</p>
<p>The simple Image model:</p>
<p><pre class="brush: python; light: true;">
class Image(models.Model):
    '''OS image model'''
    image_id = models.CharField(max_length=20)
    name     = models.CharField(max_length=30)
    provider = models.ForeignKey(Provider)
    favorite = models.BooleanField(default=False)

    def __unicode__(self):
        return self.name

    class Meta:
        unique_together  = ('provider', 'image_id')
</pre></p>
<p>The test has been run 3 times with and without transactions. To that end, the only change was adding a decorator to the Provider. import_images() method:</p>
<p><pre class="brush: python; light: true;">
...
    @transaction.commit_on_success()
    def import_images(self):
...
</pre></p>
<h2>Results</h2>
<table>
<tbody>
<tr>
<td>without transactions:</td>
<td style="padding-left:1em;">600 seconds (10 minutes)</td>
</tr>
<tr>
<td>with transactions:</td>
<td style="padding-left:1em;">16 seconds</td>
</tr>
<tr>
<td>Improvement factor:</td>
<td style="padding-left:1em;">37.5</td>
</tr>
<tr>
<td>Time reduction:</td>
<td style="padding-left:1em;">97.3%</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>The results are outstanding. This is not a trivial improvement, it takes only 2.7% of the time it needed before!</p>
<p>If you want more performance, there <a title="are" href="http://www.preetk.com/node/optimizing-mass-commits-django-django_bulk_save/" target="_blank">are</a> <a title="some" href="http://ole-laursen.blogspot.com/2010/11/bulk-inserting-django-objects.html" target="_blank">some</a> custom solutions for real bulk saving, and if all else fails, Django even lets you enter custom <a title="SQL statements" href="http://docs.djangoproject.com/en/1.2/topics/db/sql/">raw SQL statements</a>. django.db.transaction though, should be a beautifully simple and effective solution for a lot of projects.</p>
<hr />
<p>References<br />
[1]: Famous quote by <em> Donald Knuth</em></p>
<br /> Tagged: <a href='http://tobami.wordpress.com/tag/django/'>Django</a>, <a href='http://tobami.wordpress.com/tag/overmind/'>Overmind</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/tobami.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/tobami.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/tobami.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/tobami.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/tobami.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/tobami.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/tobami.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/tobami.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/tobami.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/tobami.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/tobami.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/tobami.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/tobami.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/tobami.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=tobami.wordpress.com&amp;blog=17844450&amp;post=9&amp;subd=tobami&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://tobami.wordpress.com/2010/11/23/bulk-like-inserts-with-django/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/ccdf2cd2659ddde24a89f08ce048694f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tobami</media:title>
		</media:content>
	</item>
	</channel>
</rss>
