<?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/"
	>

<channel>
	<title>fforw.de &#187; jcouchdb</title>
	<atom:link href="http://fforw.de/tag/jcouchdb/feed/" rel="self" type="application/rss+xml" />
	<link>http://fforw.de</link>
	<description>skip the boring parts</description>
	<lastBuildDate>Sat, 12 Nov 2011 11:54:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Hood Beta 2</title>
		<link>http://fforw.de/post/hood-beta-2/</link>
		<comments>http://fforw.de/post/hood-beta-2/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 14:51:19 +0000</pubDate>
		<dc:creator>fforw</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[hood]]></category>
		<category><![CDATA[jcouchdb]]></category>
		<category><![CDATA[JSP]]></category>

		<guid isPermaLink="false">http://fforw.de/?p=97</guid>
		<description><![CDATA[After fixing a pretty serious bug in the combination of svenson and jcouchdb and releasing svenson 1.3.4 and jcouchdb 0.9.1-4 and jcouchdb 0.10.0-2, I got around to release a new, improved version of Hood, too. It&#8217;s called &#8220;Beta 2&#8243; and still lacks some features but the documentation is a lot better and the application design [...]]]></description>
			<content:encoded><![CDATA[<p>After fixing a pretty serious bug in the combination of svenson and jcouchdb and releasing <em>svenson 1.3.4</em> and <em>jcouchdb 0.9.1-4 </em>and <em>jcouchdb 0.10.0-2</em>, I got around to release a new, improved version of Hood, too. It&#8217;s called &#8220;Beta 2&#8243; and still lacks some features but the documentation is a lot better and the application design is basically what I think will be the final layout of things.</p>
<p>Head over to google code and grab yourself a copy.</p>
<p><strong>Links:</strong></p>
<ul>
<li><a title="Hood Beta 2 at google code" href="http://jcouchdb.googlecode.com/files/hood-beta-2.zip">Hood Beta 2</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fforw.de/post/hood-beta-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hood: example application for jcouchdb 0.10.0-1</title>
		<link>http://fforw.de/post/hood-example-application-for-jcouchdb-0-10-0-1/</link>
		<comments>http://fforw.de/post/hood-example-application-for-jcouchdb-0-10-0-1/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 22:52:22 +0000</pubDate>
		<dc:creator>fforw</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[couchdb]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jcouchdb]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[svenson]]></category>

		<guid isPermaLink="false">http://fforw.de/?p=92</guid>
		<description><![CDATA[On the occasion of presenting CouchDB and jcouchdb at my place of work, I got around to finally create a small example application that is now downloadable as sneak preview. There need to be bugs fixed, features implemented and lots of documentation to be added, but it kind of works. It&#8217;s called &#8220;Hood&#8221; for neighbourhood [...]]]></description>
			<content:encoded><![CDATA[<p>On the occasion of presenting CouchDB and jcouchdb at my place of work, I got around to finally create a small example application that is now downloadable as sneak preview. There need to be bugs fixed, features implemented and lots of documentation to be added, but it kind of works.</p>
<p>It&#8217;s called &#8220;Hood&#8221; for neighbourhood and allows you to mark places or people around a place of activity of yours, called hood. it is meant to foster collaboration / tips on local places etc.</p>
<p>It&#8217;s Spring Web Application demonstrating some techniques of working with jcouchdb. It&#8217;s an eclipse WTP/Spring IDE project with all dependencies you need besides couchdb and tomcat or another servlet container.</p>
<p>Stay tuned for hood to grow into a fullblown app.</p>
<p><strong>Links:</strong></p>
<ul>
<li><span style="text-decoration: line-through;">Hood Alpha &#8211; download at code.google.com</span></li>
<li><a href="http://jcouchdb.googlecode.com/files/hood-beta-2.zip">Hood Beta 2 &#8211; download at code.google.com</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://fforw.de/post/hood-example-application-for-jcouchdb-0-10-0-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Logo for couchdb</title>
		<link>http://fforw.de/post/a-logo-for-couchdb/</link>
		<comments>http://fforw.de/post/a-logo-for-couchdb/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 16:12:08 +0000</pubDate>
		<dc:creator>fforw</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[gfx]]></category>
		<category><![CDATA[jcouchdb]]></category>

		<guid isPermaLink="false">http://fforw.de/?p=74</guid>
		<description><![CDATA[I was feeling kind of bored today, so I started working on a logo for jcouchb This Article is also available in Deutsch.]]></description>
			<content:encoded><![CDATA[<div class='en' style='' lang='en' dir=''>
I was feeling kind of bored today, so I started working on a logo for jcouchb
</div>
<div class="wp-caption alignleft" style="width: 588px"><img title="jcouchdb logo" src="http://fforw.de/static/image/jcouchdb.png" alt="jcouch db logo" width="578" height="450" /><p class="wp-caption-text">jcouch db logo</p></div>
<p>
<p><small>This Article is also available in <b>Deutsch</b>.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://fforw.de/post/a-logo-for-couchdb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fforw.de on WordPress</title>
		<link>http://fforw.de/post/fforw-de-on-wordpress/</link>
		<comments>http://fforw.de/post/fforw-de-on-wordpress/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 12:55:25 +0000</pubDate>
		<dc:creator>fforw</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[jcouchdb]]></category>
		<category><![CDATA[notice]]></category>
		<category><![CDATA[turbogears]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://fforw.de/?p=31</guid>
		<description><![CDATA[This blog has been relatively stale for a while now &#8212; mostly due to increasing work pressure and the limited amount of time I had left for it. What little time I had was mostly wasted on coding on it. The previous version was written in turbogears which seemd like a good idea back in [...]]]></description>
			<content:encoded><![CDATA[<p>This blog has been relatively stale for a while now &#8212; mostly due to increasing work pressure and the limited amount of time I had left for it. What little time I had was mostly wasted on coding on it. The previous version was written in turbogears which seemd like a good idea back in 2006. Over time I kind of regretted that decision, which was not really Turbogears fault, but just caused by my laziness to really update it etc.</p>
<p>I&#8217;ve been frustrated with the old blog code and the old design for some time now and wanted to redo everything and already started multiple attempts in various technological reincarnations &#8212; the latest being an implementation in java/spring using my jcouchdb library. The design got more and more ambitious over time; so ambitious that it would basically require me to work full-time on it.<span id="more-31"></span></p>
<p>The solution was to seriously cut back on my ambitions with this blog and just use one of the available blog engines. This turned out to be wordpress in the end because it seemed like a good fit. The import from my Turbogears blog could be done with a hacky one-liner from the turbogears shell:</p>
<pre class="prettyprint lang_python">"".join(
    map(lambda post : """
        &lt;item&gt;
            &lt;pubDate&gt;%s&lt;/pubDate&gt;
            %s
            &lt;title&gt;%s&lt;/title&gt;
            &lt;content:encoded&gt;%s&lt;/content:encoded&gt;
        &lt;/item&gt;\n""" % (
            post.created,
            "".join( map(lambda s: "&lt;category&gt;%s&lt;/category&gt;\n" % s,
                             post.tagNames.split(" "))),
            post.name,
            post.text.replace("\n"," ")), posts))
</pre>
<p>I hope all this will lead to me actually writing stuff in this blog instead of perpetually coding on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://fforw.de/post/fforw-de-on-wordpress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Memory consumption changes in svenson 1.3</title>
		<link>http://fforw.de/post/memory-consumption-changes-in-svenson-13/</link>
		<comments>http://fforw.de/post/memory-consumption-changes-in-svenson-13/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 15:00:24 +0000</pubDate>
		<dc:creator>fforw</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[jcouchdb]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[svenson]]></category>

		<guid isPermaLink="false">http://blog.willie/?p=4</guid>
		<description><![CDATA[Implementing a streaming attachment feature for jcouchdb, I started to wonder whether it would be a good idea for svenson to support JSON parsing from a stream, too, as I don&#8217;t really need the complete stream to start constructing the java object graph. Implementing stream parsing was really nice and easy thanks to the units [...]]]></description>
			<content:encoded><![CDATA[<p>Implementing a streaming attachment feature for <a title="jcouchdb project page at google code" href="http://code.google.com/p/jcouchdb/">jcouchdb</a>, I started to wonder whether it would be a good idea for svenson to support JSON parsing from a stream, too, as I don&#8217;t really need the complete stream to start constructing the java object graph.</p>
<p>Implementing stream parsing was really nice and easy thanks to the units test present in svenson. After that, I came upon two ways to generally cut down on memory use. All tokens with fixed values could just have a single instance. The recording of tokens to provide token based look ahead was not really needed in all cases. But how much does that save?</p>
<p>As a test case I wrote a small tool class to generate random, nested JSON datasets, generated two test files of 65kb and 4.5mb size and parsed these with svenson 1.2.8 and what now is svenson 1.3.</p>
<p>Measuring the actual memory usage for these two test files proved to be difficult. Somehow none of the programs I tried seemed to give me the data I wanted. Eclipse TPTP just ignored Strings that were no member of any class but just parameters, making stream and string parsing look exactly the same memory-wise. tijmp and others did not provide the data I wanted at all.</p>
<p>So in the end I wrote a little python script that parses a hprof ASCII output to</p>
<ul>
<li>sum up all memory use</li>
<li>group allocations by class type, but only if the stack trace of it touches svenson</li>
<li>output the top 10 of those classes and the sums</li>
</ul>
<p>This provided meaningful data and also showed some points for further improvement. There was a huge number of java.lang.reflect.Method allocations which turned out to be caused by svenson inspecting the target classes for annotations and appropriate methods which was done on a per target basis instead of the better per target class basis.</p>
<p>All in all the memory usage went down quite a bit:</p>
<div class="wp-caption aligncenter" style="width: 507px"><img title="memory usage diagram" src="http://fforw.de/static/image/svenson-combined.png" alt="memory usage for different svenson versions, with and without streaming" width="497" height="296" /><p class="wp-caption-text">memory usage for different svenson versions, with and without streaming</p></div>
<p>45% less memory for the small file and 62% for the large file for all allocations. I think that is really good..</p>
<p>Below are some links to the files needed to repeat the benchmarking. The transform hprof script might also prove to be useful for other projects if changed appropriately.</p>
<p>The new jcouchdb release will also use stream parsing.</p>
<p><strong>Links:</strong></p>
<ul>
<li><a href="/static/files/svenson-memory-report.txt">Detailed data: Top 10 memory use by class and sums for all 6 variants</a></li>
<li><a href="/static/files/transform_hprof.py">Python script to transform hprof ASCII output</a></li>
<li><a href="http://svenson.googlecode.com/svn/trunk/test/org/svenson/RandomJSON.java">Random JSON Generator</a></li>
<li><a href="/static/files/small.json">Small JSON test file</a></li>
<li><a href="/static/files/big.json">Big JSON test file</a></li>
</ul>
<p><strong>edit:</strong><br />
The command to generate the hprof file was something like</p>
<blockquote><p>java -agentlib:hprof=heap=sites,depth=100,cutoff=0 -cp .. svensonperf.ReadJSONOld big.json</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://fforw.de/post/memory-consumption-changes-in-svenson-13/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

