<?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>Gamlor</title>
	<atom:link href="http://www.gamlor.info/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gamlor.info/wordpress</link>
	<description>thoughts about programming, tv-series and other geeky stuff.</description>
	<lastBuildDate>Tue, 19 Mar 2013 00:13:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Doctor Who, Series 7, First Half *Spoilers*</title>
		<link>http://www.gamlor.info/wordpress/2013/03/doctor-who-series-7-first-half-spoilers/</link>
		<comments>http://www.gamlor.info/wordpress/2013/03/doctor-who-series-7-first-half-spoilers/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 00:09:46 +0000</pubDate>
		<dc:creator>gamlerhart</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Media Zap Oh Snap]]></category>
		<category><![CDATA[5-rating]]></category>
		<category><![CDATA[bbc]]></category>
		<category><![CDATA[doctor who]]></category>
		<category><![CDATA[sci-fi]]></category>
		<category><![CDATA[tv series]]></category>

		<guid isPermaLink="false">http://www.gamlor.info/wordpress/?p=3053</guid>
		<description><![CDATA[(한국어로 쓰는 글 있어요) Doctor Who is my favorite sci-fi series, as you might noticed by all the blog posts ^^. Series 7 has kind of two parts, one aired&#8230; ]]></description>
				<content:encoded><![CDATA[<p>(<a href="http://www.gamlor.info/wordpress/2013/03/dr-who-series-7-first-half-korean/">한국어로 쓰는 글 있어요</a>)<br />
Doctor Who is my favorite sci-fi series, as you might noticed by all the <a href="http://www.gamlor.info/wordpress/tag/doctor-who/">blog posts</a> ^^. Series 7 has kind of two parts, one aired last autumn, the other will be aired soon. So I&#8217;ll just talk about the first half.</p>
<div id="attachment_3055" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/drWhoSeason7EN.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/drWhoSeason7EN-300x219.png" alt="Our Doctor, always busy." width="300" height="219" class="size-medium wp-image-3055" /></a><p class="wp-caption-text">Our Doctor, always busy.</p></div>
<h2>Christmas 2011: The Doctor, the Widow and the Wardrobe</h2>
<p>Ohm, I saw this episode a long time ago, so my memory of it is not that great. I liked the teleporting box and the whole mystery. I usually don&#8217;t like the Christmas episodes, but this one was all right.</p>
<div id="attachment_3056" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/widowWardrobeEN.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/widowWardrobeEN-300x187.png" alt="Our Doctor just loves bow ties" width="300" height="187" class="size-medium wp-image-3056" /></a><p class="wp-caption-text">Our Doctor just loves bow ties</p></div>
<h2>Asylum of the Daleks (S07E01)</h2>
<p>The Daleks kidnap the Doctor, Amy and Rory and throw them to a prison plant. On that planet there are Daleks which went crazy, and a souffle backing woman. And somehow the souffles never turn out well. Why does she keep backing souffles? Why did the Daleks send the Doctor to the prison?</p>
<p>I love the craze Dalkes and woman in this episode. Is fun!</p>
<div id="attachment_3057" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/asylumDalekEN.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/asylumDalekEN-300x179.png" alt="The Daleks are also busy." width="300" height="179" class="size-medium wp-image-3057" /></a><p class="wp-caption-text">The Daleks are also busy.</p></div>
<h2>Dinosaurs on a Spaceship (S07E02)</h2>
<p>The Doctor goes to a Spaceship, which has lost it&#8217;s pilot. To our surprise there are Dinosaurs on the spaceship. And a bad guy.</p>
<p>I didn&#8217;t like the story, but Dinosaurs are always awesome!</p>
<div id="attachment_3058" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/dinosaursEN.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/dinosaursEN-300x203.png" alt="Dinosaurs, uuiiihh!" width="300" height="203" class="size-medium wp-image-3058" /></a><p class="wp-caption-text">Dinosaurs, uuiiihh!</p></div>
<h2>A Town Called Mercy (S07E03)</h2>
<p>UUUAAAH, a western episode, with a evil robot, a alien and gun wielding men. Why does the evil robot hates this small city? Why is there a alien in the city?</p>
<p>I love the western with sci-fi genre. The story itself is OK.</p>
<div id="attachment_3059" class="wp-caption aligncenter" style="width: 304px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/westernEN.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/westernEN-294x300.png" alt="The good, the bad and the ugly!" width="294" height="300" class="size-medium wp-image-3059" /></a><p class="wp-caption-text">The good, the bad and the ugly!</p></div>
<h2>The Power of Three(S07E04)</h2>
<p>Boring episode ㅠㅠ. The episode wants to become mysterious. Strange black cubes suddenly appear. The cubes don&#8217;t do anything. Therefore our team has to wait, and wait, and wait.</p>
<p>I already said that i found this episode to be boring.</p>
<div id="attachment_3060" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/blocksEN.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/blocksEN-300x149.png" alt="Many boxes!" width="300" height="149" class="size-medium wp-image-3060" /></a><p class="wp-caption-text">Many boxes!</p></div>
<h2>The Angels Take Manhattan(S07E05)</h2>
<p>In New York a private investigator receives a strange case. Angel statues which seem to move. However, no one sees them moving, yet they move. So, the detective goes into a hotel, where he meets a old himself. What is going on?</p>
<p>Ah, I like the Weeping Angels. And this episode. It has a lot of time traveling and Weeping Angels. It&#8217;s the best episode of series 7 so far.</p>
<div id="attachment_3061" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/angelsEN.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/angelsEN-300x159.png" alt="Weep, Weep, Weep" width="300" height="159" class="size-medium wp-image-3061" /></a><p class="wp-caption-text">Weep, Weep, Weep</p></div>
<h2>Christmas 2012:  The Snowmen(S07E06)</h2>
<p>Suddenly there are many snowmen and they are evil. Also the souffle making woman is here. Strange!</p>
<p>Hmm, I think the episode is OK.</p>
<div id="attachment_3062" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/snowmenEN.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/snowmenEN-300x162.png" alt="Love Snowmen" width="300" height="162" class="size-medium wp-image-3062" /></a><p class="wp-caption-text">Love Snowmen</p></div>
<h2>Conclusion</h2>
<p>So far I enjoyed series 7. I&#8217;m waiting for the new episodes. On March 30th the BBC will start airing the new episodes. Here are some trailers:</p>
<p><b>Series 7, First Half</b><br />
<iframe width="560" height="315" src="http://www.youtube.com/embed/qrEUBl2pacU" frameborder="0" allowfullscreen></iframe></p>
<p><b>Series 7, Second Half</b><br />
<iframe width="560" height="315" src="http://www.youtube.com/embed/FXqXZepqgMQ" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamlor.info/wordpress/2013/03/doctor-who-series-7-first-half-spoilers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>닥터 후 (Dr Who), 시즌 7, 첫 부분</title>
		<link>http://www.gamlor.info/wordpress/2013/03/dr-who-series-7-first-half-korean/</link>
		<comments>http://www.gamlor.info/wordpress/2013/03/dr-who-series-7-first-half-korean/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 23:40:55 +0000</pubDate>
		<dc:creator>gamlerhart</dc:creator>
				<category><![CDATA[Media Zap Oh Snap]]></category>
		<category><![CDATA[한국어 배우기]]></category>
		<category><![CDATA[5-rating]]></category>
		<category><![CDATA[bbc]]></category>
		<category><![CDATA[doctor who]]></category>
		<category><![CDATA[sci-fi]]></category>
		<category><![CDATA[tv series]]></category>
		<category><![CDATA[닥터 후]]></category>

		<guid isPermaLink="false">http://www.gamlor.info/wordpress/?p=2886</guid>
		<description><![CDATA[(Here&#8217;s the English version, easier to understand) 닥터 후는 내 제일 좋아하는 SF 드라마 이는데, 매년에 저 새 시즌 봐요. 시즌 7는 부분이 2개 있고 첫 부분만 TV한테서 보내는데, 그리고&#8230; ]]></description>
				<content:encoded><![CDATA[<p>(<a href="http://www.gamlor.info/wordpress/2013/03/doctor-who-series-7-first-half-spoilers/">Here&#8217;s the English version</a>, easier to understand)<br />
닥터 후는 내 제일 좋아하는 SF 드라마 이는데, 매년에 저 새 시즌 봐요. 시즌 7는 부분이 2개 있고 첫 부분만 TV한테서 보내는데, 그리고 전 첫 부분의해 얘기할 거예요 ^^. 저는 한국어로 에피소드의 이름을 몰라서 그냥 영어고 이름을 사용할 거예요.</p>
<div id="attachment_3039" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/drWhoSeason7.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/drWhoSeason7-300x219.png" alt="우리 닥터, 항상 바빠요" width="300" height="219" class="size-medium wp-image-3039" /></a><p class="wp-caption-text">우리 닥터, 항상 바빠요</p></div>
<h2>2011년 크리스마스: The Doctor, the Widow and the Wardrobe</h2>
<p>엄, 저는 이 에피소드 오래 봤어서 기억 잘 못 해요. 이 텔레포트 하는 상자하고 미스테리 좋아요. 저는 크리스마스-에피소드 보통 안 좋아요, 근데 이 에피소드 괜찮아요.</p>
<div id="attachment_3044" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/widowWardrobe.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/widowWardrobe-300x187.png" alt="우리 닥터는 나비 넥타이 정말 좋아요" width="300" height="187" class="size-medium wp-image-3044" /></a><p class="wp-caption-text">우리 닥터는 나비 넥타이 정말 좋아요</p></div>
<h2>Asylum of the Daleks (1회)</h2>
<p>다렉들는 (Daleks) 덕터이랑 에이미(Amy)랑 로리(Rory)를 유괴했고 감옥에서 보냈어요. 감옥에는 미친 다렉이 사는데. 그리고 우리 미친 여자도 살아요. 이 여자는 항상 수플레를 만들어봐요. 근데 수플레가 항상 잘 안돼요. 왜 여자 수플레를 뭇 만들어요? 왜 다렉 덕터를 감옥에서 보냈어요? </p>
<p>저는 이 에피소드의 미친 다렉하고 미친 여자 좋아요. 재미있어요.</p>
<div id="attachment_3041" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/asylumDalek.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/asylumDalek-300x179.png" alt="다렉도 바빠요 ^^" width="300" height="179" class="size-medium wp-image-3041" /></a><p class="wp-caption-text">다렉도 바빠요 ^^</p></div>
<h2>Dinosaurs on a Spaceship (2회)</h2>
<p>덕터는 조종사 없는 우주선 갔어요. 우주선에서 공룡이 있고 나쁜 사람 하나 있어요.</p>
<p>음, 저는 그 이야기를 별로 안 좋아요. 근데 공룡은 항상 재미있어요. ^^</p>
<div id="attachment_3046" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/dinosaurs.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/dinosaurs-300x203.png" alt="공룡이, 우우우이" width="300" height="203" class="size-medium wp-image-3046" /></a><p class="wp-caption-text">공룡이, 우우우이</p></div>
<h2>A Town Called Mercy(3회)</h2>
<p>오오오와, 서부극 에피소드예요. 나쁜 로봇이랑, 외계 의사랑, 권총 있는 사람들이랑요. 왜 나쁜 로봇이 이 적은 도시 싫어요? 왜 외계가 있어요?</p>
<p>저는 서부극 장르와 SF 장르 좋아요. 이야기는 괜찮아요.</p>
<div id="attachment_3047" class="wp-caption aligncenter" style="width: 304px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/western.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/western-294x300.png" alt="좋은 사람,  나쁜 사람과, 추한 사람이예요" width="294" height="300" class="size-medium wp-image-3047" /></a><p class="wp-caption-text">좋은 사람,  나쁜 사람과, 추한 사람이예요</p></div>
<h2>The Power of Three(4회)</h2>
<p>심심한 에피소드예요. ㅠㅠ. 이 에피소드는 미스테리 되고 싶은데. 이상한 검은 상자 갑자기 많이 있어져요. 이 상자는 아무것을 안 해서 우리 팀 기다려야 돼요. 기다리고, 기다리고, 더 기다려야 돼요.</p>
<p>저는 이 에피소드 심심해라고 벌써 말했어요. 안 좋아요.</p>
<div id="attachment_3048" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/blocks.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/blocks-300x149.png" alt="상자 많아요." width="300" height="149" class="size-medium wp-image-3048" /></a><p class="wp-caption-text">상자 많아요.</p></div>
<h2>The Angels Take Manhattan(5회)</h2>
<p>뉴욕에는 탐정이 이상한 사건을 받았어요. 천사 조각상가 움직일 수 있는 것 같아요. 근데 아무도 조각상을 움직이는 것을 보여요, 하지만 조각상이 움직여요. 그리고 탐정은 호텔에서 낡은  탐정의 자신 만나요. 무슨 일이에요?</p>
<p>아, 저는 우는 천사 (weeping angels) 좋아요. 이 에피소드도 좋아요. 시간 여행 많고, 우는 천사 많아요. 시즌 7에 지금까지 에피소드 제일 좋아요. </p>
<div id="attachment_3049" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/angels.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/angels-300x159.png" alt="울어, 울어, 울어." width="300" height="159" class="size-medium wp-image-3049" /></a><p class="wp-caption-text">울어, 울어, 울어.</p></div>
<h2>2012년 크리스마스: The Snowmen(6회)</h2>
<p>갑자기 눈사람들은 많아져요. 그리고 나빠요. 그리고도 수플레 하는 여자 다시 있어요. 이상해요.</p>
<p>음, 그 에피소드 괜찮는 것 같아요. 응.</p>
<div id="attachment_3050" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/snowmen.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/snowmen-300x162.png" alt="눈사람 좋아요" width="300" height="162" class="size-medium wp-image-3050" /></a><p class="wp-caption-text">눈사람 좋아요</p></div>
<h2>그럼&#8230;</h2>
<p>이제까지 전 시즌 7 좋아했어요. 새로운 에피소드를 기다리고 있어요. 4월 30일에 BBC는 새 에피소드를 보낼 거예요. 여기 트레일러도 있어요:</p>
<p><b>시즌 7, 첫 부분</b><br />
<iframe width="560" height="315" src="http://www.youtube.com/embed/qrEUBl2pacU" frameborder="0" allowfullscreen></iframe></p>
<p><b>시즌 7, 둘째 부분</b><br />
<iframe width="560" height="315" src="http://www.youtube.com/embed/FXqXZepqgMQ" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamlor.info/wordpress/2013/03/dr-who-series-7-first-half-korean/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ADBCJ: Some Peformance Numbers</title>
		<link>http://www.gamlor.info/wordpress/2013/03/adbcj-some-peformance-numbers/</link>
		<comments>http://www.gamlor.info/wordpress/2013/03/adbcj-some-peformance-numbers/#comments</comments>
		<pubDate>Wed, 06 Mar 2013 20:41:07 +0000</pubDate>
		<dc:creator>gamlerhart</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[adbcj]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.gamlor.info/wordpress/?p=2941</guid>
		<description><![CDATA[This time we look at some performance numbers, comparing JDBC with ADBCJ (github, blog-posts). Particular the performance of small web applications, once implemented with JDBC, once with ADBCJ. Each application&#8230; ]]></description>
				<content:encoded><![CDATA[<p>This time we look at some performance numbers, comparing JDBC with ADBCJ (<a href="https://github.com/gamlerhart/adbcj">github</a>, <a href="http://www.gamlor.info/wordpress/tag/adbcj/">blog-posts</a>). Particular the performance of small web applications, once implemented with JDBC, once with ADBCJ. Each application is implemented with the <a href="http://www.playframework.com/">Play Framework</a>, which supports well asynchronous operations. I don&#8217;t want to go into all the gritty details. If you really want to read tons of details, go <a href="http://gamlor.info/files/Asynchronous-Database-Access-Worth-the-Pain-28-February-2013.pdf">ahead</a>. </p>
<p>The setup looked like this:</p>
<p>- Amazon EC2: Mysql Extra Large instance<br />
- Two Amazon EC2: M1 Large instance as web tiers. Running the Play Application.<br />
- Two Amazon EC2:M1  Medium instance as load tiers. Using <a href="http://grinder.sourceforge.net/">Grinder </a>to run scripts which use the web app.</p>
<p>We take a look at latency and throughput.<br />
<div id="attachment_2988" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/test-setup.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/test-setup-300x207.png" alt="Test Setup" width="300" height="207" class="size-medium wp-image-2988" /></a><p class="wp-caption-text">Test Setup</p></div></p>
<h2>Blog-App</h2>
<p>First let&#8217;s look a small blog app. The app serves posts, which have tags and authors. So the application gets the latest posts and fetches the tags for each post. Also it shows the most popular tags.<br />
<div id="attachment_2990" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/blog-post.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/blog-post-300x184.png" alt="A blog" width="300" height="184" class="size-medium wp-image-2990" /></a><p class="wp-caption-text">A blog</p></div><br />
We take a look at the latency, with a web tier which is far away from its max capacity (around 50% CPU utilization):</p>
<div id="attachment_2962" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/BlogLatencyWithoutOutliner.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/BlogLatencyWithoutOutliner-300x193.png" alt="Latency in Blog Application" width="300" height="193" class="size-medium wp-image-2962" /></a><p class="wp-caption-text">Latency in Blog Application</p></div>
<p>We can see that with ADBCJ requests are completed faster. For example with JDBC, it takes around 50ms on average to return the result; the ADBCJ version can do it in about 38ms.</p>
<p>Let’s also look at the throughput. In a small, focused test, where we access the index page in JSON format, ADBCJ performs way better. However, in a more realistic scenario, where we access different pages, the throughput of ADBCJ was about the same.</p>
<div id="attachment_2966" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/scaling-ADBCJvsJDBC1.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/scaling-ADBCJvsJDBC1-300x224.png" alt="Blog: Latency vs Throughput" width="300" height="224" class="size-medium wp-image-2966" /></a><p class="wp-caption-text">Blog: Latency vs Throughput</p></div>
<p>So you are now might tempted to use ADBCJ for a blog like application. Think again, a blog is fairly static application. So we can easily use caching to store the rendered pages. A good cache beats JDBCs and ADBCJs asses! Adding a cache boosts throughput and latency.</p>
<div id="attachment_2966" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/scaling-ADBCJvsJDBC1.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/scaling-ADBCJvsJDBC1-300x224.png" alt="Blog: Latency vs Throughput" width="300" height="224" class="size-medium wp-image-2966" /></a><p class="wp-caption-text">Blog: Latency vs Throughput</p></div>
<div id="attachment_2967" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/BlogLatencyWithoutOutliner1.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/BlogLatencyWithoutOutliner1-300x193.png" alt="Blog: Latency With Caching" width="300" height="193" class="size-medium wp-image-2967" /></a><p class="wp-caption-text">Blog: Latency With Caching</p></div>
<p><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/cache-rocks1.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/cache-rocks1-300x236.png" alt="Cache is King" width="300" height="236" class="aligncenter size-medium wp-image-2995" /></a></p>
<h2>User Content App</h2>
<p>Let&#8217;s look at a more dynamic application, a &#8220;Facebook&#8221; clone. The main page lists posts from the people a person follows. Each post has &#8216;likes&#8217; and comments. Also the site suggests users to follow. Furthermore it also contains messages, which user can send to each other.<br />
About 50% of the requests require complex read operations, the other 50% are simple writes, like inserting a new comment.</p>
<p>First, let&#8217;s look again at the latency. We can see that the complex read operation suddenly is three times faster. However, all writes requests are slowed down. This is maybe a tradeoff which you can make. Reading requests are the ones where users have to wait, while write requests can be done in the background via AJAX.</p>
<div id="attachment_2972" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/UserContentLatencyWIthoutOutliner.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/UserContentLatencyWIthoutOutliner-300x193.png" alt="Latency User Content App" width="300" height="193" class="size-medium wp-image-2972" /></a><p class="wp-caption-text">Latency User Content App</p></div>
<p>So, I wondered if there a fundamental issue with ADBCJ for writes, or if it&#8217;s an interaction effect. I ran test with separate read and write requests only. Then ADBCJ has always better latency. So, it seems to be an unfortunate interaction.</p>
<div id="attachment_2981" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/UserContentPostOnly.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/UserContentPostOnly-300x193.png" alt="Reads / Writes Only" width="300" height="193" class="size-medium wp-image-2981" /></a><p class="wp-caption-text">Reads / Writes Only</p></div>
<p>Finally, let&#8217;s take a throughput. ADBCJ does way better. Even more, when the system is under pressure, also ADBCJ’s latency for writes start to get better compared to JDBC.</p>
<div id="attachment_2985" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/Asynchronous-Database-Access2.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/Asynchronous-Database-Access2-300x213.png" alt="Throughput User Content" width="300" height="213" class="size-medium wp-image-2985" /></a><p class="wp-caption-text">Throughput User Content</p></div>
<div id="attachment_2986" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/LatencyUnderPressure.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/LatencyUnderPressure-300x193.png" alt="Latency under large Load" width="300" height="193" class="size-medium wp-image-2986" /></a><p class="wp-caption-text">Latency under large Load</p></div>
<h2>Stats Collection App</h2>
<p>The last application is a &#8216;stats collection app&#8217;, which collections information about the user’s actions. It is very write heavy, with only some rare, long running reads. Here JDBC and ADBCJ latency was about the same. However, the throughput of ADBCJ was much better.</p>
<div id="attachment_2998" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/stats-collecting.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/stats-collecting-300x204.png" alt="Stats Collecting" width="300" height="204" class="size-medium wp-image-2998" /></a><p class="wp-caption-text">Stats Collecting</p></div>
<div id="attachment_3010" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/ThroughputStats.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/03/ThroughputStats-300x212.png" alt="Stats App Throughput" width="300" height="212" class="size-medium wp-image-3010" /></a><p class="wp-caption-text">Stats App Throughput</p></div>
<h2>Conclusion</h2>
<p>So, ADBCJ can speed up your web applications. Of course, only the data serving parts. Keep in mind <a href="https://developers.google.com/speed/">caching, avoiding requests etc</a>). Of course you need to do your own experiment for your use case. Next time I&#8217;m going to explain why ADBCJ can support better latency and throughput, with code examples. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamlor.info/wordpress/2013/03/adbcj-some-peformance-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ADBCJ in Scala: Getting Started</title>
		<link>http://www.gamlor.info/wordpress/2013/02/adbcj-in-scala-getting-started/</link>
		<comments>http://www.gamlor.info/wordpress/2013/02/adbcj-in-scala-getting-started/#comments</comments>
		<pubDate>Thu, 28 Feb 2013 21:59:53 +0000</pubDate>
		<dc:creator>gamlerhart</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[software-development]]></category>
		<category><![CDATA[adbcj]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://www.gamlor.info/wordpress/?p=2935</guid>
		<description><![CDATA[What, again asynchronous database access? Yes, because I&#8217;m currently knee deep in this stuff. (^^) This post series will show how to use ADBCJ in Scala 2.10, share a few&#8230; ]]></description>
				<content:encoded><![CDATA[<p>What, again asynchronous database access? Yes, because I&#8217;m currently knee deep in this stuff. (^^) This post series will show how to use ADBCJ in Scala 2.10, share a few tips, performance insights etc.</p>
<div id="attachment_2951" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2013/02/ScalaADBCJ.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2013/02/ScalaADBCJ-300x167.png" alt="ADBCJ and Scala, new buddies" width="300" height="167" class="size-medium wp-image-2951" /></a><p class="wp-caption-text">ADBCJ and Scala, new buddies</p></div>
<h2>Grabbing the Bits</h2>
<p>Of course, first we need to grab the bits. We can get it via SBT. Currently there are only snapshots available on my snapshot repository. We pull the Scala ADBCJ API, the ADBCJ connection pool and the MySQL driver.</p>
<script src="https://gist.github.com/5057658.js?file=build.sbt"></script><noscript><pre><code class="language-scala scala">name := &quot;Scala ADBCJ Demo&quot;

version := &quot;1.0&quot;

scalaVersion := &quot;2.10.0&quot;

libraryDependencies += &quot;info.gamlor.adbcj&quot; %% &quot;scala-adbcj&quot; % &quot;0.6-SNAPSHOT&quot;

libraryDependencies += &quot;org.adbcj&quot; % &quot;adbcj-connection-pool&quot; % &quot;0.6-SNAPSHOT&quot;

libraryDependencies += &quot;org.adbcj&quot; % &quot;mysql-async-driver&quot; % &quot;0.6-SNAPSHOT&quot;

resolvers += &quot;Gamlor-Repo&quot; at &quot;https://raw.github.com/gamlerhart/gamlor-mvn/master/snapshots&quot;</code></pre></noscript>
<h2>Getting Access to the Database</h2>
<p>The next step is to get access the the database. We do this with the Database object, by passing in the connection URL, username and password. This create a instance which is used to access this database. Usually you should have one instance only per database in your application.</p>
<script src="https://gist.github.com/5057658.js?file=DatabaseAcccess.scala"></script><noscript><pre><code class="language-scala scala">  // Note the &quot;pooled&quot; prefix, for using the connection pool
  val database: DatabaseAccess = Database(&quot;adbcj:pooled:mysql://localhost/adbcj-demo&quot;,
    &quot;adbcj&quot;,
    &quot;adbcj-pwd&quot;)</code></pre></noscript>
<p>Then we can create new connections. The most basic way is to create a connection directly. However, you are then responsible for closing the connection.</p>
<script src="https://gist.github.com/5057658.js?file=Connect.scala"></script><noscript><pre><code class="language-scala scala">// connect() will return a future, which contains the connection
// You need to close the connection yourself.
val simpleConnectionFuture = database.connect()

// We can use the Scala for construct to deal nicely with futures
val futureForWholeOperation = for {
 connection &lt;-simpleConnectionFuture
 closeDone &lt;- connection.close()
} yield &quot;Done&quot;
</code></pre></noscript>
<h2>Closing Connections Automatically</h2>
<p>Now closing the connection manually can be error prone and tedious. Therefore helper methods exists. One for using a connection and one for using a connection with a new transaction.<br />
The closure has to return a future. Since everything is asynchronously, we cannot close the connection when we leave the future. Instead we need to close it when everything is done. So, the connection will be close, when the future returned by the closure is completed.</p>
<script src="https://gist.github.com/5057658.js?file=UseHelpers.scala"></script><noscript><pre><code class="language-scala scala">val doneWithConnection:Future[DBResultList] = database.withConnection{
connection =&gt;
  // do something with the connection
  // you need to return a future, because everything is asynchrous
  // so the connection can only be closed when everything is done
  connection.executeQuery(&quot;SELECT 1&quot;)
}

val doneWithTransactionAndConnection:Future[DBResultList] = database.withTransaction{
connection =&gt;
  // Same goes for transactions
  connection.executeQuery(&quot;SELECT 1&quot;)
}</code></pre></noscript>
<h2>Some Real Work</h2>
<p>Let&#8217;s do some real work. We create the schema if it doesn&#8217;t exist and then insert a few items. In general, I highly recommend to read the <a href="http://doc.akka.io/docs/akka/2.1.1/scala/futures.html">Akka documentation about futures</a>, which gives an idea how to deal with tem.</p>
<script src="https://gist.github.com/5057658.js?file=Insert.scala"></script><noscript><pre><code class="language-scala scala">val txDoneFuture = database.withTransaction{
connection =&gt;
  // Same goes for transactions
  val schemaCreation = connection.executeQuery(&quot;&quot;&quot;CREATE TABLE IF NOT EXISTS posts(\n
  						id int NOT NULL AUTO_INCREMENT,\n
							title varchar(255) NOT NULL,\n
							ontent TEXT NOT NULL,\n
							PRIMARY KEY (id)\n
							) ENGINE = INNODB;&quot;&quot;&quot;)

  val firstPost =connection.executeUpdate(&quot;INSERT INTO posts(title,content) VALUES('The Title','TheContent')&quot;)
  val secondPost =connection.executeUpdate(&quot;INSERT INTO posts(title,content) VALUES('Second Title','More Content')&quot;)
  val thirdPost =connection.executeUpdate(&quot;INSERT INTO posts(title,content) VALUES('Third Title','Even More Content')&quot;)

  // we want to await for all operations at the end
  for {
  	schemaDone &lt;-schemaCreation
  	postOneDone &lt;-firstPost
  	postTwoDone &lt;-secondPost
  	postThreeDone &lt;-thirdPost
  } yield &quot;All Done&quot;

}</code></pre></noscript>
<h2>Query</h2>
<p>Let&#8217;s also query for some data. When running queries, your future will contain a immutable result set, which supports the standard collection operations.</p>
<script src="https://gist.github.com/5057658.js?file=Select.scala"></script><noscript><pre><code class="language-scala scala">    val postsDataFuture = database.withTransaction{
      connection =&gt;
        val postsFuture =connection.executeQuery(&quot;SELECT * FROM posts&quot;)

        postsFuture onSuccess {
          case rs:DBResultList =&gt; {
            for (row &lt;- rs){
              System.out.println(&quot;ID: &quot;+row(&quot;ID&quot;).getLong()+&quot; with title &quot;+row(&quot;title&quot;).getString());
            }
          }
        }

        postsFuture
    }</code></pre></noscript>
<h2>Prepared Statements</h2>
<p>Of course, there prepared statement support:</p>
<script src="https://gist.github.com/5057658.js?file=PreparedStmt.scala"></script><noscript><pre><code class="language-scala scala">val postsDataFuture= database.withTransaction{
  connection =&gt;
  val preparingStmt =connection.prepareQuery(&quot;SELECT * FROM posts WHERE title LIKE ?&quot;)

	val postsFuture = preparingStmt.flatMap(stmt=&gt;stmt.execute(&quot;Third Title&quot;))

	postsFuture onSuccess {
	  case rs:DBResultList =&gt; {
		for (row &lt;- rs){
		  System.out.println(&quot;ID: &quot;+row(&quot;ID&quot;).getLong()+&quot; with title &quot;+row(&quot;title&quot;).getString());
		}
	  }
	}

	postsFuture
}</code></pre></noscript>
<h2>One Last Hint, Debugging</h2>
<p>So, this was a small tour through the API. However I want to share one last important thing, which helps you dealing with failures.</p>
<p>Let&#8217;s assume you ran a back query:<br />
<script src="https://gist.github.com/5057658.js?file=NormalStackTrace"></script><noscript><pre><code class="language- ">org.adbcj.mysql.codec.MysqlException: 42S02Table 'adbcj-demo.thistabledoesnotexist' doesn't exis 
  at org.adbcj.mysql.codec.packets.ErrorResponse.toException(ErrorResponse.java:49)
	at org.adbcj.mysql.codec.decoding.ExpectQueryResult.handleError(ExpectQueryResult.java:31)
	at org.adbcj.mysql.codec.decoding.ResponseStart.parse(ResponseStart.java:33)
	at org.adbcj.mysql.codec.decoding.AcceptNextResponse.parse(AcceptNextResponse.java:26)
	at org.adbcj.mysql.codec.MySqlClientDecoder.doDecode(MySqlClientDecoder.java:96)
	at org.adbcj.mysql.codec.MySqlClientDecoder.decode(MySqlClientDecoder.java:67)
	at org.adbcj.mysql.netty.Decoder.decode(MysqlConnectionManager.java:177)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:113)
	...
</code></pre></noscript></p>
<p>Then you get a future which contain the error. However, the stack trace of the error does not contain any hint where in the code the query was issues. It just contains a stack trace with the internal event loop:</p>
<p>You can use the debug flat to get a stack trace which points at the location which sent the request. Either add -Dorg.adbcj.debug=true to the JVM flags. Or set the appropriate property when crating the database access. Note that this feature is quite expensive, so I recommend to use it while developing or during an investigation.</p>
<script src="https://gist.github.com/5057658.js?file=DebugStackTrace"></script><noscript><pre><code class="language- ">org.adbcj.DbException: 42S02Table 'adbcj-demo.thistabledoesnotexist' doesn't exis 
  at org.adbcj.support.stacktracing.StackTraceCapturing$CaputureByDefault.capture(StackTraceCapturing.java:20)
	at org.adbcj.support.stacktracing.StackTraceCapturing.defaultCapture(StackTraceCapturing.java:11)
	at org.adbcj.support.stacktracing.StackTracingOptions$1.captureStacktraceAtEntryPoint(StackTracingOptions.java:12)
	at org.adbcj.support.DefaultDbFuture.&lt;init&gt;(DefaultDbFuture.java:45)
	at org.adbcj.support.DefaultDbSessionFuture.&lt;init&gt;(DefaultDbSessionFuture.java:50)
	at org.adbcj.mysql.codec.MySqlRequests.executeQuery(MySqlRequests.java:28)
	at org.adbcj.mysql.codec.MySqlConnection.executeQuery(MySqlConnection.java:108)
	at org.adbcj.mysql.codec.MySqlConnection.executeQuery(MySqlConnection.java:102)
	at org.adbcj.connectionpool.PooledConnection.executeQuery(PooledConnection.java:78)
	at info.gamlor.db.DBConnection$$anonfun$executeQuery$1.apply(DBConnection.scala:109)
	at info.gamlor.db.DBConnection$$anonfun$executeQuery$1.apply(DBConnection.scala:109)
	at info.gamlor.db.FutureConversions$class.completeWithAkkaFuture(FutureConversions.scala:20)
	at info.gamlor.db.DBConnection.completeWithAkkaFuture(DBConnection.scala:31)
	at info.gamlor.db.DBConnection.executeQuery(DBConnection.scala:109)
---&gt;at info.gamlor.adbcj.scalademo.MainDemo$$anonfun$8.apply(MainDemo.scala:99)
    ... // RIGHT Location
Caused by: org.adbcj.mysql.codec.MysqlException: 42S02Table 'adbcj-demo.thistabledoesnotexist' doesn't exist 
	at org.adbcj.mysql.codec.packets.ErrorResponse.toException(ErrorResponse.java:49)
	at org.adbcj.mysql.codec.decoding.ExpectQueryResult.handleError(ExpectQueryResult.java:31)
	at org.adbcj.mysql.codec.decoding.ResponseStart.parse(ResponseStart.java:33)
	at org.adbcj.mysql.codec.decoding.AcceptNextResponse.parse(AcceptNextResponse.java:26)
	at org.adbcj.mysql.codec.MySqlClientDecoder.doDecode(MySqlClientDecoder.java:96)
	at org.adbcj.mysql.codec.MySqlClientDecoder.decode(MySqlClientDecoder.java:67)
	at org.adbcj.mysql.netty.Decoder.decode(MysqlConnectionManager.java:177)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:113)</code></pre></noscript>

<p>So, that&#8217;s it for now. Future posts will go into more aspects of ADBCJ the interaction with Scala.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamlor.info/wordpress/2013/02/adbcj-in-scala-getting-started/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>State of Asynchronous Database Access for Java</title>
		<link>http://www.gamlor.info/wordpress/2012/12/state-of-asynchronous-database-access-for-java/</link>
		<comments>http://www.gamlor.info/wordpress/2012/12/state-of-asynchronous-database-access-for-java/#comments</comments>
		<pubDate>Mon, 24 Dec 2012 12:25:35 +0000</pubDate>
		<dc:creator>gamlerhart</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Technical Wibbly Wobbly]]></category>
		<category><![CDATA[adbcj]]></category>
		<category><![CDATA[async]]></category>

		<guid isPermaLink="false">http://www.gamlor.info/wordpress/?p=2897</guid>
		<description><![CDATA[It has been a while since I wrote any serious technical stuff. Previously I&#8217;ve already written a bit about asynchronous database access. I&#8217;ve been continuing work on this, mainly on&#8230; ]]></description>
				<content:encoded><![CDATA[<p>It has been a while since I wrote any serious technical stuff. Previously I&#8217;ve already written a bit about <a href="http://www.gamlor.info/wordpress/2012/05/async-sql-and-akka/">asynchronous database</a> access.</p>
<p>I&#8217;ve been continuing work on this, mainly on the basics, the <a href="https://github.com/gamlerhart/adbcj">ADBCJ</a> driver implementation . Here&#8217;s a overview of the updates:</p>
<ul>
<li><a href="#connection-pool">Simple connection pool</a>: This helps to avoid the costs of creating connections. It also gives a nice control how many connections are used.</li>
<li><a href="#h2-support">H2-Support</a>: Implemented a driver for the <a href="http://www.h2database.com/html/main.html">H2</a> database</li>
<li><a href="#mysql-synchronisation">MySQL Driver Restructuring</a>: The driver has been massively simplified, mainly in term of synchronization. This makes it easier to debug and reason about it.</li>
<li>DBFuture implementation moved to CAS operations instead of locks: Less overhead, simplifies implementation and avoids potential dead locks</li>
<li>Dropped PostgreSQL driver for now: I never maintained that driver, so I dropped it for now. If someone has interrest in a PostgreSQL driver, talk to me.</li>
<li>Countless bugfixes</li>
</ul>
<div id="attachment_2923" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/12/h2-database.png"><img class="size-medium wp-image-2923" alt="H2? What? Ah, the database." src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/12/h2-database-300x158.png" width="300" height="158" /></a><p class="wp-caption-text">H2? What? Ah, the database.</p></div>
<h2><a name="connection-pool"></a>Connection Pool</h2>
<p>In the JDBC world connection pools are the standard. And this has it&#8217;s reasons. Connection to a database needs some initial work. With a connection pool this overhead is avoided. Plus it gives you control how many connections are used. ADBCJ has now a connection-pool too.</p>
<p>First you need to add the pool implementation to your project:<br />
<script src="https://gist.github.com/4349067.js?file=build.sbt"></script><noscript><pre><code class="language-scala scala">libraryDependencies += &quot;org.adbcj&quot; % &quot;adbcj-connection-pool&quot; % &quot;0.5-SNAPSHOT&quot;</code></pre></noscript><br />
<script src="https://gist.github.com/4349067.js?file=pom.xml"></script><noscript><pre><code class="language-xml xml">&lt;dependency&gt;
	&lt;groupId&gt;org.adbcj&lt;/groupId&gt;
	&lt;artifactId&gt;adbcj-connection-pool&lt;/artifactId&gt;
	&lt;version&gt;0.5-SNAPSHOT&lt;/version&gt;
&lt;/dependency&gt;</code></pre></noscript></p>
<p>After that you add the prefix <em>pooled</em> to the connection string. This will load the ADBCJ connection pool. For examples:<br />
<script src="https://gist.github.com/4349067.js?file=ConnectionStrings.java"></script><noscript><pre><code class="language-java java">ConnectionManager plainMysql 
      = ConnectionManagerProvider.createConnectionManager(
            &quot;adbcj:mysql://localhost/adbcjtck&quot;, &quot;root&quot;, &quot;&quot;);

ConnectionManager pooledMysql 
      = ConnectionManagerProvider.createConnectionManager(
            &quot;adbcj:pooled:mysql://localhost/adbcjtck&quot;, &quot;root&quot;, &quot;&quot;);</code></pre></noscript></p>
<p>The connection pool can be configured by providing properties for it. Here are the supported properties with the defaults:<br />
<script src="https://gist.github.com/4349067.js?file=ConfigProperties.java"></script><noscript><pre><code class="language-java java">Map&lt;String,String&gt; poolConfig = new HashMap&lt;String, String&gt;();
poolConfig.put(&quot;pool.maxConnections&quot;,&quot;50&quot;);
poolConfig.put(&quot;pool.maxWaitForConnection&quot;,&quot;500&quot;);

ConnectionManager pooledMysql
  	= ConnectionManagerProvider.createConnectionManager(
  		&quot;adbcj:pooled:mysql://localhost/adbcjtck&quot;,
		&quot;root&quot;,
		&quot;&quot;,
		poolConfig);</code></pre></noscript></p>
<h2><a name="h2-support"></a>H2-Support</h2>
<p>I really like the H2 database. It&#8217;s simply to handle, embed, run and operate. I often use it for smaller projects, testing, default embedded database and so on. So no wonder, I&#8217;ve added support for it. You can add it via Maven/sbt.</p>
<p>First you need to add the driver to your project:<br />
<script src="https://gist.github.com/4349067.js?file=buildH2.sbt"></script><noscript><pre><code class="language-scala scala">libraryDependencies += &quot;org.adbcj&quot; % &quot;h2-async-driver&quot; % &quot;0.5-SNAPSHOT&quot;</code></pre></noscript><br />
<script src="https://gist.github.com/4349067.js?file=pomH2.xml"></script><noscript><pre><code class="language-xml xml">&lt;dependency&gt;
  &lt;groupId&gt;org.adbcj&lt;/groupId&gt;
	&lt;artifactId&gt;h2-async-driver&lt;/artifactId&gt;
	&lt;version&gt;0.5-SNAPSHOT&lt;/version&gt;
&lt;/dependency&gt;</code></pre></noscript></p>
<p>And then you can use the driver:<br />
<script src="https://gist.github.com/4349067.js?file=H2.java"></script><noscript><pre><code class="language-java java">// Plain connection
ConnectionManager h2 
       = ConnectionManagerProvider.createConnectionManager(
       	  &quot;adbcj:h2://localhost:14242/adbcjtck;MVCC=TRUE&quot;,
  	  &quot;sa&quot;,
	  &quot;sa&quot;);

// With connection pool, recommended
ConnectionManager h2Pooled 
       = ConnectionManagerProvider.createConnectionManager(
       	   &quot;adbcj:pooled:h2://localhost:14242/adbcjtck;MVCC=TRUE&quot;,
	   &quot;sa&quot;,
	   &quot;sa&quot;);</code></pre></noscript></p>
<h2><a name="mysql-synchronisation"></a>Restructuring Synchronization of MySQL driver</h2>
<p>The synchronization of the requests and running operations in the MySQL driver was quite complex. This caused a lot of head aches fixing race conditions and finding errors. I&#8217;ve rewritten the internal synchronization of the MySQL driver to be simpler and more understandable.<br />
Another side effect is, that the driver now pipelines request much more aggressively. This should improve performance in some scenario drastically. The cost of this is that most requests cannot be cancelled anymore for now.</p>
<h2>Source, etc.</h2>
<p>The source is still on GitHub (<a href="https://github.com/gamlerhart/adbcj">https://github.com/gamlerhart/adbcj</a>). Also remember that I&#8217;ve a improved <a href="http://www.gamlor.info/wordpress/2012/05/async-sql-and-akka/">Scala-API here</a>.</p>
<p>The stuff is on my Maven-Repo:<br />
<a href="https://github.com/gamlerhart/gamlor-mvn/raw/master/snapshots">https://github.com/gamlerhart/gamlor-mvn/raw/master/snapshots</a></p>
<p>Group-ID and Version for all ADBCJ projects:<br />
<code>GroupID: org.adbcj<br />
Version: 0.5.0-SNAPSHOT</code></p>
<p>API:<br />
<code>ArtifactID: adbcj-api</code></p>
<p>Mysql:<br />
<code>ArtifactID: mysql-async-driver</code></p>
<p>H2:<br />
<code>ArtifactID: h2-async-driver</code></p>
<p>Connection-Pool:<br />
<code>ArtifactID: adbcj-connection-pool</code></p>
<p>That&#8217;s it for now =)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamlor.info/wordpress/2012/12/state-of-asynchronous-database-access-for-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Guava Collection Test Suite</title>
		<link>http://www.gamlor.info/wordpress/2012/09/google-guava-collection-test-suite/</link>
		<comments>http://www.gamlor.info/wordpress/2012/09/google-guava-collection-test-suite/#comments</comments>
		<pubDate>Tue, 25 Sep 2012 21:31:33 +0000</pubDate>
		<dc:creator>gamlerhart</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[guava]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.gamlor.info/wordpress/?p=2845</guid>
		<description><![CDATA[Did you even implement your own collections for some reason? Collections which implement the Java collection interfaces? Did you ever wonder if there is test suite for collections, which tests&#8230; ]]></description>
				<content:encoded><![CDATA[<p>Did you even implement your own collections for some reason? Collections which implement the Java collection interfaces? Did you ever wonder if there is test suite for collections, which tests the specified collection-interface behavior? When your answer is yes to these questions then you should check out the Google Guava Testlib.</p>
<div id="attachment_2880" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/09/testing-things.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/09/testing-things-300x255.png" alt="Testing Collections, Ahoi" title="testing-things" width="300" height="255" class="size-medium wp-image-2880" /></a><p class="wp-caption-text">Testing Collections, Ahoi</p></div>
<p>The Google Guava Testlib brings a whole test suite which tests the behavior of Set, List and Map implementations. You can specify which features your collections support and then profit from the hundreds of tests Google has written for you.</p>
<h2>Getting Started</h2>
<p>First we need to get the library. The easiest way to get it is with Maven:<br />
<script src="https://gist.github.com/3571743.js?file=grab-with-maven.xml"></script><noscript><pre><code class="language-xml xml">&lt;dependency&gt;
	&lt;groupId&gt;com.google.guava&lt;/groupId&gt;
	&lt;artifactId&gt;guava-testlib&lt;/artifactId&gt;
	&lt;version&gt;13.0&lt;/version&gt;
	&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre></noscript></p>
<p>After that we can start to write a test suite. There are test-suite builders for this purpose, the most important ones are ListTestSuiteBuilder, SetTestSuiteBuilder and MapTestSuiteBuilder. These builder allow you to create a test-suite according to your needs.<br />
First you specify the collection to be used and the test data with the using-method. Afterwards you can specify what features are implemented by your collection. Here&#8217;s an example:</p>
<script src="https://gist.github.com/3571743.js?file=MyListTest.java"></script><noscript><pre><code class="language-java java">private Test myListTestSuite() {
	return ListTestSuiteBuilder.using(
		// This class is responsible for creating the collection
		// And providing data, which can be put into the collection
		// Here we use a abstract generator which will create strings
		// which will be put into the collection
		new TestStringListGenerator(){
			@Override
			protected List&lt;String&gt; create(String[] elements) {
				// Fill here your collection with the given elements
				return new MyListImplementation&lt;String&gt;(elements);
			}
		})
		// The name of the test suite
		.named(&quot;My List Tests&quot;)
		// Here we give a hit what features our collection supports
		.withFeatures(ListFeature.GENERAL_PURPOSE,
						CollectionFeature.ALLOWS_NULL_VALUES,
						CollectionFeature.SERIALIZABLE,
						CollectionFeature.FAILS_FAST_ON_CONCURRENT_MODIFICATION,
						CollectionSize.ANY)
		.createTestSuite();
}</code></pre></noscript>
<p>Take a good look into the available constants in CollectionFeature, ListFeature and MapFeature for the features sets to test.<br />
Anyway, BAAAMM! Now I&#8217;ve already a huge suite of test running, which cover a lot of dirty details. For example my implementation seems to have issues with the equals method of the returned sub-lists:</p>
<div id="attachment_2871" class="wp-caption aligncenter" style="width: 646px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/09/oh-collection-failures.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/09/oh-collection-failures.png" alt="Oh Oh" title="oh-collection-failures" width="636" height="553" class="size-full wp-image-2871" /></a><p class="wp-caption-text">Oh Oh</p></div>
<h2>Setup/Tear-Down, Suppressing Tests</h2>
<p>Now the actual tests do run in already written test classes. So what if your collection needs some setup- / tear down code? For example I use the test-suite to test collections which are backed up by a database. That means I need a setup- / tear down phase.<br />
This can be done by providing a runnable for the setup and tear down:</p>
<script src="https://gist.github.com/3571743.js?file=SetupTeardown.java"></script><noscript><pre><code class="language-java java">return ListTestSuiteBuilder
	.using(new TestStringListGenerator(){
		@Override
		protected List&lt;String&gt; create(String[] elements) {
			return new MyListImplementation&lt;String&gt;(elements);
		}
	})
	.named(&quot;My List Tests&quot;)
	.withFeatures(ListFeature.GENERAL_PURPOSE,
					CollectionFeature.ALLOWS_NULL_VALUES,
					CollectionFeature.SERIALIZABLE,
					CollectionFeature.FAILS_FAST_ON_CONCURRENT_MODIFICATION,
					CollectionSize.ANY)
	.withSetUp(new Runnable() {
		@Override
		public void run() {
			// some setup
		}
	})
	.withTearDown(new Runnable() {
		@Override
		public void run() {
			// some setup
		}
	})
	.createTestSuite();
</code></pre></noscript>
<p>You also can suppress very specific methods of the test suite. This is done by giving the methods which should be suppressed:</p>
<script src="https://gist.github.com/3571743.js?file=SuppressTest.java"></script><noscript><pre><code class="language-java java">// previous calls
.suppressing(Arrays.asList(suppressMethod(ListSubListTester.class, &quot;testSubList_entireList&quot;)))
.createTestSuite();


private Method suppressMethod(Class testClass,
		String methodName) {
	try {
		return testClass.getMethod(methodName, new Class[0]);
	} catch (NoSuchMethodException e) {
		throw new AssertionError(&quot;Could not find method to suppress &quot;, e);
	}
}</code></pre></noscript>
<h2>Your Own TestData</h2>
<p>Perhaps your collection implementation can only hold very specialized elements. In that case you might need to generate the test-items yourself, which are added to the list. Instead of using the Google test data provider, you can use your own. Here&#8217;s an example, which tests the collection with a custom type:</p>
<script src="https://gist.github.com/3571743.js?file=SpecializedCollections.java"></script><noscript><pre><code class="language-java java">
// Pass your test data provider to the using method
ListTestSuiteBuilder.using(new MyTestDataGenerator())
	. // continue as normal
	
	
/**
 * Own implementation of a test data generator.
 * First look if an existing one fits your needs
 */
class MyTestDataGenerator implements TestListGenerator&lt;MySpecialItem&gt; {

    @Override
    public SampleElements&lt;MySpecialItem&gt; samples() {
        return new SampleElements&lt;MySpecialItem&gt;(
                new MySpecialItem(&quot;1&quot;),
                new MySpecialItem(&quot;2&quot;),
                new MySpecialItem(&quot;3&quot;),
                new MySpecialItem(&quot;4&quot;),
                new MySpecialItem(&quot;5&quot;)

        );
    }

    @Override
    public List&lt;MySpecialItem&gt; create(Object... elementsAsObjects) {
        // Put the elements in the given array
        // into the collection.
        MySpecialItem[] castedElements = new MySpecialItem[elementsAsObjects.length];
        int i = 0;
        for (Object elementAsObject : elementsAsObjects) {
            castedElements[i++] = (MySpecialItem) elementAsObject;
        }
        return new MyListImplementation&lt;MySpecialItem&gt;((MySpecialItem[])castedElements);
    }

    @Override
    public MySpecialItem[] createArray(int length) {
        // Just create an array of the element type with the given length
        return new MySpecialItem[length];
    }

    @Override
    public Iterable&lt;MySpecialItem&gt; order(List&lt;MySpecialItem&gt; insertionOrder) {
        // In case your collection reorders elements,
        // Then you should return the original order here
        return insertionOrder;
    }
}

// Let's assume our collection only can handle specialized items
class MySpecialItem implements Serializable{
    private final String data;

    MySpecialItem(String data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return &quot;MySpecialItem{&quot; +
                &quot;data='&quot; + data + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MySpecialItem that = (MySpecialItem) o;

        if (data != null ? !data.equals(that.data) : that.data != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return data != null ? data.hashCode() : 0;
    }
}

	
	</code></pre></noscript>
<h2>Other Types</h2>
<p>Above I&#8217;ve shown examples for a List implementation. For Sets and Maps it works more or less exactly the same way. Instead of <strong>List</strong>SomeThingSomething the classes are called <strong>Set</strong>SomethingSomething or <strong>Map</strong>SomethingSomething. Otherwise the same principals apply.</p>
<h2>Conclusion</h2>
<p>If you ever implement your own Java collections, take a look at the Guava Test lib. It saves you a ton of work!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamlor.info/wordpress/2012/09/google-guava-collection-test-suite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How J2EE (still) feels to me</title>
		<link>http://www.gamlor.info/wordpress/2012/09/how-j2ee-still-feels-to-me/</link>
		<comments>http://www.gamlor.info/wordpress/2012/09/how-j2ee-still-feels-to-me/#comments</comments>
		<pubDate>Thu, 06 Sep 2012 21:25:51 +0000</pubDate>
		<dc:creator>gamlerhart</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[J2EE]]></category>

		<guid isPermaLink="false">http://www.gamlor.info/wordpress/?p=2858</guid>
		<description><![CDATA[It feels like this: &#160; I just recently started to look into some J2EE stuff. Still feels super scary. Don&#8217;t want to say much more about it. Yes,  J2EE got&#8230; ]]></description>
				<content:encoded><![CDATA[<p>It feels like this:<a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/09/j2ee.png"><img class="aligncenter size-full wp-image-2860" title="How J2EE feels to me" src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/09/j2ee.png" alt="How J2EE feels to me" width="790" height="1000" /></a></p>
<p>&nbsp;</p>
<p>I just recently started to look into some J2EE stuff. Still feels super scary. Don&#8217;t want to say much more about it. Yes,  J2EE got a lot better, but is still a giant monster. And don&#8217;t worry, there are tons of other monsters out there which are as scary as J2EE.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamlor.info/wordpress/2012/09/how-j2ee-still-feels-to-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Series Ratings: Psych, It&#8217;s Always Sunny in Philadelphia, Secret Garden, Korean Peninsula&#8230;etc.</title>
		<link>http://www.gamlor.info/wordpress/2012/06/series-ratings-psych-its-always-sunny-in-philadelphia-the-korean-peninsula-etc/</link>
		<comments>http://www.gamlor.info/wordpress/2012/06/series-ratings-psych-its-always-sunny-in-philadelphia-the-korean-peninsula-etc/#comments</comments>
		<pubDate>Sat, 30 Jun 2012 21:29:12 +0000</pubDate>
		<dc:creator>gamlerhart</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Media Zap Oh Snap]]></category>
		<category><![CDATA[4.5-rating]]></category>
		<category><![CDATA[Always Sunny in Philadelphia]]></category>
		<category><![CDATA[Dream High]]></category>
		<category><![CDATA[Mad Man]]></category>
		<category><![CDATA[Mary Stayed out All Night]]></category>
		<category><![CDATA[misfits]]></category>
		<category><![CDATA[Office Girls]]></category>
		<category><![CDATA[Peninsula]]></category>
		<category><![CDATA[Pretty Little Liars]]></category>
		<category><![CDATA[Psych]]></category>
		<category><![CDATA[Secret Garden]]></category>
		<category><![CDATA[special life investigation team]]></category>
		<category><![CDATA[tv series]]></category>
		<category><![CDATA[when it is at night]]></category>

		<guid isPermaLink="false">http://www.gamlor.info/wordpress/?p=2805</guid>
		<description><![CDATA[(이 블로그 글이 한국어로 또 있어요). In this blog I usually only write about TV series which I really like. However in this post I tell a few words about&#8230; ]]></description>
				<content:encoded><![CDATA[<p>(이 <a href="http://www.gamlor.info/wordpress/2012/06/bunch-of-tv-series-kr/">블로그 글이 한국어로</a> 또 있어요).<br />
In this blog I usually only write about TV series which I really like. However in this post I tell a few words about many different series, good ones, average ones, terrible ones.</p>
<h2>Misfits 3 (<a href="http://en.wikipedia.org/wiki/Misfits_(TV_series)">Wikipedia</a>, <a href="http://www.youtube.com/watch?v=K7i-QPlQRfI">Trailer</a>)</h2>
<p>I&#8217;ve already covered Misfits <a href="http://www.gamlor.info/wordpress/2009/12/misfits/">here.</a> And Misfits it still damn good, I really can recommend it. The third season is maybe even the best one. I especially love the Zombie episode. If you like fantasy series, and haven&#8217;t tried Misfits yet, give it a watch.</p>
<p>Star-O-Meter: (4.5/5) (Yes, I even slightly increased it).<div id="attachment_2808" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/misfits-3-en.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/misfits-3-en-300x196.jpg" alt="Zombies! Run!" title="misfits-3-en" width="300" height="196" class="size-medium wp-image-2808" /></a><p class="wp-caption-text">Zombies! Run!</p></div></p>
<h2>It&#8217;s Always Sunny in Philadelphia (<a href="http://en.wikipedia.org/wiki/Always_Sunny_in_Philadelphia">Wikipedia</a>, <a href="http://www.youtube.com/watch?v=XgAKMICbha0">Trailer</a>)</h2>
<p>May people really like this sitcom. Therefore I&#8217;ve watched one season. However I didn&#8217;t really like it. Usually I enjoy black comedy. This series is for me just average, but not great. So I stopped watching after the first season.</p>
<p>Star-O-Meter: (2.5/5)<br />
<div id="attachment_2810" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/always-sunny-en.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/always-sunny-en-300x210.jpg" alt="You don&#039;t wanna go to this bar." title="always-sunny-en" width="300" height="210" class="size-medium wp-image-2810" /></a><p class="wp-caption-text">You don&#8217;t wanna go to this bar.</p></div></p>
<h2>Psych (<a href="http://en.wikipedia.org/wiki/Psych">Wikipedia</a>, <a href="http://www.youtube.com/watch?v=FiT4Q456pTQ">Trailer</a>)</h2>
<p>In this series a guy who can remember anything pretends to be a psychic. With his abilities he help the police solving difficult cases. Psych is a humor-full detective series, which I quite like. When it&#8217;s boring this series is nice to kill a hour or two.</p>
<p>Star-O-Meter: (3/5)<br />
<div id="attachment_2812" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/psych-en.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/psych-en-300x184.jpg" alt="There are no ghosts, but big lies" title="psych-en" width="300" height="184" class="size-medium wp-image-2812" /></a><p class="wp-caption-text">There are no ghosts, but big lies</p></div></p>
<h2>Pretty Little Liars (<a href="http://en.wikipedia.org/wiki/Pretty_Little_Liars_%28TV_series%29">Wikipedia</a>, <a href="http://www.youtube.com/watch?v=LfuMhXcLa-Q">Trailer</a>)</h2>
<p>After a young woman dies, her 4 friends receive strange texts on their phones from a unknown person. These message contain secrets and lies of them. Who sends those messages? Who does he or she know all secrets? The plot sounds interesting, but the series isn&#8217;t. I found it rather boring.</p>
<p>Star-O-Meter: (2/5)<br />
<div id="attachment_2813" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/pretty-little-liars-en.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/pretty-little-liars-en-300x204.jpg" alt="Hello. Hello? Hello??!!??" title="pretty-little-liars-en" width="300" height="204" class="size-medium wp-image-2813" /></a><p class="wp-caption-text">Hello. Hello? Hello??!!??</p></div></p>
<h2>Mad Man (<a href="http://en.wikipedia.org/wiki/Mad_Men">Wikipedia</a>, <a href="http://www.youtube.com/watch?v=LfuMhXcLa-Q">Trailer</a>)</h2>
<p>Mad Man is boring. Don&#8217;t know why people like it.</p>
<p>Star-O-Meter: (1.5/5) <div id="attachment_2815" class="wp-caption aligncenter" style="width: 267px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/mad-men-en.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/mad-men-en-257x300.jpg" alt="In Mad Man people really don&#039;t work" title="mad-men-en" width="257" height="300" class="size-medium wp-image-2815" /></a><p class="wp-caption-text">In Mad Man people really don&#8217;t work</p></div></p>
<h2>Life Special Investigation Team (<a href="http://wiki.d-addicts.com/Life_Special_Investigation_Team">DramaWiki</a>)</h2>
<p>Life Special Investigation Team is another of these countless crime stories series. This time about insurance fraud. It&#8217;s alright. However it has really strange poop/fart &#8216;jokes&#8217; in there. The aren&#8217;t even jokes, just strange scenes.<br />
Star-O-Meter: (2.5/5)<br />
<div id="attachment_2819" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/life-special-en.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/life-special-en-300x252.jpg" alt="People go crazy because of insurance money" title="life-special-en" width="300" height="252" class="size-medium wp-image-2819" /></a><p class="wp-caption-text">People go crazy because of insurance money</p></div></p>
<h2>Dream High 1 and 2 (<a href="http://en.wikipedia.org/wiki/Dream_High">Wikipedia</a>, <a href="http://www.youtube.com/watch?v=Dh8t8tdwAiA">Trailer</a>)</h2>
<p>I really like <a href="http://www.gamlor.info/wordpress/2010/04/glee/">Glee </a>. Dream High is a series about music, so I expected something like Glee. However Glee is way better than Dream High. The first season is alright, but not great. The second season is the worse than the first one. </p>
<p>Star-O-Meter: (2.0/5)<br />
<div id="attachment_2821" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/dreamhigh-en.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/dreamhigh-en-300x181.jpg" alt="Dreaming" title="dreamhigh-en" width="300" height="181" class="size-medium wp-image-2821" /></a><p class="wp-caption-text">Dreaming</p></div></p>
<h2>When It&#8217;s At Night (<a href="http://wiki.d-addicts.com/When_It's_At_Night">DramaWiki</a>)</h2>
<p>In this series Heo Cho Hwi searches for old national treasures to then put them in museum. I really like the first episode, which is quite awesome. However after the first episode it gets more and more boring.</p>
<p>Star-O-Meter: (1.5/5) (However, for the first episode 3.5/5)<br />
<div id="attachment_2823" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/when-it-at-night-en.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/when-it-at-night-en-300x210.jpg" alt="Catch the thief!" title="when-it-at-night-en" width="300" height="210" class="size-medium wp-image-2823" /></a><p class="wp-caption-text">Catch the thief!</p></div></p>
<h2>Mary stayed out all Night (<a href="http://en.wikipedia.org/wiki/Mary_Stayed_Out_All_Night">Wikipedia</a>)</h2>
<p>I first though this drama revolves around some kind of marriage frauds. However it&#8217;s about an arranged marriage and love and so I lost interest. And the lead actress looks like a 14 old girl and not like the 20-25ish she&#8217;s supposed to be. Totally miss casted for this role. </p>
<p>Star-O-Meter: (0.5/5)<br />
<div id="attachment_2824" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/marry-en.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/marry-en-300x206.jpg" alt="A fraud marriage is fun" title="marry-en" width="300" height="206" class="size-medium wp-image-2824" /></a><p class="wp-caption-text">A fraud marriage is fun</p></div></p>
<h2>Secret Garden (<a href="http://en.wikipedia.org/wiki/Secret_Garden_(TV_series)">Wikipedia</a>)</h2>
<p>o.O, WOW, this thing is horrible, horrible, horrible. I cannot believe how bad this thing is (In fact, I watched the whole thing, just to see if it stays that bad). The story is a mess, I hate every character in it, the story makes no sense. Only Ha Ji Won&#8217;s character is alright. I probably could rage an hour about how bad it is.</p>
<p>Star-O-Meter: (0.0/5)<div id="attachment_2825" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/secret-garden-en.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/secret-garden-en-300x197.jpg" alt="The secret garden is in the secret forest." title="secret-garden-en" width="300" height="197" class="size-medium wp-image-2825" /></a><p class="wp-caption-text">The secret garden is in the secret forest.</p></div></p>
<h2>Office Girls (<a href="http://en.wikipedia.org/wiki/Office_Girls">Wikipedia</a>)</h2>
<p>Office Girls is also bad. Especially the music is obnoxious, it always the some crappy song. And also the sound mix is horrible. The volume between voices, music and background is inconsistent and often ill balanced. Only the comic relief characters Liu Yu Le(劉禹樂) and Shi Ta Long(史特龍) are a little bit funny.</p>
<p>Star-O-Meter: (0.0/5)<div id="attachment_2828" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/office-girls-en.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/office-girls-en-300x176.jpg" alt="Yep, who want&#039;s to work?" title="office-girls-en" width="300" height="176" class="size-medium wp-image-2828" /></a><p class="wp-caption-text">Yep, who want&#8217;s to work?</p></div></p>
<h2>Korean Peninsula (<a href="http://en.wikipedia.org/wiki/Korean_Peninsula_(TV_series)">Wikipedia</a>, <a href="http://www.youtube.com/watch?v=obUqVYHNHcY">Trailer</a>)</h2>
<p>In this series North- and South Korea together try to research on a new fuel source. However this dangerous project suffers an terror attack and all people are having a hard time.<br />
I found this thing boring and stopped watching it quickly. (Maybe it get more interesting later on?)</p>
<p>Star-O-Meter: (1.5/5)<div id="attachment_2829" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/pensuela-en.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/pensuela-en-300x273.jpg" alt="Three, Two, One....BAAAAAAAAMMMMM!" title="pensuela-en" width="300" height="273" class="size-medium wp-image-2829" /></a><p class="wp-caption-text">Three, Two, One&#8230;.BAAAAAAAAMMMMM!</p></div></p>
<h2>Conclusion</h2>
<p>I watch to many TV series.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamlor.info/wordpress/2012/06/series-ratings-psych-its-always-sunny-in-philadelphia-the-korean-peninsula-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>드라마 평가들는: Psych, It&#8217;s Always Sunny in Philadelphia,시크릿 가든, 한반도&#8230;등등</title>
		<link>http://www.gamlor.info/wordpress/2012/06/bunch-of-tv-series-kr/</link>
		<comments>http://www.gamlor.info/wordpress/2012/06/bunch-of-tv-series-kr/#comments</comments>
		<pubDate>Sat, 30 Jun 2012 17:56:42 +0000</pubDate>
		<dc:creator>gamlerhart</dc:creator>
				<category><![CDATA[Media Zap Oh Snap]]></category>
		<category><![CDATA[한국어 배우기]]></category>
		<category><![CDATA[0-rating]]></category>
		<category><![CDATA[1-rating]]></category>
		<category><![CDATA[2.5-rating]]></category>
		<category><![CDATA[4.5-rating]]></category>
		<category><![CDATA[Always Sunny in Philadelphia]]></category>
		<category><![CDATA[Dream High]]></category>
		<category><![CDATA[Mad Man]]></category>
		<category><![CDATA[Mary Stayed out All Night]]></category>
		<category><![CDATA[misfits]]></category>
		<category><![CDATA[Office Girls]]></category>
		<category><![CDATA[Peninsula]]></category>
		<category><![CDATA[Pretty Little Liars]]></category>
		<category><![CDATA[Psych]]></category>
		<category><![CDATA[Secret Garden]]></category>
		<category><![CDATA[special life investigation team]]></category>
		<category><![CDATA[tv series]]></category>
		<category><![CDATA[when it is at night]]></category>
		<category><![CDATA[한국어]]></category>

		<guid isPermaLink="false">http://www.gamlor.info/wordpress/?p=2750</guid>
		<description><![CDATA[(As always, the easier to understand, more correct version of this post is here.) 나는 이 블로그에서 보통 즐기던 드라마 에 대해  쓰고 있어요.  근데 이 블로그 글에는 많이 다른&#8230; ]]></description>
				<content:encoded><![CDATA[<p>(As always, the <a href="http://www.gamlor.info/wordpress/2012/06/series-ratings-psych-its-always-sunny-in-philadelphia-the-korean-peninsula-etc/">easier to understand, more correct version of this post is here</a>.)<br />
나는 이 블로그에서 보통 즐기던 드라마 에 대해  쓰고 있어요.  근데 이 블로그 글에는 많이 다른 드라마에 대해 짧게 얘기할 거예요. 놀라운 드라마하고, 괜찮은 드라마하고, 나쁜 드라마를 얘기할 거예요. 시작할게요:</p>
<h2>Misfits 3시즌 (<a href="http://en.wikipedia.org/wiki/Misfits_(TV_series)">Wikipedia</a>, <a href="http://www.youtube.com/watch?v=K7i-QPlQRfI">트레일러</a>)</h2>
<p>난 벌써 Misfits에 대해 <a href="http://www.gamlor.info/wordpress/2009/12/misfits/">여기에서</a> 썼어요. 그리고 Misfits는 아직 매우 재미있고 좋아하는데, 이 시리즈 추천해요. 3시즌도 아마 가장 좋은 시즌이 있어요. 특히 그 좀비-삽화 너마 재미있어요. 당신 판타지 시리즈를 좋아하고 Misfits 아직 보지 않았으면 봐보세요.</p>
<p>제 평가: (4.5/5) (네, 난 평가를 조금 조금 늘어났어요).<br />
<div id="attachment_2770" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/misfits-3-kr.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/misfits-3-kr-300x201.jpg" alt="좀비야! 빨리 가!" title="misfits-3-kr" width="300" height="201" class="size-medium wp-image-2770" /></a><p class="wp-caption-text">좀비야! 빨리 가!</p></div></p>
<h2>It&#8217;s Always Sunny in Philadelphia (<a href="http://en.wikipedia.org/wiki/Always_Sunny_in_Philadelphia">Wikipedia</a>, <a href="http://www.youtube.com/watch?v=XgAKMICbha0">트레일러</a>)</h2>
<p>많이 살암들은 이 코미디 시리즈를 매우 좋아하는데, 그래서 난 시즌을 하나 봤어요. 근데 별로 안 좋아해요. 난 블랙 유머를 자주 즐겨요. 근데 이 시리즈가 괜찮지만 놀랍지 않나요. 그래서 난 1시즌 후에 보는걸 끝냈어요.</p>
<p>제 평가: (2.5/5)<br />
<div id="attachment_2771" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/always-sunny-kr.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/always-sunny-kr-300x171.jpg" alt="그 술집에서 가고 안 싶어요!" title="always-sunny-kr" width="300" height="171" class="size-medium wp-image-2771" /></a><p class="wp-caption-text">그 술집에서 가고 안 싶어요!</p></div></p>
<h2>Psych (<a href="http://en.wikipedia.org/wiki/Psych">Wikipedia</a>, <a href="http://www.youtube.com/watch?v=FiT4Q456pTQ">트레일러</a>)</h2>
<p>이 시리즈에서 다 기억한 남자는 심령술사 사람인 척하고 경찰 도와요. 그리고 어려운 범죄 사건 풀어 도와요. Psych는 유머로 범죄물 있는데 넌 꽤 좋아해요. 혹시 심심할 때 이 시리즈 보는 것 괜찮아요. </p>
<p>제 평가: (3/5)<br />
<div id="attachment_2772" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/psych-kr.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/psych-kr-300x209.jpg" alt="귀신이 없어요. 근데 근 거짓말해요." title="psych-kr" width="300" height="209" class="size-medium wp-image-2772" /></a><p class="wp-caption-text">귀신이 없어요. 근데 근 거짓말해요.</p></div></p>
<h2>Pretty Little Liars (<a href="http://en.wikipedia.org/wiki/Pretty_Little_Liars_%28TV_series%29">Wikipedia</a>, <a href="http://www.youtube.com/watch?v=LfuMhXcLa-Q">트레일러</a>)</h2>
<p>이 시리즈에서 어린 여자가 죽은 후에 친구 4명은 모른 사람한테서 이상은 핸드폰에 메시지를 받아요. 그 메시지에 비밀과 거짓말이 있어요. 누구 그 메시지를 보내고 있어요? 왜 다 비밀이 알아요? 이 이아기가 흥미있는 것 같지만 흥미가 없어요. 난 이 시리즈에 심심했어요.</p>
<p>제 평가: (2/5)<br />
<div id="attachment_2773" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/pretty-little-liars.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/pretty-little-liars-300x190.jpg" alt="여보세요? 여보세요? 여보세요?!!!!" title="pretty-little-liars" width="300" height="190" class="size-medium wp-image-2773" /></a><p class="wp-caption-text">여보세요? 여보세요? 여보세요?!!!!</p></div></p>
<h2>Mad Man (<a href="http://en.wikipedia.org/wiki/Mad_Men">Wikipedia</a>, <a href="http://www.youtube.com/watch?v=LfuMhXcLa-Q">트레일러</a>)</h2>
<p>Mad Man도 매우 심심해요. 왜 많이 사람 이 시리즈 좋아한 걸 말라요.</p>
<p>제 평가: (1.5/5)</p>
<div id="attachment_2787" class="wp-caption aligncenter" style="width: 262px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/mad-men.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/mad-men-252x300.jpg" alt="Mad Men에서 사람들은 절대 일을 안해요" title="mad-men" width="252" height="300" class="size-medium wp-image-2787" /></a><p class="wp-caption-text">Mad Men에서 사람들은 절대 일을 안해요</p></div>
<h2>라이프 특별조사팀 (<a href="http://ko.wikipedia.org/wiki/라이프_특별조사팀">위키백과</a>)</h2>
<p>라이프 특별조사팀는 범죄물 이고 보험 속이 얘기하는데. 이 드라마도 괜찮아요. 근데 이상 똥-장면 몇개 있어요. </p>
<p>제 평가: (2.5/5)<br />
<div id="attachment_2775" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/life-special-kr.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/life-special-kr-300x239.jpg" alt="사람은 보험 돈 때문에 미쳤어요" title="life-special-kr" width="300" height="239" class="size-medium wp-image-2775" /></a><p class="wp-caption-text">사람은 보험 돈 때문에 미쳤어요</p></div></p>
<h2>드림하이(Dream High) 1하고 2 (<a href="http://ko.wikipedia.org/wiki/드림하이">위키백과</a>, <a href="http://www.youtube.com/watch?v=Dh8t8tdwAiA">트레일러</a>)</h2>
<p>나는 <a href="http://www.gamlor.info/wordpress/2010/04/glee/">Glee </a>아주 좋아해요. 드림하이 음악 관한 드라마에요, 그래서 드림하이 Glee처럼 기대했어요. 근데 Glee가 드림하이보다 더 좋아하는데. 드림하이 1는 괜찮아요, 하지만 대단 안 해요. 그리고  드림하이 2가 드림하이 1보다 더 나빠요.</p>
<p>제 평가: (2/5)<div id="attachment_2776" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/dreamhigh-kr.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/dreamhigh-kr-300x181.jpg" alt="꿈 꾸다" title="dreamhigh-kr" width="300" height="181" class="size-medium wp-image-2776" /></a><p class="wp-caption-text">꿈 꾸다</p></div></p>
<h2>밤이면 밤마다 (<a href="http://ko.wikipedia.org/wiki/밤이면_밤마다_(MBC)">위키백과</a>)</h2>
<p>이 드라마에서 허초희씨 오래 된 국보를 찾아보고 박물관에서 가져가요. 난 1삽화를 매우 좋아했어요. 근데 1삽화 후에 이 드라마가 점점 심심해져요.</p>
<p>제 평가: (1.5/5) (하지만 1삽화의 평가 3.5/5 이다)</p>
<div id="attachment_2788" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/when-it-at-night.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/when-it-at-night-300x205.jpg" alt="도둑이 잡아라!" title="when-it-at-night" width="300" height="205" class="size-medium wp-image-2788" /></a><p class="wp-caption-text">도둑이 잡아라!</p></div>
<h2>매리는 외박중(<a href="http://ko.wikipedia.org/wiki/매리는_외박중_(드라마)">위키백과</a>)</h2>
<p>나는 처음에 이 드라마가 속이 관한 이야기이라고 생각했는데. 근데 중매 결혼하고 사랑이 이야기 있어서 내가 관심 없어요. 심심한 것 같아요. 그리고 이끌 여자배우 14살 아이처럼 보이지만, 20-25살된 여자가 연기해요. 그 출연 나빠요.</p>
<p>제 평가: (0.5/5) <div id="attachment_2780" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/marry-kr.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/marry-kr-300x202.jpg" alt="속인 결혼이 재미있어요." title="marry-kr" width="300" height="202" class="size-medium wp-image-2780" /></a><p class="wp-caption-text">속인 결혼이 재미있어요.</p></div></p>
<h2>시크릿 가든 (<a href="http://ko.wikipedia.org/wiki/시크릿_가든_(드라마)">위키백과</a>)</h2>
<p>(O.o) 이 드라마가 너무 너무 너무 나빠요! 나는 시크릿 가든이 나쁜것 못 믿어요. 이야기 나쁜데, 난 모든 캐릭터를 너무 싫어하고, 이야기 이해하지 않아요. 하지원씨의 캐릭터만 괜찮아요. </p>
<p>제 평가: (0/5)<div id="attachment_2781" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/secret-garden.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/secret-garden-300x206.jpg" alt="비밀 정원은 비밀 숲에 있어요" title="secret-garden" width="300" height="206" class="size-medium wp-image-2781" /></a><p class="wp-caption-text">비밀 정원은 비밀 숲에 있어요</p></div></p>
<h2>Office Girls (<a href="http://en.wikipedia.org/wiki/Office_Girls">Wikipedia</a>)</h2>
<p>Office Girls도 너무 나빠요. 음악도 나쁜데, 같은 나쁜 노래 항상 들려요. 그래도 소리의 볼륨 나쁘게 믹스했어요. 코믹 릴리프있은 Liu Yu Le(劉禹樂)하고 Shi Ta Long(史特龍)가 조금 재미있어요.</p>
<p>제 평가: (0.5/5)<div id="attachment_2783" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/office-girls-kr.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/office-girls-kr-300x176.jpg" alt="그럼, 누구 일하고 싶어요?" title="office-girls-kr" width="300" height="176" class="size-medium wp-image-2783" /></a><p class="wp-caption-text">그럼, 누구 일하고 싶어요?</p></div></p>
<h2>한반도 (<a href="http://ko.wikipedia.org/wiki/한반도_(드라마)">위키백과</a>, <a href="http://www.youtube.com/watch?v=obUqVYHNHcY">트레일러</a>)</h2>
<p>이 드라마에서 한국과 북한 함께 과학로 연료 연구하는데. 그 위험한 프로젝트가 테러 행위 받았는데 모두 사람들이 힘들어 시간이 보내요.<br />
난 그 드라마를 심심한 것 같아요. 난 빨리 그만 봤어요.</p>
<p>제 평가: (1.5/5)<div id="attachment_2782" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/pensuela.jpg"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/pensuela-300x273.jpg" alt="셋, 돌, 하나, 파아아아암~~~~~~~~~~~~~~~~~" title="pensuela" width="300" height="273" class="size-medium wp-image-2782" /></a><p class="wp-caption-text">셋, 돌, 하나, 파아아아암~~~~~~~~~~~~~~~~~</p></div> </p>
<h2>결론은</h2>
<p>난 너무 시리즈를 보고 있어요.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamlor.info/wordpress/2012/06/bunch-of-tv-series-kr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Performance Numbers With Akka Async SQL</title>
		<link>http://www.gamlor.info/wordpress/2012/06/some-performance-numbers-with-akka-async-sql/</link>
		<comments>http://www.gamlor.info/wordpress/2012/06/some-performance-numbers-with-akka-async-sql/#comments</comments>
		<pubDate>Thu, 21 Jun 2012 21:11:45 +0000</pubDate>
		<dc:creator>gamlerhart</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Technical Wibbly Wobbly]]></category>
		<category><![CDATA[akka]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Scala]]></category>

		<guid isPermaLink="false">http://www.gamlor.info/wordpress/?p=2717</guid>
		<description><![CDATA[A while back I wrote about my small Async SQL library for Akka and its asynchronous MySQL driver. Besides a few tiny fixes I&#8217;ve added nothing new recently. However I&#8230; ]]></description>
				<content:encoded><![CDATA[<p>A while back I wrote about my small <a href="http://www.gamlor.info/wordpress/2012/05/async-sql-and-akka/">Async SQL library for Akka and its asynchronous MySQL driver</a>. Besides a few tiny fixes I&#8217;ve added nothing new recently.<br />
However I want to share a few number from my performance experiments.<br />
<div id="attachment_2735" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/adbcj-vs-jdbc.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/adbcj-vs-jdbc-300x147.png" alt="Racing Stuff" title="adbcj-vs-jdbc" width="300" height="147" class="size-medium wp-image-2735" /></a><p class="wp-caption-text">Racing Stuff</p></div></p>
<h2>Good Benchmarking, Science for itself</h2>
<p>Good benchmarking is a small science for itself. Creating a balanced benchmark, ensure equal conditions for multiple runs, cranking out usable numbers, do proper analysis etc. I didn&#8217;t do that. I just wrote some code, ran that stuff and compared the numbers.<br />
In the end it heavily depends on your scenario anyway. For example when you run trivial queries against a local database, then JDBC will probably win, since it only blocks a thread very briefly. If you add web-like latencies to the database communication, then my ADBCJ solution has an huge advantage.</p>
<h2>The Benchmark Scenario</h2>
<p>This is basically the benchmark scenario which I measured. It simulates a web like application.</p>
<ul>
<li>A request comes in</li>
<li>We query for the most important data. Also we query for some less important data. The more important data is returned asynchronously to the client first, while the other queries are still running. This should simulate a page, which first shows the important stuff and loads the rest in the back ground, like many websites do.</li>
<li>When the first part of the result arrives at the client, another request is sent, which updates some data</li>
<li>When all queries, updates and operations complete, we&#8217;re done. We measure the time between issuing the request and completing everything</li>
</ul>
<p>For the plain JDBC implementation I used the <a href="http://doc.akka.io/docs/akka/2.0.2/scala/futures.html">Akka future API</a>, to run that work in the background and continue with the other operations. The ADBCJ implementation relies on its asynchronous API.<br />
For these number I ran the database locally, so there is no huge round trip overhead. Only the queries need a bit of time to complete, from sub milliseconds up the around 6 milliseconds.</p>
<h2>Result, JDBC vs ADBCJ</h2>
<p>Well ADBCJ is as expected faster for this task. Mainly because it can send new queries, while processing the in streaming result of previous queries. Maybe the JDBC implementation also ends up exhausting the thread pool with blocked threads, but I didn&#8217;t check it if that&#8217;s the case:</p>
<table border="0" width="40%" cellpadding="0" cellspacing="0">
<tr>
<td></td>
<td>JDBC</td>
<td>ADBCJ</td>
</tr>
<tr>
<td>Min</td>
<td>36.00ms</td>
<td>20.00ms</td>
</tr>
<tr>
<td>Median</td>
<td>47.00ms</td>
<td>32.00ms</td>
</tr>
<tr>
<td>Mean</td>
<td>66.26ms</td>
<td>41.25ms</td>
</tr>
<tr>
<td>Max.</td>
<td>222.00ms</td>
<td>155.00ms</td>
</tr>
</table>
<p>Here&#8217;s also a box plot of the data. There is quite a high variance in the data, and a few latency spikes:<br />
<div id="attachment_2724" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/JDBC-vs-ADBJC.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/JDBC-vs-ADBJC-300x225.png" alt="JDBC vs ADBCJ" title="JDBC vs ADBCJ" width="300" height="225" class="size-medium wp-image-2724" /></a><p class="wp-caption-text">JDBC vs ADBCJ</p></div></p>
<h2>JDBC with Connection Pool, ADBCJ via JDBC bridge</h2>
<p>Now this is a little unfair, since you usually use a connection pool for JDBC. And we didn&#8217;t check out the ADBCJ via JDBC fallback driver. So I ran the benchmark as well with the <a href="http://jolbox.com/">BoneCP connection pool</a> and ADBCJ via JDBC.<br />
Guess what, JDBC with a connection pool reacts the fastest. This means that a connection pool has a huge effect in this benchmark, since it opens and closes database connection often. The conclusion is that ADBCJ desperately needs its own connect pool implementation, to handle similar scenarios.<br />
Another interesting fact is that ADBCJ via JDBC performs the worst here. It’s clear that it is probably a bit slower the JDBC version, because I manually split the JDBC calls reasonably across threads. The ADBCJ to JDBC bridge has no insight how to smartly dispatch the blocking calls. However the huge difference between JDBC and ADBCJ via JDBC is surprising. This could indicate that there are some implementation issues present in the ADBCJ to JDBC bridge.</p>
<table border="0" width="60%" cellpadding="0" cellspacing="0">
<tr>
<td></td>
<td>JDBC with Pool</td>
<td>ADBCJ</td>
<td>JDBC</td>
<td>ADBCJ via JDBC</td>
</tr>
<tr>
<td>Min</td>
<td>17.00ms</td>
<td>20.00ms</td>
<td>36.00ms</td>
<td>40.00ms</td>
</tr>
<tr>
<td>Median</td>
<td>30.00ms</td>
<td>32.00ms</td>
<td>47.00ms</td>
<td>72.00ms</td>
</tr>
<tr>
<td>Mean</td>
<td>41.37ms</td>
<td>41.25ms</td>
<td>66.26ms</td>
<td>85.35ms</td>
</tr>
<tr>
<td>Max.</td>
<td>156.00ms</td>
<td>155.00ms</td>
<td>222.00ms</td>
<td>197.00ms</td>
</tr>
</table>
<p>Again a box plot of this data. Again high variance and quite a few spikes:<br />
<div id="attachment_2727" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/withJDBCPool.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/withJDBCPool-300x225.png" alt="JDBC Connection Pool, ADBCJ via JDBC" title="withJDBCPool" width="300" height="225" class="size-medium wp-image-2727" /></a><p class="wp-caption-text">JDBC Connection Pool, ADBCJ via JDBC</p></div></p>
<h2>High Load Performance</h2>
<p>Well, I wanted to see if the picture doesn&#8217;t change if the load is much higher. So I cranked the executed request up, so that the machine is fairly busy. The database is still running locally. The picture doesn&#8217;t change much, maybe there is a tendency that the performance advantage of ADBCJ gets bigger. But I didn&#8217;t to more scaling testing to verify that. <br />
Also the ADBCJ to JDBC bridge crashed, because it just issued way to many connections. Well, as mentioned, the ADBCJ to JDBC bridge is more testing facility anyway.</p>
<table border="0" width="40%" cellpadding="0" cellspacing="0">
<tr>
<td></td>
<td>JDBC</td>
<td>ADBCJ</td>
</tr>
<tr>
<td>Min</td>
<td>41.00ms</td>
<td>20.00ms</td>
</tr>
<tr>
<td>Median</td>
<td>142.00ms</td>
<td>59.50ms</td>
</tr>
<tr>
<td>Mean</td>
<td>160.22ms</td>
<td>77.43ms</td>
</tr>
<tr>
<td>Max.</td>
<td>604.00ms</td>
<td>298.00ms</td>
</tr>
</table>
<p>And again in a box plot:<br />
<div id="attachment_2729" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/HighLoad-JDBC-vs-ADBCJ.png"><img src="http://www.gamlor.info/wordpress/wp-content/uploads/2012/06/HighLoad-JDBC-vs-ADBCJ-300x225.png" alt="Higher Load: JDBC vs ADBCJ" title="HighLoad-JDBC-vs-ADBCJ" width="300" height="225" class="size-medium wp-image-2729" /></a><p class="wp-caption-text">Higher Load: JDBC vs ADBCJ</p></div></p>
<h2>Conclusion</h2>
<p>Well, don&#8217;t draw to many conclusion from these numbers. We certainly can see that ADBCJ can be faster for some scenarios. We also can clearly  see, that the missing connection pool for ADBCJ is a huge performance penalty for many applications. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamlor.info/wordpress/2012/06/some-performance-numbers-with-akka-async-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
