New RIFERS blogs entries from Geert Bevinhttp://rifers.org/blogs
The feeds of the Rifers community blogsenCopyright of the content contained is attributed to the original authorsFri, 18 Aug 2017 06:44:57 +0200Rifers Blogs: https://rifers.org/blogsReviving RIFE, starting work on version 2http://rifers.org/blogs/gbevin/2013/6/23/reviving_rife_starting_version2
<p>Hi everyone, </p>
<p>I'm not sure at all who's still active in the server-side web development world, but it seemed best to reach out through the old channels in case some people are interested in reviving RIFE. </p>
<p>I've personally been busy with a lot of other projects during the last 7 years, ranging for high-performance clustered data tools to real-time musical instruments. </p>
<p>I'm now working at ZeroTurnaround on the LiveRebel product and am being confronted with the state of web development nowadays. To my surprise, in many ways the approaches in RIFE are still relevant and even the Play framework is lacking quite a lot of RIFE's simplicity and power. </p>
<p>So, a few months ago I started work to analyze what I want to keep from RIFE version 1 to build a fresh version 2: <a href="https://github.com/gbevin/rife">https://github.com/gbevin/rife</a>. I took a little break to work on another quick pet-project in the meantime (<a href="http://uwyn.com/geco">http://uwyn.com/geco</a>) but that's now all ready for launch. </p>
<p>The idea is to basically put a lot of things in question about RIFE and trim it down, throw away a lot of the junk that was accumulated and make the features very opinionated and targeted. </p>
<p>My initial plan of action is this: </p>
<ul>
<li>focus on pure Java and byte-code instrumentation, no scripting languages </li>
<li>leverage the upcoming features of Java 8 </li>
<li>rebuild the template engine with largely the same ideas in place, but clearer and more focused </li>
<li>properly finish the isolation of the continuations engine and bring it up to date </li>
<li>rethink the infrastructure with IoC as a starting point, instead of having it as an afterthought </li>
<li>totally rewrite the web engine, with similar principles but much more conventions and less configuration </li>
<li>trim out the database abstraction layer for only certain relevant databases </li>
</ul>
<p>I've started mocking up the new version of the template engine and took an initial stab at creating an Antlr 4 grammar. That sadly is really not working out so I've started work on a new custom parser. </p>
<p>One of my mistakes with RIFE v1 was that I didn't involve the community much during the development process, so I want to change that. </p>
<p>If you're interested in shaping what RIFE version 2 is going to become, please hop on the developers mailing list and say hi: <a href="https://groups.google.com/forum/#!forum/rife-dev">https://groups.google.com/forum/#!forum/rife-dev</a> </p>
<p>Hope to hear from some of you! </p>Sun, 23 Jun 2013 21:32:38 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2013/6/23/reviving_rife_starting_version2The sanitization of Ehcache's Cache constructorshttp://rifers.org/blogs/gbevin/2010/2/17/ehcache_cache_constructors
<p>We've all been there, you start with a class and a simple constructor that makes total sense. As time goes by, you keep adding features and the list of constructor arguments grows &hellip; and grows &hellip; until &hellip; it becomes unusable. This is exactly what happened with the <code>Cache</code> class in Ehcache.</p>
<p>The version 1.0 constructor looked like this:</p>
<div class="paste">
<div><code><!-- : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) -->
<span class="java_keyword">public</span><span class="java_plain">&nbsp;</span><span class="java_type">Cache</span><span class="java_separator">(</span><span class="java_type">String</span><span class="java_plain">&nbsp;name</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_type">int</span><span class="java_plain">&nbsp;maxElementsInMemory</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">boolean</span><span class="java_plain">&nbsp;overflowToDisk</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_type">boolean</span><span class="java_plain">&nbsp;eternal</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">long</span><span class="java_plain">&nbsp;timeToLiveSeconds</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_type">long</span><span class="java_plain">&nbsp;timeToIdleSeconds</span><span class="java_separator">)</span><span class="java_plain"></span></code></div>
</div>
<p>However, with version 1.7 this turned into:</p>
<div class="paste">
<div><code><!-- : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) -->
<span class="java_keyword">public</span><span class="java_plain">&nbsp;</span><span class="java_type">Cache</span><span class="java_separator">(</span><span class="java_type">String</span><span class="java_plain">&nbsp;name</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_type">int</span><span class="java_plain">&nbsp;maxElementsInMemory</span><span class="java_separator">,</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">MemoryStoreEvictionPolicy</span><span class="java_plain">&nbsp;memoryStoreEvictionPolicy</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">boolean</span><span class="java_plain">&nbsp;overflowToDisk</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_type">String</span><span class="java_plain">&nbsp;diskStorePath</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">boolean</span><span class="java_plain">&nbsp;eternal</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_type">long</span><span class="java_plain">&nbsp;timeToLiveSeconds</span><span class="java_separator">,</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">long</span><span class="java_plain">&nbsp;timeToIdleSeconds</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_type">boolean</span><span class="java_plain">&nbsp;diskPersistent</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">long</span><span class="java_plain">&nbsp;diskExpiryThreadIntervalSeconds</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">RegisteredEventListeners</span><span class="java_plain">&nbsp;registeredEventListeners</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">BootstrapCacheLoader</span><span class="java_plain">&nbsp;bootstrapCacheLoader</span><span class="java_separator">,</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">int</span><span class="java_plain">&nbsp;maxElementsOnDisk</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_type">int</span><span class="java_plain">&nbsp;diskSpoolBufferSizeMB</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">boolean</span><span class="java_plain">&nbsp;clearOnFlush</span><span class="java_separator">,</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">boolean</span><span class="java_plain">&nbsp;isTerracottaClustered</span><span class="java_separator">,</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">String</span><span class="java_plain">&nbsp;terracottaValueMode</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_type">boolean</span><span class="java_plain">&nbsp;terracottaCoherentReads</span><span class="java_separator">)</span><span class="java_plain"></span></code></div>
</div>
<p>There are a lot of downsides to relying on constructor parameters like this:</p>
<ul>
<li>the author of the class needs to continue to overload the constructors to add new parameters</li>
<li>users need to decide which overloaded constructor they want to use</li>
<li>users need to figure out what sensible default values are for the values that they're not interested in</li>
<li>it's very easy to accidentally put a value at the wrong place and provide wrong parameters</li>
<li>reading the constructor afterwards is a nightmare and can't be done without looking at the Javadocs at the same time, for instance:</li>
</ul>
<div class="paste">
<div><code><!-- : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) -->
<span class="java_keyword">new</span><span class="java_plain">&nbsp;</span><span class="java_type">Cache</span><span class="java_separator">(</span><span class="java_literal">&quot;myCache&quot;</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">10000</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_type">MemoryStoreEvictionPolicy</span><span class="java_separator">.</span><span class="java_plain">LRU</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">false</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_literal">null</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">true</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">60</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">30</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">false</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">0</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">null</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">null</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">0</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">0</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">false</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_literal">true</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">&quot;identity&quot;</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">true</span><span class="java_separator">)</span><span class="java_plain"></span></code></div>
</div>
<p>However there some advantages:</p>
<ul>
<li>you can enforce which parameters are mandatory</li>
<li>at instantiation you can validate the constructor parameters</li>
<li>at instantiation you fully set up the instance without requiring users to call an initialization method</li>
</ul>
<p>So, we decided to change the <code>Cache</code> constructor approach in Ehcache 2.0 and use a builder pattern with a fluent interface, keeping the advantages of the parameters approach but solving all the problems.</p>
<p>The version 2.0 constructor looks like this:</p>
<div class="paste">
<div><code><!-- : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) -->
<span class="java_keyword">new</span><span class="java_plain">&nbsp;</span><span class="java_type">Cache</span><span class="java_separator">(</span><span class="java_type">CacheConfiguration</span><span class="java_plain">&nbsp;config</span><span class="java_separator">)</span><span class="java_plain"></span></code></div>
</div>
<p>We then created a constructor in <code>CacheConfigurator</code> with the strict minimal number of parameters that are required for a cache to function:</p>
<div class="paste">
<div><code><!-- : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) -->
<span class="java_keyword">public</span><span class="java_plain">&nbsp;</span><span class="java_type">CacheConfiguration</span><span class="java_separator">(</span><span class="java_type">String</span><span class="java_plain">&nbsp;name</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_type">int</span><span class="java_plain">&nbsp;maxElementsInMemory</span><span class="java_separator">)</span><span class="java_plain"></span></code></div>
</div>
<p>All the other parameters are implemented as fluent interface methods as well as regular setters and getters so that instances of the class can be used as beans:</p>
<div class="paste">
<div><code><!-- : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) -->
<span class="java_keyword">public</span><span class="java_plain">&nbsp;</span><span class="java_keyword">final</span><span class="java_plain">&nbsp;</span><span class="java_type">CacheConfiguration</span><span class="java_plain">&nbsp;clearOnFlush</span><span class="java_separator">(</span><span class="java_type">boolean</span><span class="java_plain">&nbsp;clearOnFlush</span><span class="java_separator">)</span><span class="java_plain">&nbsp;</span><span class="java_separator">{</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;setClearOnFlush</span><span class="java_separator">(</span><span class="java_plain">clearOnFlush</span><span class="java_separator">);</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;</span><span class="java_keyword">return</span><span class="java_plain">&nbsp;</span><span class="java_keyword">this</span><span class="java_separator">;</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_separator">}</span><span class="java_plain"></span></code></div>
</div>
<p>This allows the example above to be rewritten like this:</p>
<div class="paste">
<div><code><!-- : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) -->
<span class="java_keyword">new</span><span class="java_plain">&nbsp;</span><span class="java_type">Cache</span><span class="java_separator">(</span><span class="java_keyword">new</span><span class="java_plain">&nbsp;</span><span class="java_type">CacheConfiguration</span><span class="java_separator">(</span><span class="java_literal">&quot;myCache&quot;</span><span class="java_separator">,</span><span class="java_plain">&nbsp;</span><span class="java_literal">10000</span><span class="java_separator">)</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_separator">.</span><span class="java_plain">eternal</span><span class="java_separator">(</span><span class="java_literal">true</span><span class="java_separator">)</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_separator">.</span><span class="java_plain">timeToLiveSeconds</span><span class="java_separator">(</span><span class="java_literal">60</span><span class="java_separator">)</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_separator">.</span><span class="java_plain">timeToIdleSeconds</span><span class="java_separator">(</span><span class="java_literal">30</span><span class="java_separator">)</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_separator">.</span><span class="java_plain">terracotta</span><span class="java_separator">(</span><span class="java_keyword">new</span><span class="java_plain">&nbsp;</span><span class="java_type">TerracottaConfiguration</span><span class="java_separator">()</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_separator">.</span><span class="java_plain">clustered</span><span class="java_separator">(</span><span class="java_literal">true</span><span class="java_separator">)</span><span class="java_plain"></span></code></div>
<div><code>
<span class="java_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="java_separator">.</span><span class="java_plain">valueMode</span><span class="java_separator">(</span><span class="java_type">ValueMode</span><span class="java_separator">.</span><span class="java_plain">IDENTITY</span><span class="java_separator">)));</span><span class="java_plain"></span></code></div>
</div>
<p>The end results are that:</p>
<ul>
<li>we can continue to expand the <code>CacheConfiguration</code> class without ever having to change the constructors of the <code>Cache</code> class</li>
<li>the user doesn't have to figure out the defaults for parameters he doesn't care about</li>
<li>the configuration parameters are self-explanatory by simply looking at the available API methods</li>
<li>anyone can read the usage of any <code>Cache</code> constructor and understand what each configuration value's purpose is</li>
</ul>Wed, 17 Feb 2010 18:34:11 +0100Geert Bevinhttp://rifers.org/blogs/gbevin/2010/2/17/ehcache_cache_constructorsFix for slower startup and shutdown times since Snow Leopard 10.6.1http://rifers.org/blogs/gbevin/2009/9/20/slow_startupshutdown_snowleopard
<p>Ever since I upgraded to Snow Leopard 10.6.1, my MacBook Pro startup and shutdown was much slower than before.</p>
<p>I searched for a quite a while on forums to find the solution, but nobody seemed to know a solution. I finally figured out what it was. It seems that somehow the ownership of my startup volume's root directory (/) wasn't assigned to the root account anymore, but to my account instead. This made the kernel prelinking fail since it requires that root is the owner.</p>
<p>This is how you solve this after launching the Terminal app:</p>
<div class="paste">
<div><code>sudo chown root:admin /<br />
sudo kextcache -system-prelinked-kernel<br />
sudo kextcache -system-caches</code></div></div>
<p>You'll have to enter your password after the first command.</p>
<p>Hope this helps someone, since it was really frustrating to have these slower startup/shutdown times for me. </p>Sun, 20 Sep 2009 23:09:13 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2009/9/20/slow_startupshutdown_snowleopardTerracotta 3.1: Introduction to Examinatorhttp://rifers.org/blogs/gbevin/2009/8/27/terracotta_3_1_intro_examinator
<p>Terracotta 3.1GA was released a few days ago and sports some interesting new features that are specifically geared towards clustering Hibernate second level caches.</p>
<p>I decided to create a series of video tutorials and presentations about Terracotta's new clustered caching capabilities and will demonstrate most of this from our Examinator reference application.</p>
<p>The first video highlights how to install, setup and use Examinator as a basis for the next videos.</p>
<p>Enjoy!</p>
<div align="center">
<a href="http://www.youtube.com/watch?v=0y4_sTytFDA">http://www.youtube.com/watch?v=0y4_sTytFDA</a>
</div>
<div align="center">
<script type="text/javascript">
<!--
document.write("<object width=\"660\" height=\"525\"><param name=\"movie\" value=\"http://www.youtube.com/v/0y4_sTytFDA&hl=en&fs=1&rel=0&border=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/0y4_sTytFDA&hl=en&fs=1&rel=0&border=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"660\" height=\"525\"></embed></object>");
//-->
</script>
<noscript>
<object width="660" height="525"><param name="movie" value="http://www.youtube.com/v/0y4_sTytFDA&amp;hl=en&amp;fs=1&amp;rel=0&amp;border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param></object>
</noscript>
</div>
Thu, 27 Aug 2009 19:16:52 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2009/8/27/terracotta_3_1_intro_examinatorMy first YouTube video : Robert Plant cover songhttp://rifers.org/blogs/gbevin/2009/8/27/first_youtube_video
<p>I picked music back up after a loooong hiatus of 7 years. I decided to evolve together with the world and to broadcast myself <img src="http://rifers.org/images/blog/emoticon-wink.gif" width="16" height="16" alt=";)" />.</p>
<p>Did the first one last night. The song is "All The Kings Horses" from Robert Plant and the Strange Sensation. When I heard it playing last afternoon from my iTunes collection, I couldn't help picking up my guitar to figure out the chords and such. This recording is the result of a couple of hours searching and rehearsing. I'm considering adding it to a concert repertoire I'm preparing, as one of the few cover songs.</p>
<p>Anyways, my YouTube channel is located at <a href="http://www.youtube.com/gbevin">http://www.youtube.com/gbevin</a> and I'll be posting new entries as I learn and compose songs.</p>
<p>Hope you enjoy it, and if you don't, still be nice <img src="http://rifers.org/images/blog/emoticon-normal.gif" width="16" height="16" alt=":)" /></p>
<div align="center">
<a href="http://www.youtube.com/watch?v=Vwa0ZwxX_x8">http://www.youtube.com/watch?v=Vwa0ZwxX_x8</a>
</div>
<div align="center">
<script type="text/javascript">
<!--
document.write("<object width=\"425\" height=\"373\"><param name=\"movie\" value=\"http://www.youtube.com/v/Vwa0ZwxX_x8&amp;hl=en&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://www.youtube.com/v/Vwa0ZwxX_x8&amp;hl=en&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"373\"></embed></object>");
//-->
</script>
<noscript>
<object width="425" height="373"><param name="movie" value="http://www.youtube.com/v/Vwa0ZwxX_x8&amp;hl=en&amp;color1=0x2b405b&amp;color2=0x6b8ab6&amp;border=1"></param><param name="wmode" value="transparent"></param></object>
</noscript>
</div>Thu, 27 Aug 2009 19:16:47 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2009/8/27/first_youtube_videoHow do you use Hibernate Extended Sessions?http://rifers.org/blogs/gbevin/2009/4/16/how_do_you_use_hibernate_extend
<p>The <a href="http://www.hibernate.org/43.html">Open Session in View</a> pattern is very popular when Hibernate is used in a web application. This allows you to safely use managed entities when your view is being rendered. At <a href="http://terracotta.org">Terracotta</a>, we're currently researching what other patterns are popular for Hibernate and how people apply them.</p>
<p>One that I'm in particular looking into is the <a href="http://www.hibernate.org/43.html#A5">Extended Session</a> pattern for long running conversations. This allows you to disconnect a Hibernate session in between requests and to store it in the HTTP session in the meantime.</p>
<p><b>I'd like to know who's using the extended session pattern and what you use it for.</b></p>
<p>To understand more about this, I developed a small example application to get a feel for the advantages, the benefits, the gotchas and the surprises. The application can be found below, it is inspired by snippets from Hibernate tutorials and example applications:</p>
<p><a href="http://svn.terracotta.org/svn/forge/projects/hibernate-disconnected/trunk/">http://svn.terracotta.org/svn/forge/projects/hibernate-disconnected/trunk/</a></p>
<p>The example uses only servlets, filters and Hibernate. It is a webapp that allows you to create events and add people to it over different requests. When an event has been created with all the relevant people, it can be committed in one step. The intermediate state is kept within the managed entities and the Hibernate session until it's flushed.</p>
<p>This is what I found worth mentioning:</p>
<ul>
<li>Whenever a transaction is created and committed, it doesn't matter if Hibernate flush mode is set to manual, certain operations like persist and merge will be propagated to the database at transaction commit. However, modifications to managed entities wont be committed, this can be confusing.</li>
<li>Even with manually flushed sessions, transactions are always real database transactions, causing locks to be held. They thus need to be as short as possible.</li>
<li>A single general-purpose servlet filter might not be feasible, depending on how transactions should behave. In this application, I ended up creating only a transaction around the actual session flush.</li>
<li>Data that is present in a manually flushed session buffer is batched but not available for queries.</li>
<li>This doesn't behave the same as a database transaction with isolation levels that can still see their own changes.</li>
<li>If the data needs to be available for a query, a commit needs to happen first.</li>
<li>This can require application changes, like a redirect after form submission in case transactions are automatically committed through a servlet filter.</li>
</ul>
<p>Totally unrelated but cool, you can use an <code>AnnotationConfiguration</code> class to setup the Hibernate config and use a fluent interface to add the managed entity classes. This reduces the amount of XML and eases maintenance (see <a href="http://svn.terracotta.org/svn/forge/projects/hibernate-disconnected/trunk/src/main/java/org/terracotta/hibernate/disconnected/util/HibernateUtil.java"><code>HibernateUtil</code></a> class in my example).</p>Thu, 16 Apr 2009 15:53:08 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2009/4/16/how_do_you_use_hibernate_extendFirst recordings of my new band ... check it out!http://rifers.org/blogs/gbevin/2009/3/2/first_recordings_of_my_new_band
<p>I've been extremely busy during the last months since I picked up music again alongside my day-job. You might have noticed from the severe lack of blog posts that I didn't have much time to spare <img src="http://rifers.org/images/blog/emoticon-wink.gif" width="16" height="16" alt=";)" /></p>
<p>I started a new band, called <a href="http://flytecase.be">Flytecase</a> and have been composing, arranging and rehearsing new songs like there's no tomorrow. This weekend, we finished recording and mixing two of our songs. I'd be very interested to know what people think about them.</p>
<p>You can check them out here: <a href="http://flytecase.be">http://flytecase.be</a></p>
<p>Note that our site redirects to a public Facebook page, but you don't to be a Facebook member to listen to the songs. However if you are, please consider leaving a comment on our wall and to sign yourself up as a fan when you like the music.</p>Mon, 02 Mar 2009 15:28:27 +0100Geert Bevinhttp://rifers.org/blogs/gbevin/2009/3/2/first_recordings_of_my_new_bandJavaZone 2008 : Bytecode Manipulation in the Real Worldhttp://rifers.org/blogs/gbevin/2008/9/17/javazone_2008_bytecode
<p>I just finished my talk at JavaZone 2008 about bytecode manipulation.</p>
<p>You can download the presentation's PDF file from:</p>
<p><a href="http://uwyn.com/download/bytecode_real_world.pdf">http://uwyn.com/download/bytecode_real_world.pdf</a></p>
<p>This is the abstract:</p>
<p><b>Bytecode Manipulation in the Real World</b></p>
<p>Bytecode manipulation has become increasingly popular over the last years. It is used by JPA implementations, application servers, AOP libraries, web frameworks, monitoring systems, profilers, clustering solutions, scripting languages, workflow engines, and much more. In fact, most of today's applications will most probably rely on byte code manipulation, often even without realizing.</p>
<p>Application developers however seem to be overly careful and often frown upon bytecode manipulation as an arcane art that is risky and difficult to understand. This presentation will show you that it's easier than you think. We'll go over concise examples that illustrate the concepts. Distinct patterns, coming from different domains, will give you ideas about adopting byte code manipulation for your own products. You'll learn arguments to reassure skeptics and see how the manipulation can plugged into your tool chain. We'll finish off with tips and tricks to write maintainable code with the ASM library.</p>
<p>After this session you'll see byte code manipulation as another tool in your arsenal and you'll have a good picture of how to start using it yourself.</p>
<p><b>Outline:</b></p>
<ul>
<li>What is bytecode manipulation?</li>
<li>Some popular projects that use it</li>
<li>Don't be afraid</li>
<li>Plug in the manipulation</li>
<li>Best practices</li>
</ul>Wed, 17 Sep 2008 13:29:38 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2008/9/17/javazone_2008_bytecodeGame Review : Alone in the Dark for XBox 360http://rifers.org/blogs/gbevin/2008/8/10/game_review_alone_in_the_dark
<p><img src="http://media.ign.com/games/image/object/774/774387/aloneinthedarkxbox360boxart_160w.jpg" alt="box art" align="left" style="margin: 0 1em 1em 0" />This is a first for me, I don't usually review games. I like Alone in the Dark so much thought, that I felt like talking about it.</p>
<p>I bought this game after having read all the bad reviews out there. However, it seemed to me that most criticisms boiled down to the reviewers being unable to handle the controls or being unwilling to take a little bit of time to get used to them. The graphics that I saw, the description of the features, the game play, and the storyline all attracted me, so I got the game a week ago.</p>
<p>I just finished it and I have to say that I rarely have had so much fun with a game. It's entirely different from any other next gen title out there in that it generally allows you to take your time and think things through. You can combine many real world objects to create bombs, set cars on fire, create gasoline trails, glue molotov cocktails to enemies, etc. The right approach often gets you through a tough spot without have to resort close combat. I've seen videos of players just storming into scenes and having an impossible time getting through them because they didn't properly look at the possibilities beforehand.</p>
<p>This game stems from the great line of adventure games of old, yet it take everything into this new generation by give you a great free-roaming world with kick ass physics. Sure, there are frustrating sections that take a lot of practice and skill to succeed (like the car chases), but if you don't like this kind of game play ... just skip it. With its DVD menu system, Alone In The Dark let's you play what you want and doesn't force you, what a novel idea! Personally, I found these sections thrilling since after some practice you get through them and really feel a sense of accomplishment.</p>
<p>What more to say. The inventory system is awesome and not frustrating thanks to the shortcuts that you can setup. The switch between first person and third person isn't gratuitous and instead serve very different purposes and allow you to fully appreciate the game. The fighting system where you control the weapon with the right analog stick is just awesome. It's like having a mini Wii controller on the 360's game pad. Additionally, it allows you grab objects and move them around you in three-dimensional space to solve puzzles. This is once more very innovative and refreshing.</p>
<p>Finally, it seems to me that Alone in the Dark is a work of art and that it's simple not appreciated by the mainstream press. This is nothing new and often happens to visionaries. I for one hope that Eden Studios will continue along this path and surprise me with other games in the future. We need studios that dare to step outside the beaten path and execute this in such a masterful way as Alone in the Dark.</p>
<p>Thanks a lot for this game! </p>
<h3>Scores</h3>
<table style="width: 40em">
<tr>
<td><b>10.0</b></td><td width="100%"><b>Presentation</b></td>
</tr>
<tr>
<td colspan="2">Everything oozes quality. The menu system, the inventory, the atmosphere, the in-game hints. Perfect score!</td>
</tr>
<tr>
<td><b>9.0</b></td><td><b>Graphics</b></td>
</tr>
<tr>
<td colspan="2">The graphics are in general top-notch though there's some clipping or frame rate dips. The whole cinematic feel is dead on though and regularly shows breathtaking scenes.</td>
</tr>
<tr>
<td><b>10.0</b></td><td><b>Sound</b></td>
</tr>
<tr>
<td colspan="2">Perfect and thrilling! This music score could have been done for a Hollywood block buster!</td>
</tr>
<tr>
<td><b>9.0</b></td><td><b>Gameplay</b></td>
</tr>
<tr>
<td colspan="2">It takes a little while to get used to the large set of controls. They quickly feel natural though and allow you to interact with the world in a totally novel fashion.</td>
</tr>
<tr>
<td><b>7.0</b></td><td><b>Lasting Appeal</b></td>
</tr>
<tr>
<td colspan="2">The game is short and I will probably not replay it. However, the story line and atmosphere is so good that it will probably become one of those reference games that I think of for many years to come.</td>
</tr>
<tr>
<td><b>9.0</b></td><td><b>OVERALL</b></td>
</tr>
<tr>
<td colspan="2">(out of 10 / not an average)</td>
</tr>
</table>Sun, 10 Aug 2008 22:55:07 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2008/8/10/game_review_alone_in_the_darkChannel Intelligence's European patent application is in bad shapehttp://rifers.org/blogs/gbevin/2008/7/24/channel_intelligence_european
<p>Today one of the Belgian patent information centers got back to me to discuss the state of <a href="http://register1.epoline.org/espacenet/regviewer?AP=02806291&amp;CY=EP&amp;LG=en&amp;DB=REG">Channel Intelligence's European patent application</a>. They confirm that the patent is indeed still under examination and that means that it has not even been sent to the local patent offices of each individual country where this patent would apply.</p>
<p>The patent has been under examination for over 7 years and Channel Intelligence has been gradually trying to adapt some of the claims to get it past the examinator. The fact that it is taking this long is a good sign since it means that the patent office never consider it to be into an acceptable state and it already went through several iterations. Also, since this is clearly a software patent, the representative of this Belgian information center confirmed that it will be almost impossible for this patent application to be approved in Europe.</p>
<p>He suggested that I put a comprehensive dossier together with all prior art and detailed explanations about how they invalidate the novelty and inventiveness of the patent. This seems to correspond with what's written in <a href="http://www.epo.org/patents/law/legal-texts/html/epc/2000/e/ar115.html">article 115 of the European Patent Convention</a>. The examinator however has no obligation to take this into consideration. At his sole discretion he can decide to use or ignore the information that is sent to him.</p>
<p>However, that's not all. In the very unlikely event that this patent might be accepted in Europe, there's still a 9 month period after the acceptance date where an official protest can be filed. This doesn't have to be done through a lawyer and can simply be coordinated with a local patent office. Such actions however can't be ignored and will have to be examined in detail by the global European Patent Office.</p>
<p>I thus plan on creating this dossier and also publish it on my blog. Anybody that feels strongly against this patent will then be able to use this information to send his or her own letter to the patent office. If we coordinate this correctly, they might not be able to ignore the pressure.</p>
<p>Thanks a lot everyone for all your support. I'm amazed at how friendly and helpful everyone has been so far.</p>Thu, 24 Jul 2008 20:47:57 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2008/7/24/channel_intelligence_europeanChannel Intelligence patent : abundance of prior arthttp://rifers.org/blogs/gbevin/2008/7/23/channel_intelligence_prior_art
<p>Since the European patent that Channel Intelligence tries to sue us with <a href="http://rifers.org/blogs/gbevin/2008/7/23/did_channel_intelligence_jump_t">doesn't seem to be granted yet</a>. I'm now looking for prior art to stop the patent from being awarded. This could make this lawsuit go simply go away for everyone they targeted in Europe.</p>
<p>Below is a list of what I already found with the help of friends. If you have other suggestions, please add them as comments.</p>
<p>Also, I'd appreciate it if people could help me <a href="http://www.docstoc.com/docs/953027/Channel-Intelligence-vs-Uwyn">to read over the patent</a> and validate the applicability of this prior art. I might have missed something.</p>
<ul>
<li><b>2001 : The Things I Want</b> (<a href="http://thethingsiwant.com/">http://thethingsiwant.com</a>) - create universal online wishlists and gift registries<br /><br /></li>
<li><b>2000 : ShopSmart</b> (<a href="http://web.archive.org/web/20000510040121/http://www.shopsmart.com/">web archive</a>) - allowed you to create lists of items, to compare the prices and to prioritize them. A friend of mine worked on this application and there are even articles published about it in the Sunday Times and the Daily Post. Still looking for copies of those.<br /><br /></li>
<li><b>1999 : Kelkoo</b> (<a href="http://kelkoo.com">http://kelkoo.com</a>) - seems to do exactly what is described in the patent, I contacted them to see if they can help to protest against the patent application.<br /><br /></li>
<li><b>1997 : No Amiga To Waste</b> (<a href="http://thunderstorms.org/NATW">http://thunderstorms.org/NATW</a>) - this is an application that I created where lists of ideas can be created and commented on over the internet. While not 100% inside e-commerce realm (Bla-bla List isn't either btw), this can be seen as prior art imho.<br /><br /></li>
<li><b>1996 : Peapod</b> (<a href="http://peapod.com">http://peapod.com</a>) - allows you to create online grocery lists.<br /><br /></li>
</ul>Wed, 23 Jul 2008 11:28:14 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2008/7/23/channel_intelligence_prior_artDid Channel Intelligence jump the gun with the European patent complaints?http://rifers.org/blogs/gbevin/2008/7/23/did_channel_intelligence_jump_t
<p>The <a href="http://rifers.org/blogs/gbevin/2008/7/18/request_for_help_first_time_i_h">official complaint from Channel Intelligence</a> states the <a href="http://www.google.com/patents?vid=USPAT6917941">US patent number</a> but it only vaguely mentions that they 'own the foreign equivalents'. I thus decided to search for them, and I found this: <a href="http://register1.epoline.org/espacenet/regviewer?AP=02806291&amp;CY=EP&amp;LG=en&amp;DB=REG">http://register1.epoline.org/espacenet/regviewer</a>.</p>
<p>It turns out that the equivalent European patent is still under examination. I've contacted the Belgian patent office to see what the local status is and they're getting back to me shortly. With the abundance of prior art, it might actually be easy to stop the patent from being granted in Europe now. Apparently it's much more effective to intervene during the examination process than it is to contest the patent once it's granted.</p>Wed, 23 Jul 2008 09:50:02 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2008/7/23/did_channel_intelligence_jump_tChannel Intelligence vs. Uwyn : thoughts after the first dayhttp://rifers.org/blogs/gbevin/2008/7/19/thoughts_after_first_day
<p>Thanks a lot everyone for all your helpful comments. It's heartwarming to see how many people care and manifest their support.</p>
<p>I already had some informal legal assistance and it seems that causing a patent to be revoked is a very expensive process. That is the only thing that prior art can be used for. Since the patent is there and has been granted by the US patent office, its validity cannot be challenged unless it's entirely revoked. What I can do is challenge the relevance of the patent in regards to Bla-bla List. I'm now waiting for replies from several open-source foundations that are supposed to provide free legal assistance is cases like this. If they don't come through, I'll have to hire a patent lawyer in Belgium.</p>
<p>I've also contacted the lawyers that sent me this letter directly to ask them for concrete suggestions about the amicable resolve that they propose. At least this will give me a picture about what they're after. This what I sent them:</p>
<div class="quotebody"><p>Dear sir,</p>
<p>I just received a fedex about your claim that http://blablalist.com would infringe intellectual property rights that are allegedly held by Channel Intelligence, Inc. in US patent No. 6,917,941.</p>
<p>The service provided at http://blablalist.com has been free of charge and the technology is actually made available for free under an open-source license that has been approved by the Free Software Foundation. Uwyn has never received any payments from the users of the service nor made any profits from it.</p>
<p>As you suggest in the last paragraph of your letter, I'm ready to discuss ways to resolve this amicably. What are your suggestions?</p>
<p>Best regards,</p>
<p>Geert</p></div>
<p>There seem to be a collection of possible reasons that I can use to dismiss myself as a defendant. I didn't know that the legal system worked this way, but apparently it's common for patent infringement cases to target a whole laundry list of defendants. They all typically try to be dismissed and only one valid reason is needed for this to happen. If the suggestions for an amicable resolve don't satisfy me, aiming for a dismissal will probably be my next course of action.</p>
<p>I'll keep you all posted!</p>Sat, 19 Jul 2008 10:34:53 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2008/7/19/thoughts_after_first_dayRequest for help : first time I have to deal with a patent infringement complainthttp://rifers.org/blogs/gbevin/2008/7/18/request_for_help_first_time_i_h
<p>I'm reaching out to the collective experience of my readers. Today I received a letter from a US attorney that claims that <a href="http://blablalist.com">Bla-bla List</a> infringes on <a href="http://www.google.com/patents?vid=USPAT6917941">US Patent No. 6,917,941</a>.</p>
<p>Bla-bla List has just been an experiment for me with Rich Internet Applications. It has always been an open-source effort and I made it available as a free service to see how well it would fare out in the wild. Since this service never generated any revenue for me, paying for a lawyer to dig into this is something that I'd like the avoid (though maybe I can't).</p>
<p>Has anyone here ever had to defend himself again such a claim? Does the software being open-source or the service being free make any difference?</p>
<p>Thanks for any help or recommendations that you can give me.</p>
<p><b>update:</b> people have asked me for the lawyer's letter and the claim, I scanned it and you can download it as a 1MB PDF from <a href="http://blablalist.com/ca-08-437.pdf">http://blablalist.com/ca-08-437.pdf</a> or browse through it online at <a href="http://www.docstoc.com/docs/document-preview.aspx?doc_id=953027">http://www.docstoc.com/docs/document-preview.aspx?doc_id=953027</a></p>
<p><b>update 2:</b> seems I'm not alone in this, they have sued about any list application out there : <a href="http://www.techcrunch.com/2008/07/17/channel-intelligence-sues-just-about-everyone-who-offers-wishlists/">http://www.techcrunch.com/2008/07/17/channel-intelligence-sues-just-about-everyone-who-offers-wishlists/</a></p>Fri, 18 Jul 2008 11:15:19 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2008/7/18/request_for_help_first_time_i_hBeware, Apple TV warranty isn't worldwidehttp://rifers.org/blogs/gbevin/2008/7/16/apple_tv_warranty_isnt_worldwide
<p>When I was in the USA I bought an Apple TV and brought it back home to Belgium.</p>
<p>Last night, it broke down entirely after just a couple of months of operation. When I hook it up to the power socket, nothing happens. The front light doesn't light up, and I can hear no noises of the hard drive spinning up either. Seems to me that either a fuse broke, or something else just fried.</p>
<p>I spent some time with the Apple support line, both in the USA and in Belgium and they both say that I can only have it services in USA. I'll thus have to wait 'till my next trip to San Francisco in October to have the Apple TV repaired.</p>
<p>This sucks, I thought that all Apple products had worldwide warranties, apparently some of them don't.</p>Wed, 16 Jul 2008 10:00:26 +0200Geert Bevinhttp://rifers.org/blogs/gbevin/2008/7/16/apple_tv_warranty_isnt_worldwide