<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7369917695391880645</id><updated>2012-01-16T08:25:42.818-08:00</updated><category term='App Engine'/><category term='Go'/><category term='GWT'/><category term='Cli'/><category term='Grape'/><category term='Grails'/><category term='Socket.IO'/><category term='Perl'/><category term='JavaScript'/><category term='DTrace'/><category term='concurrency'/><category term='Groovy'/><category term='CPAN'/><category term='Serialization'/><category term='Node'/><title type='text'>Online Village</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>42</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-1124708129821078682</id><published>2012-01-05T10:45:00.001-08:00</published><updated>2012-01-16T08:25:42.830-08:00</updated><title type='text'>Install Graphite On A SmartMachine (SmartOS Zone)</title><content type='html'>I've been hearing a lot of good things about Graphite lately. So I thought I'd give it a try on a SmartOS Zone (SmartMachine?). I had one heck of a time installing it. Here's how I did it. &lt;br /&gt;&lt;br /&gt;First, for some reason I had to use the 32bit version SmartOS 1.4.7.  If you try the 64bit version, the first error you get:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Checking for header Python.h             : Could not find the python development headers&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;But this appears to be a red herring and the real issue is related to 32 vs 64bit issues. Investigating this helped me understand why people don't like waf.  Just use the 32bit zone and safe some pain.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Install all the dependencies that are available via pkgin:&lt;br /&gt;&lt;br /&gt;pkgin install  apache gcc-compiler scmgit python27 pkg-config cairo xproto  renderproto-0.11 kbproto py27-setuptools py27-django py27-twisted ap22-py27-wsgi&lt;br /&gt;&lt;br /&gt;I ran into a problem where it said apache was missing when I tried to download it. This was fixed by doing 'pkgin -f update'. The '-f' was necessary. &lt;br /&gt;&lt;br /&gt;Dependency - pycairo&lt;br /&gt;&lt;br /&gt;Install pycairo, we need py2cairo as its for python 2.7:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;git clone git://git.cairographics.org/git/py2cairo&lt;br /&gt;cd py2cairo&lt;br /&gt;PREFIX="/opt/local" ./waf configure&lt;br /&gt;./waf build &lt;br /&gt;./waf install&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Install Graphite components 'by hand'. Download, untar and  run 'python setup.py install' in each of the resulting directories:&lt;br /&gt;&lt;br /&gt;http://pypi.python.org/pypi/carbon&lt;br /&gt;http://pypi.python.org/pypi/graphite-web&lt;br /&gt;http://pypi.python.org/pypi/whisper&lt;br /&gt;&lt;br /&gt;Install django-tagging by hand. Download, untar and  run 'python setup.py install'.&lt;br /&gt;http://code.google.com/p/django-tagging/downloads/list&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Inside graphite-web run:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;./check-dependencies.py&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You might see warning, but there shouldn't see any FATAL messages.&lt;br /&gt;&lt;br /&gt;(Under Construction) You still need to: &lt;br /&gt;- copy and edit the apache config&lt;br /&gt;- copy the .wsgi example into place&lt;br /&gt;- copy the carbon.conf.example and the storage-schemas.conf.example&lt;br /&gt;- patch the settings.py file so that it doesn't prepend the third party path&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-1124708129821078682?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/1124708129821078682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=1124708129821078682' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/1124708129821078682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/1124708129821078682'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2012/01/install-graphite-on-smartmachine.html' title='Install Graphite On A SmartMachine (SmartOS Zone)'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-824398420302653859</id><published>2011-11-05T19:10:00.000-07:00</published><updated>2011-11-05T19:46:25.423-07:00</updated><title type='text'>How Node.js Multiprocess Load Balancing Works</title><content type='html'>As of version 0.6.0 of node, load multiple process load balancing is available for node. The concept of forking and child processes isn't new to me. Yet, it wasn't obvious to me how this was implemented at first. It's quite &lt;a href="http://nodejs.org/docs/v0.6.0/api/cluster.html"&gt;easy to use&lt;/a&gt; however:&lt;div&gt;&lt;span class="Apple-style-span" style="background-color: rgb(248, 248, 248); "&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;var cluster = require('cluster');&lt;br /&gt;var http = require('http');&lt;br /&gt;var numCPUs = require('os').cpus().length;&lt;br /&gt;&lt;br /&gt;if (cluster.isMaster) {&lt;br /&gt;  // Fork workers.&lt;br /&gt;  for (var i = 0; i &amp;lt; numCPUs; i++) {&lt;br /&gt;    cluster.fork();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  cluster.on('death', function(worker) {&lt;br /&gt;    console.log('worker ' + worker.pid + ' died');&lt;br /&gt;  });&lt;br /&gt;} else {&lt;br /&gt;  // Worker processes have a http server.&lt;br /&gt;  http.Server(function(req, res) {&lt;br /&gt;    res.writeHead(200);&lt;br /&gt;    res.end("hello world\n");&lt;br /&gt;  }).listen(8000);&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="background-color: rgb(248, 248, 248); "&gt;This is quite a beautiful api,  but it hides some clever details. For instance, how is possible for all child processes to each open up port 8000 and start listening?&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The answer is that the cluster module is just a wrapper around child_process.fork and net.Server.listen is aware of the cluster module. Specifically, cluster.fork uses child_process.fork to create child processes with special variable set in their environments to indicate cluster was used. Specifically process.env.NODE_WORKER_ID is non-zero for such children. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font: normal normal normal 12px/normal 'Bitstream Vera Sans Mono', Courier, monospace; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; line-height: 1.4; text-align: -webkit-auto; background-color: rgb(255, 255, 255); "&gt;&lt;div class="line" id="LC157" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;envCopy&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;[&lt;/span&gt;&lt;span class="s1" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(221, 17, 68); "&gt;'NODE_WORKER_ID'&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;]&lt;/span&gt; &lt;span class="o" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;id&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC158" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt; &lt;span class="kd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;var&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;worker&lt;/span&gt; &lt;span class="o" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;fork&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;(&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;workerFilename&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;workerArgs&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt; &lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;{&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;env&lt;/span&gt;&lt;span class="o" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;:&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;envCopy&lt;/span&gt; &lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then net.Server.listen checks to see if process.env.NODE_WORKER_ID is set. If so, then the current process is a child created cluster. Instead of trying to start accepting connections on this port, a file handle is requested from the parent process:&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div class="line" id="LC717" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; text-align: -webkit-auto; white-space: pre; background-color: rgb(255, 255, 255); line-height: 1.4; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; "&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC717" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; text-align: -webkit-auto; white-space: pre; background-color: rgb(255, 255, 255); line-height: 1.4; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; "&gt;//inside net.js&lt;br /&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;require&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;(&lt;/span&gt;&lt;span class="s1" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(221, 17, 68); "&gt;'cluster'&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;).&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;_getServer&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;(&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;address&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;port&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;addressType&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt; &lt;span class="kd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;function&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;(&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;handle&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;)&lt;/span&gt; &lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC718" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; text-align: -webkit-auto; white-space: pre; background-color: rgb(255, 255, 255); line-height: 1.4; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; "&gt;      &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;self&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;.&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;_handle&lt;/span&gt; &lt;span class="o" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;handle&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC719" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; text-align: -webkit-auto; white-space: pre; background-color: rgb(255, 255, 255); line-height: 1.4; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; "&gt;      &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;self&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;.&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;_listen2&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;(&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;address&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;port&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;addressType&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC720" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; text-align: -webkit-auto; white-space: pre; background-color: rgb(255, 255, 255); line-height: 1.4; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; "&gt;    &lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;});&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC720" style="font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; text-align: -webkit-auto; white-space: pre; background-color: rgb(255, 255, 255); line-height: 1.4; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; "&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, serif; font-size: 16px; line-height: normal; white-space: normal; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font: normal normal normal 12px/normal 'Bitstream Vera Sans Mono', Courier, monospace; font-family: 'Bitstream Vera Sans Mono', Courier, monospace; font-size: 12px; line-height: 1.4; text-align: -webkit-auto; background-color: rgb(255, 255, 255); "&gt;&lt;div class="line" id="LC217" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;//inside cluster.js&lt;br /&gt;cluster&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;.&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;_getServer&lt;/span&gt; &lt;span class="o" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;=&lt;/span&gt; &lt;span class="kd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;function&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;(&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;address&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;port&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;addressType&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;cb&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;)&lt;/span&gt; &lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC218" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt;  &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;assert&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;(&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;cluster&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;.&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;isWorker&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC219" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC220" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt;  &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;queryMaster&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;({&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC221" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt;    &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;cmd&lt;/span&gt;&lt;span class="o" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;:&lt;/span&gt; &lt;span class="s2" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(221, 17, 68); "&gt;"queryServer"&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC222" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt;    &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;address&lt;/span&gt;&lt;span class="o" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;:&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;address&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC223" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt;    &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;port&lt;/span&gt;&lt;span class="o" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;:&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;port&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC224" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt;    &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;addressType&lt;/span&gt;&lt;span class="o" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;:&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;addressType&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC225" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt;  &lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;},&lt;/span&gt; &lt;span class="kd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold; "&gt;function&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;(&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;msg&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;,&lt;/span&gt; &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;handle&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;)&lt;/span&gt; &lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC226" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt;    &lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;cb&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;(&lt;/span&gt;&lt;span class="nx" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;handle&lt;/span&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC227" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt;  &lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;});&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC228" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 1em; background-color: transparent; "&gt;&lt;span class="p" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;};&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Finally, this handle is listened on instead of creating a new handle. At which point you have another process that is listening on the same port. Quite clever, though I think the beauty of the api comes at the cost of some not so hideous hacks inside the api. &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-824398420302653859?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/824398420302653859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=824398420302653859' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/824398420302653859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/824398420302653859'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2011/11/how-nodejs-multiprocess-load-balancing.html' title='How Node.js Multiprocess Load Balancing Works'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-1070125111670408597</id><published>2011-10-23T11:32:00.000-07:00</published><updated>2011-10-23T14:53:30.213-07:00</updated><title type='text'>Why KVM on Illumos matters - ZFS</title><content type='html'>&lt;div&gt;When Joyent first &lt;a href="http://dtrace.org/blogs/bmc/2011/08/15/kvm-on-illumos/"&gt;announced&lt;/a&gt; they had ported KVM to Illumos,  the value proposition didn't occur to me right away. Both KVM and Xen under Linux have been around for while and you if want/need to run a Linux guest, why not use a linux Host? One reason is a feature of ZFS known as a zvol.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To understand what a zvol is, you must first understand what a zpool is. In short its an abstraction on top of one or many disks turning it all into a logical unit on which filesystems can be created. Multiple disks can be used for both redunancy and performance. In particular, you can create a zpool that uses  a pair of super fast state of the art SSDs for the ZIL, or intent log. This makes random writes blazingly fast. You can add a couple of fast SSDs as a read caching layer (l2arc). Finally, use those boring old -but relatively high capacity- magnetic disks for raw storage. The result is a hybrid storage system that provides performance and redundancy at a terrific price.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The zpool is where the zfs filesystems live. So once you create a pool you can create a bunch of different file systems in there. You can also create and export block devices from a zpool, these are called zvols. These block devices can now be passed to qemu running on top of kvm inside Illumos, providing the underlying VM's with potentially blazingly fast redundant storage. A Linux VM will use this block device as if were a raw disk.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More generally, by using a zvol  for a guest disk you can use all the &lt;a href="http://en.wikipedia.org/wiki/ZFS#Features"&gt;ZFS features&lt;/a&gt; that are below the zfs filesystem layer. For instance it's possible to snapshot a live/attached zvol then export that snapshot to a file which can be used to create backups and clones. The implications for cloud/cluster management are clear. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's some other posts on zvols I found interesting:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.markround.com/archives/37-ZFS-as-a-volume-manager.html"&gt;http://www.markround.com/archives/37-ZFS-as-a-volume-manager.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;a href="http://blogs.oracle.com/scottdickson/entry/fun_with_zvols_-_ufs"&gt;http://blogs.oracle.com/scottdickson/entry/fun_with_zvols_-_ufs&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-1070125111670408597?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/1070125111670408597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=1070125111670408597' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/1070125111670408597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/1070125111670408597'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2011/10/why-does-kvm-illumos-matter-zfs.html' title='Why KVM on Illumos matters - ZFS'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-7888881347786946188</id><published>2011-10-20T12:06:00.000-07:00</published><updated>2011-10-23T09:40:58.181-07:00</updated><title type='text'>OpenSource Drobo replacement - Update</title><content type='html'>After over two years of faithful service, I've upgraded &lt;a href="http://onlinevillage.blogspot.com/2009_09_01_archive.html"&gt;my OpenSource Drobo replacement&lt;/a&gt;. I thought it fitting to write an update post as my new setup is even better though mostly the same.&lt;br /&gt;&lt;br /&gt;For perspective, not long after I setup this system, Apple discontinued work on the ZFS port to OS X. Thankfully the work they had done was solid. During the last 2 years I lost 2 drives and was easily able to replace them and get back to full speed within 24 hours of purchasing a new disk.&lt;br /&gt;&lt;br /&gt;My new system consists of  the same Mediasonic 4 bay ProBox headed by a Zotac ATOM based NetTop I purchased for around $300. You can buy a &lt;a href="http://www.newegg.ca/Product/Product.aspx?Item=N82E16856173016"&gt;similar model&lt;/a&gt; now without ram or disk for under $150. I'd go for this one if I could go back in time. You can use a cheap USB stick and two gigs of ram for under $100 these days.&lt;br /&gt;&lt;br /&gt;For the new head operating system I tried a couple of different Open Solaris/Illumos based distrobutions such as Smart OS, Open Indiana and Nextenta Core Platform. Unfortunately but unsurprisingly, these didn't seem to like my cheap hardware. I finally stumbled upon &lt;a href="http://www.freenas.org/"&gt;FreeNas&lt;/a&gt;, a FreeBSD based NAS appliance distribution complete with Web UI . Because it's FreeBSD based, support for ZFS is included.  It's also designed to run from a USB stick in order to free up space for another drive which is a great idea.&lt;br /&gt;&lt;br /&gt;Migrating to FreeNAS was a breeze once I learned to trust the Web UI. I still had to manually chown and chmod everything from a shell. Chown fixed the ownership for sharing everything properly in the FreeNas way. Chmod was required to fix an ACL problem with the filesystem caused my the OS X port. I also elected to upgrade to version 15 of ZFS which took all of two seconds (literally). It's possible I could have easily accomplished all this in the FreeNAS UI but old habits die hard.&lt;br /&gt;&lt;br /&gt;Setuping up sharing was as easy as following the directions in the documentation. In short, create user, add user to group, configure the volume to be owned by that group with appropriate perms, create share, start/restart CIFS service. All in all it took about an hour!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's an update to the caveat's section from first post:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(255, 255, 255); "&gt;- you don't really need to know how to use a command line to get up and running with FreeNAS unless you're migrating coming from OS X ZFS&lt;br /&gt;-esata does improve performance, at least it seems to though I've done no rigorous tests&lt;br /&gt;-reboot the system, everything will come back online&lt;pool&gt;&lt;br /&gt;- the green drive problem doesn't seem to be an issue anymore&lt;/pool&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-7888881347786946188?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/7888881347786946188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=7888881347786946188' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/7888881347786946188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/7888881347786946188'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2011/10/opensource-drobo-replacement-update.html' title='OpenSource Drobo replacement - Update'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-8821917595421872570</id><published>2011-10-17T16:04:00.000-07:00</published><updated>2011-10-20T13:58:00.689-07:00</updated><title type='text'>Mobile HTML5/JavaScript Apps Part II</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Challenges Throttling Adoption&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In my previous article I outlined 10 reasons why the HTML5/JavaScript platform was the future of mobile app development. Adopting  HTML5/JavaScript as a mobile development platform isn’t without it’s challenges however. In this article I outline the problems that are throttling the adoption of this platform.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The App Store Model&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Presently there is no standard format for bundling HTML5/JavaScript apps for inclusion into app stores. This is disadvantageous for a number of reasons. Foremost, app stores help your customer’s find your app. They provide a platform integrated place where people can rank and recommend your app. It can help you grow your business.&lt;br /&gt;&lt;br /&gt;Secondly, an app store also provides an integrated payment processing solution, often through cell phone billing.  Sure they all take their cut and you could go the ad-supported route instead. But having a choice of models is one advantage the native app developers have. The seamless experience of well designed apps store is important.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Offline Support&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Your customer’s expect to keep working when they enter the subway or fly on airplane. Native applications are bundled in to discrete packages and so capability typically comes for free. Traditional web applications host application logic remotely. As such, logic is transferred across the internet each time the app gets started or it even worse it remains on the server entirely.&lt;br /&gt;&lt;br /&gt;In either case your customer is at the mercy of their mobile network which is bad for two reasons. The first is that the user experience will probably be slow or unusable, at least occasionally. The second is this architectural model causes a lot more data to be transferred. Mobile bandwidth isn’t cheap now that carriers are moving to plans with quotas.&lt;br /&gt;&lt;br /&gt;HTML5 does provide a offline web app solution in the form of offline manifests. Anyone who’s ever tried to use it knows how rough around the edges it still is. Eventually they’ll smooth out those edges, but the in the meantime it’s painful to use.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The Solutions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In my next post I’ll describe the new technologies that are emerging to solve these problems. A perfect storm is converging to make HTML5/JavaScript the dominant platform for mobile applications. The future is bright and open source software is leading the way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-8821917595421872570?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/8821917595421872570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=8821917595421872570' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/8821917595421872570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/8821917595421872570'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2011/10/mobile-html5javascript-apps-part-ii.html' title='Mobile HTML5/JavaScript Apps Part II'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-5612789648056754365</id><published>2011-10-17T16:01:00.000-07:00</published><updated>2011-10-17T16:04:23.632-07:00</updated><title type='text'>Mobile HTML5/JavaScript Apps Part I</title><content type='html'>I'm convinced that HTML5+JavaScript is the future of mobile development. That’s not to say there aren’t challenges throttling the adoption of this technology in the mobile space. But suffice it to say we feel the advantages of JavaScript are so compelling that critical mass has been achieved. &lt;br /&gt;&lt;br /&gt;In my next article I’ll highlight the challenges facing mobile HTML5/JavaScript adoption. But first, here are the top 10 reasons why I believes HTML5+JavaScript is the future of mobile app development:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;1) iOS (Apple)&lt;br /&gt;&lt;br /&gt;2) Android ( Google )&lt;br /&gt;&lt;br /&gt;3) BlackBerryOS ( RIM )&lt;br /&gt;&lt;br /&gt;4) Windows Phone 7 ( Microsoft )&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;5) WebOS ( HP formerly Palm )&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The first three mobile platforms each have close to a third of the market share. Yet their ‘native’ application platforms are all different. All of these devices have modern HTML5 browsers.&lt;br /&gt;&lt;br /&gt;As a Mobile App Developer, you want to target as many different platforms and customers as you possibly can. At the same time, your app needs to look GOOD and it needs to be consistent across platforms. Finding the talent to target all these native platforms would be expensive.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;6) JavaScript Is The Most Widely Available Development Platform, Ever.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are over 2,000,000,000 internet users in the world now. Each uses a web browser, and that browser runs JavaScript. Eventually HTML5/JavaScript will work on every phone, laptop and desktop in the world.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;7) You Can Still Sell HTML5/JavaScript Apps Through Regular App Stores&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Great things are happening at fellow Canadian startup Nitobi. They’ve created an open source HTML5 app platform that allows you to author native applications with web technologies and get access to APIs and app stores. With PhoneGap it’s possible to write your application in HTML5/JavaScript, package it in a native wrapper, then distribute it through traditional app store channels.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;8) JavaScript Is F A S T, Fast.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Google, Apple, Microsoft and Mozilla are all throwing cash and talent at making JavaScript faster. Techniques like JIT Compilation and Inline Caching are raising the bar on JavaScript performance.  JavaScript is already fast and it will only get faster.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;9) There Are *A Lot* Of JavaScript Developers Out There And The Number Is Growing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Chances are if you do Web development in PHP, Ruby, Python, Perl, Java etc, you’ve also implemented client side  logic in JavaScript. That is, almost every web developer out there has at least dabbled in JavaScript. As the Web as a platform continues to gain traction, so does JavaScript. There’s a large pool of  talent waiting to code in this language.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;10) Windows 8&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Even Microsoft is committed to supporting HTML/JavaScript as a core development technology. In a recent press release they describe Windows 8 as a re-imagining of the operating system. Here’s the part that stands out:&lt;br /&gt;&lt;br /&gt;“Windows 8 apps use the power of HTML5, tapping into the native capabilities of Windows using standard JavaScript and HTML to deliver new kinds of experiences. These new Windows 8 apps are full-screen and touch-optimized, and they easily integrate with the capabilities of the new Windows user interface.”&lt;br /&gt;&lt;br /&gt;No where in the press release do they mention .NET or Silverlight, technologies that Microsoft developed which compete directly with HTML5. So it seems that Microsoft is acknowledging that HTML5/JavaScript is platform to back if they’re going to retain developer mind-share.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-5612789648056754365?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/5612789648056754365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=5612789648056754365' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/5612789648056754365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/5612789648056754365'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2011/10/mobile-html5javascript-apps-part-i.html' title='Mobile HTML5/JavaScript Apps Part I'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-1344694648778329676</id><published>2011-10-17T15:58:00.000-07:00</published><updated>2011-10-17T16:00:30.740-07:00</updated><title type='text'>A Fragmented Future United By Web Technologies</title><content type='html'>This post is in reponse to Peter Bright’s &lt;a href="http://arstechnica.com/microsoft/news/2011/06/html5-centric-windows-8-leaves-microsoft-developers-horrified.ars"&gt;article&lt;/a&gt; on arstechnica. &lt;br /&gt;&lt;br /&gt;Microsoft shocked many of it’s developer community when at D9 it announced HTML5/JavaScript would form the basis of Window’s 8 developer platform. Peter argues that saying nothing about the future of these technologies can only hurt Microsoft. However, I’m not sure Microsoft has much to lose and quite a bit to gain by spinning it this way. Here’s why.&lt;br /&gt;&lt;br /&gt;Microsoft may rule the desktop now, but the future is mobile and they know it. Windows Phone 7 may be great and it’s apps may be excellent but they’re playing some serious catch up to iOS, Android and even Blackberry. Remember, Microsoft makes more off Android royalties than it does on Windows Phone 7. So while it’s true that Microsoft risks alienating their developer community, at present course that community will become smaller and more marginalized as time goes on anyways. &lt;br /&gt;&lt;br /&gt;The truth is that if Microsoft wants be more than niche player in the mobile/tablet market, it needs to embrace HTML5. It’s just to far behind to expect to act as if it were Apple and try to force a proprietary platform. You can look towards the Financial Times launch of an HTML5 ‘iPhone’ app as model for the future here. Developing multiple high quality native applications is expensive and becoming increasingly unneccessary. &lt;br /&gt;&lt;br /&gt;Now microsoft hasn’t said they won’t support their traditional platforms. No, far from it. Chances are there’ll be support for Silverlight as well. So while windows developers might be afraid right now, they’ve invested too much hold a serious grudge. Once Microsoft finally placates their fears they’ll suck it up and leverage the skills they’ve invested so much in. &lt;br /&gt;&lt;br /&gt;By focusing the spotlight on their ‘choice’ of the only truly open cross-device app platform, Microsoft can been seen to be taking Windows in a bold new direction. Perhaps even buying themselves some creditability from the much larger web development community, many of whom still hold a grudge over IE 6. Microsoft has much to gain by spinning this decision as a bold and re-invention rather than reactionary concession. If that means temporarily upsetting their development community. They’ll get over it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-1344694648778329676?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/1344694648778329676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=1344694648778329676' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/1344694648778329676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/1344694648778329676'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2011/10/fragmented-future-united-by-web.html' title='A Fragmented Future United By Web Technologies'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-1484256486510614876</id><published>2011-03-16T05:10:00.000-07:00</published><updated>2011-04-04T12:48:34.723-07:00</updated><title type='text'>Is JavaScript Faster Than C?</title><content type='html'>There's been a lot great work happening in the VM performance space over the last few years. The problems of performance are beginning to be well understood as even dynamic languages begin to challenge the incumbents. This article reviews a project which aims to bring more empirical testing to the language/runtime performance debate. Rather than argue about the theorectical, we let the code speak for itself. You may be suprised by what it says.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Stop!&lt;/h3&gt;&lt;br /&gt;The author of this article is well aware of its provocative nature. This is just one test and readers should take care when extrapolating these results to dissimilar use cases. The C code provided by the project being reviewed follows an Object Oriented style. It is certainly possible to optimize the C code further, for instance by using a more procedural style with less memory allocation. But then a similar approach should be used by the other versions (languages) presented as well. I whole heartedly encourge you to submit pull requests with these new versions in separate directories based on the style/technique used.&lt;br /&gt;&lt;br /&gt;My intention is to challenge readers to question their assumptions regarding language/runtime performance. I also hope to highlight the fact that server side JavaScript has become a viable platform choice when performance is a consideration. That said, this is one test and I can only encourage more work in this area. If you're interested in such things, check out &lt;a href="http://shootout.alioth.debian.org/"&gt;The Computer Language Benchmarks Game&lt;/a&gt;. Let's discuss results rather than argue fanatically about predictions.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;The Problem&lt;/h3&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-A9X5R6EM9-U/TYCqFxmv0LI/AAAAAAAAAjU/fjasNsDkNl4/s1600/15-peg.jpg"&gt;&lt;img style="float:none; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 264px; height: 207px;" src="http://1.bp.blogspot.com/-A9X5R6EM9-U/TYCqFxmv0LI/AAAAAAAAAjU/fjasNsDkNl4/s320/15-peg.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5584650554131337394" /&gt;&lt;/a&gt;&lt;br /&gt;Solving 137846 games of the 15-Hole Peg Soltaire by calculating every possible move using an Object Oriented style. Solutions are provided in C, C#, Java, JavaScript, PHP, Python and Ruby (more submissions encouraged!). Most of the code was written by &lt;a href="http://jonathan.fuerth.ca/"&gt;Jonathan Fuerth&lt;/a&gt; his &lt;a href="https://sites.google.com/site/torontojava/2010-slides-and-notes-1/2010-02-21slides-javaperformance.pdf?attredirects=0&amp;d=1"&gt;presentation&lt;/a&gt; on Java/HotSpot performance. I've updated the JavaScript so that it uses prototypical method inheritance. You can find my 'fork' on github.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;The Code&lt;/h3&gt;&lt;br /&gt;&lt;pre&gt;    git clone git://github.com/gflarity/peg-performance.git&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Pre-requisites&lt;/h3&gt;&lt;br /&gt;This was all developed and tested under OS X however there shouldn't be any platform dependencies. You'll need a number of things for the test itself. I've put the version I'm using in brackets: gcc (4.2.1), Mono (2.10.1), Java (1.6.0_24), node.js (0.4.2), PHP (5.3.3), Python (2.7.1), Ruby (1.8.7).&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Run the tests!&lt;/h3&gt;&lt;br /&gt;Note this will take a few minutes as some platforms are definitely faster than others.&lt;br /&gt;&lt;pre&gt;    cd src/main&lt;br /&gt;    make test&lt;/pre&gt; &lt;br /&gt;For each of the languages the test is run 10 times. I throw out the best and worst result then compute an average. A chart is created to show the results.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Results&lt;/h3&gt;&lt;br /&gt;Results can be viewed by opening .reports/report.html.&lt;br /&gt;&lt;br /&gt;Here is the graph produced by this test on my MacBook Air:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-g-9_2XIBs1g/TYCqnpZupQI/AAAAAAAAAjc/yTPr65YEfGA/s1600/results.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 233px;" src="http://3.bp.blogspot.com/-g-9_2XIBs1g/TYCqnpZupQI/AAAAAAAAAjc/yTPr65YEfGA/s320/results.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5584651136044803330" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;h3&gt;Analysis&lt;/h3&gt;&lt;br /&gt;Here's what I find interesting about these results:&lt;br /&gt;&lt;br /&gt;0) The JavaScript implementation is even faster if you load the browser version in Chrome 10. It clocks in around 2300ms on my mba.&lt;br /&gt;&lt;br /&gt;1) HotSpot Java is F.A.S.T., FAST. I'd really like to see a C++ version for comparison in this test. But given the ecosystem out there and the fact that it's automatically cross platform, I'd have hard time justifying the use of C++ for many things these days... Well, maybe a kickass JavaScript engine ;)&lt;br /&gt;&lt;br /&gt;2) I'd also like to see the results of this test if this problem was solved in a non object oriented style. That said, there are distinct advantages to using OOP.&lt;br /&gt;&lt;br /&gt;3) Much respect to the Mono project. While I'm sure Microsoft's .NET runtime approaches the HotSpot VM in terms of performance, Mono is hanging in there.&lt;br /&gt;&lt;br /&gt;4)  JavaScript is a dynamically typed language. We must consider this when comparing its performance vs a statically typed Java. While some might argue that static typing is 'safer', performance is its only virtue in my opinion. (Edit: Static typing also helps IDEs with code complete and other useful features, this is also a virtue :) Typically I trade reduced performance for increased development efficiency every time I choose Perl, Python or Ruby. So despite its quirks, it appears that JavaScript can offer the best of both worlds in terms of performance and development efficiency. Not bad for the language that's in every browser and hence is the most widely deployed language/runtime in the world.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-1484256486510614876?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/1484256486510614876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=1484256486510614876' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/1484256486510614876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/1484256486510614876'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2011/03/is-javascript-is-faster-than-c.html' title='Is JavaScript Faster Than C?'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-A9X5R6EM9-U/TYCqFxmv0LI/AAAAAAAAAjU/fjasNsDkNl4/s72-c/15-peg.jpg' height='72' width='72'/><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-6217658518318834666</id><published>2011-02-26T12:41:00.000-08:00</published><updated>2011-02-26T12:54:39.374-08:00</updated><title type='text'>Understanding Inheritance In JavaScript</title><content type='html'>In this article I will present the JavaScript inerhitence model in a concise, and I hope, easy to understand manner. The intended audience consists of developers with some previous experience with dynamically typed languages. It is my opinion that any difficulty associated with understanding the JavaScript inheritance model can be attributed to the difficulty teaching recursive definitions in general. It's sometimes hard to know where to start, when your definition is circular. &lt;br /&gt;&lt;br /&gt;That said, let's boil JavaScript inheritance down into 5 key points in the following order:&lt;br /&gt;&lt;br /&gt;1) In JavaScript, everything is an 'object' and all variables simply hold references to them. The other 'primitive' or basic types (of objects) are functions, booleans, strings, numbers and arrays. &lt;br /&gt;&lt;br /&gt;2) Objects are collections of properties keyed by a reference. Most often, references to string objects are used as keys as they are immutable. This means that if foo and bar reference string types which contain the same data they are in fact the same object. This essentially makes Objects equivalent to hashes or dictionaries in other languages. &lt;br /&gt;&lt;br /&gt;3) In JavaScript functions are special objects. Not only can they be called or applied, they have a special 'prototype' property which holds an object that can be accessed and modified. When a function is used as a constructor with the 'new' key word, the resulting object that is created will *dynamically* inherit from the object referenced by the constructor function's 'prototype' property. &lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;pre&gt;  Constructor = function() { };&lt;br /&gt;  Constructor.prototype.name = 'alpha';&lt;br /&gt;  Constructor.prototype.say_name = function() { console.log("my name is: " + this.name) };&lt;br /&gt;  object = new Constructor();&lt;br /&gt;  object.say_name();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;4) Upon initial definition, the prototype property of every new function can be thought of like this:&lt;br /&gt;&lt;pre&gt;  func = function() {}&lt;br /&gt;  func.prototype = { 'constructor': func };&lt;/pre&gt;&lt;br /&gt;That is, the value referenced by func.prototype is an object contains a reference to func itself. This recursive definition is a bit eye-crossing but actually very beautiful in that way that only recursion can be.&lt;br /&gt;&lt;br /&gt;5) Here's where the recursive definitions start to get difficult to visualize. In JavaScript, every object (including functions) dynamically inherit from the special 'Object.prototype' object. In other words, 'Object' is THE constructor function of ALL objects in the JavaScript universe. The corollary being that Object.prototype.constructor == Object. &lt;br /&gt;&lt;br /&gt;Try it:&lt;br /&gt;&lt;pre&gt;  &amp;gt; Object.prototype.constructor == Object&lt;br /&gt;  true&lt;/pre&gt;&lt;H2&gt;Implications&lt;/H2&gt;&lt;br /&gt;These 4 points form the foundation of inheritance in JavaScript. Let's make use what we've learned:&lt;H3&gt;Corollary 1:&lt;/H3&gt;&lt;br /&gt;Object types, or 'classes' can be (and generally are) referred to by their contructor function. Examples: Object, Function, String, Boolean, Array etc. &lt;H3&gt;Corollary 2:&lt;/H3&gt;&lt;br /&gt;If you want to add a method to every object in the javascript universe (even after it is constructed!), mess with Object.prototype. &lt;br /&gt;Example:&lt;br /&gt;&gt; Object.prototype.foo = 'bar'&lt;br /&gt;&gt; func = function() {}&lt;br /&gt;&gt; func.foo&lt;br /&gt;"bar"&lt;br /&gt;&gt; Object.prototype.foo = 'baz'&lt;br /&gt;&gt; func.foo&lt;br /&gt;"baz"&lt;H3&gt;Corollary 3:&lt;/H3&gt;&lt;br /&gt;There's no such thing as multiple inheritance in JavaScript. That is class 'Foo' can not inherit from both 'String' and 'Array' directly. Though, you can use some clever tricks to hack multiple  inheritance into the language. For examples, see &lt;a href ="http://www.amirharel.com/2010/06/11/implementing-multiple-inheritance-in-javascript"&gt;http://www.amirharel.com/2010/06/11/implementing-multiple-inheritance-in-javascript&lt;/a&gt; and &lt;a href="http://code.google.com/p/joose-js/"&gt;http://code.google.com/p/joose-js/&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-6217658518318834666?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/6217658518318834666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=6217658518318834666' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/6217658518318834666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/6217658518318834666'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2011/02/understanding-inheritance-in-javascript.html' title='Understanding Inheritance In JavaScript'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-7703208139252389639</id><published>2011-02-26T06:47:00.000-08:00</published><updated>2011-02-26T08:40:03.481-08:00</updated><title type='text'>Ubunt+Node+cluster on Amazon EC2 Quickstart</title><content type='html'>&lt;H2&gt;Just Show Me The Scripts&lt;/H2&gt;&lt;br /&gt;If you're just looking for a script to setup nodejs under ubuntu quickly, check out this &lt;a href='https://github.com/gflarity/ec2-nodejs-setup'&gt;set of scripts&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;H2&gt;Walk Through&lt;/H2&gt;&lt;br /&gt;First you'll need to Signup for AWS/EC2 and generate a key pair. Google it, there should be plenty of tutorials. &lt;br /&gt;&lt;br /&gt;Next, create an instance using the AWS Management Console and log into it using your key pair.  You can find the AMI's &lt;a href="https://help.ubuntu.com/community/EC2StartersGuide"&gt;here&lt;/a&gt;. I picked a 32bit 10.04 LTS AMI in US-East.&lt;br /&gt;&lt;br /&gt;Install node's perquisites (or those that aren't the default ubuntu LTS ami):&lt;br /&gt;&lt;pre&gt;  sudo apt-get update&lt;br /&gt;  sudo apt-get -y install build-essential libssl-dev&lt;/pre&gt;&lt;br /&gt;Now let's create a nodejs system user:&lt;br /&gt;&lt;pre&gt;  sudo adduser --home /home/nodejs --shell /bin/bash --disabled-password --disabled-login --system nodejs&lt;/pre&gt;&lt;br /&gt;Now login as that user:&lt;br /&gt;&lt;pre&gt;  sudo su nodejs&lt;/pre&gt;&lt;br /&gt;For the heavy lifting we use the excllent 'nvm' from creationix&lt;br /&gt;&lt;pre&gt;  git clone git://github.com/creationix/nvm.git ~/.nvm&lt;br /&gt;  . ~/.nvm/nvm.sh&lt;/pre&gt;&lt;br /&gt;Install nodejs:&lt;br /&gt;&lt;pre&gt;  nvm sync&lt;br /&gt;  time nvm install latest &lt;br /&gt;  nvm use latest&lt;/pre&gt;&lt;br /&gt;Setup the nodejs user's enviroment to have that latest nodejs in it's path&lt;br /&gt;&lt;pre&gt;  echo -e -n "\n. ~/.nvm/nvm.sh\n" &gt;&gt; ~/.bashrc&lt;br /&gt;  echo -e -n "\nnvm use latest\n" &gt;&gt; ~/.bashrc&lt;/pre&gt;&lt;br /&gt;Setup npm, this makes life much easier:&lt;br /&gt;&lt;pre&gt;  mkdir ~/git&lt;br /&gt;  cd ~/git&lt;br /&gt;  git clone https://github.com/isaacs/npm.git&lt;br /&gt;  cd npm/&lt;br /&gt;  make install&lt;/pre&gt;&lt;br /&gt;&lt;H2&gt;Taking Full Advantage Multiple Cores/CPUs&lt;/H2&gt;&lt;br /&gt;Assuming you want to take full advantage ec2's multiple cores then install 'cluster' - https://github.com/LearnBoost/cluster&lt;br /&gt;&lt;pre&gt;  npm install cluster&lt;/pre&gt;&lt;br /&gt;Setup hello world example:&lt;br /&gt;&lt;pre&gt;   mkdir ~/git/sandbox&lt;br /&gt;  cd ~/git/sandbox&lt;/pre&gt;&lt;br /&gt;Edit cluster.js to contain cluster example:&lt;br /&gt;&lt;pre&gt;      var cluster = require('cluster')&lt;br /&gt;        , http = require('http');&lt;br /&gt;&lt;br /&gt;      var server = http.createServer(function(req, res){&lt;br /&gt;        console.log('%s %s', req.method, req.url);&lt;br /&gt;        var body = 'Hello World';&lt;br /&gt;        res.writeHead(200, { 'Content-Length': body.length });&lt;br /&gt;        res.end(body);&lt;br /&gt;      });&lt;br /&gt;&lt;br /&gt;      cluster(server)&lt;br /&gt;        .use(cluster.logger('logs'))&lt;br /&gt;        .use(cluster.stats())&lt;br /&gt;        .use(cluster.pidfiles('pids'))&lt;br /&gt;        .use(cluster.cli())&lt;br /&gt;        .use(cluster.repl(8888))&lt;br /&gt;        .listen(3000);&lt;/pre&gt;&lt;br /&gt;Test it! &lt;br /&gt;&lt;pre&gt;  node cluster.js&lt;/pre&gt;&lt;br /&gt;Using the domain you ssh'd into earlier, browse to http://&lt;domain&gt;:3000, you should see hello world.&lt;br /&gt;&lt;br /&gt;From the EC2 instance, login into the cluster admin interface:&lt;br /&gt;&lt;pre&gt;  telnet 0 8888&lt;br /&gt;  Type help()&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-7703208139252389639?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/7703208139252389639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=7703208139252389639' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/7703208139252389639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/7703208139252389639'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2011/02/nodecluster-on-amazon-ec2-quickstart.html' title='Ubunt+Node+cluster on Amazon EC2 Quickstart'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-7931532797446202718</id><published>2011-02-12T06:49:00.000-08:00</published><updated>2011-02-14T17:21:38.001-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JavaScript'/><category scheme='http://www.blogger.com/atom/ns#' term='Socket.IO'/><category scheme='http://www.blogger.com/atom/ns#' term='DTrace'/><category scheme='http://www.blogger.com/atom/ns#' term='Node'/><title type='text'>Realtime Performance Visualizations using Node.js</title><content type='html'>&lt;h3&gt;Preamble&lt;/h3&gt;&lt;br /&gt;This article outlines how to create a realtime heatmap of your syscall latency using HTML5, some great node modules, and DTrace. It was inspired by talk that Bryan Cantrill and Brendan Greg gave on Joyent's cool cloud analytics tools. While specific, the code provided could easily be adapted to provide a heatmap of any type of aggregation Dtrace is capable of providing.&lt;br /&gt;&lt;br /&gt;&lt;H3&gt;System Requirements&lt;/H3&gt;&lt;br /&gt;&lt;br /&gt;First thing's first, you're going to need a system with DTrace. This likely means Solaris (or one of its decedents), OS X, or a BSD variant.  There doesn't appear to be Dtrace available for Linux.&lt;br /&gt;&lt;br /&gt;&lt;H3&gt; Security &lt;/H3&gt;&lt;br /&gt;Secondly, please be aware that at the time of writing the demo code contains a fairly substantial secruity vulnerabilty. Namely the d script is sent from the client with no authentication what so ever. If you bind to localhost this shouldn't be a big deal for a demo. Time permitting I intend to clean up the code.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Dependencies&lt;/h3&gt;&lt;br /&gt;For this tutorial you'll also need:&lt;br /&gt;&lt;br /&gt;node - http://nodejs.org/#download (duh)&lt;br /&gt;npm - https://github.com/isaacs/npm (makes installing modules a breeze)&lt;br /&gt;node-libdtrace - https://github.com/bcantrill/node-libdtrace (provides dtrace functionality)&lt;br /&gt;Socket.IO - 'npm install socket.io' (websockets made easy)&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Server&lt;/h3&gt;&lt;br /&gt;Now we're ready to start writing our web server:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/gflarity/Heat-Tracer/blob/master/heat_tracer.js"&gt;heat_tracer.js&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Client&lt;/h3&gt;&lt;br /&gt;In order to display our heatmap, we're going to need some basic HTML with a canvas element:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/gflarity/Heat-Tracer/blob/master/public/heat_tracer.html"&gt;heat_tracer.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Finally the JavaScript client which translates the raw  streaming data into pretty picture:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://github.com/gflarity/Heat-Tracer/blob/master/public/heat_tracer_client.js"&gt;heat_tracer_client.js&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Run It!&lt;/h3&gt;&lt;br /&gt;Run Heat Tacer with the following. Note, sudo is required by dtrace as it does kernal magic.&lt;br /&gt;&lt;br /&gt;sudo node heat_tracer.js&lt;br /&gt;&lt;br /&gt;If all goes well you should see a moving version of something like the image below.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;img src="http://3.bp.blogspot.com/-gNo6WJACj_s/TVaoIvVMVJI/AAAAAAAAAi0/pe5IlA7U43k/s320/heat_tracer.png"  id="BLOGGER_PHOTO_ID_5572826457015342226" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt; Contribute &lt;/h3&gt;&lt;br /&gt;You can find the latest version of Heat Tracer &lt;a href="https://github.com/gflarity/Heat-Tracer"&gt;here&lt;/a&gt;. It is my hope that this article will provide the ground work for a much more abitious performance analytics project. If you're interested in contributing please let me know.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt; Further Research &lt;/h3&gt;&lt;br /&gt;More information about Bryan and Brendan's demo can be found &lt;a href="http://dtrace.org/blogs/brendan/2011/01/24/cloud-analytics-first-video/"&gt;here&lt;/a&gt;&lt;br /&gt;Socket.IO can be found &lt;a href="http://socket.io/"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-7931532797446202718?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/7931532797446202718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=7931532797446202718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/7931532797446202718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/7931532797446202718'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2011/02/realtime-performance-visualizations.html' title='Realtime Performance Visualizations using Node.js'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-gNo6WJACj_s/TVaoIvVMVJI/AAAAAAAAAi0/pe5IlA7U43k/s72-c/heat_tracer.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-7042577332824525281</id><published>2010-11-21T17:36:00.000-08:00</published><updated>2011-02-12T06:48:35.999-08:00</updated><title type='text'>JavaScript  is the future... wait wha?</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span" &gt;1) JavaScript engines have become ridiculously fast thanks to corporate investment from the likes of Apple, Google,  Mozilla etc.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;2) There are a lot of JavaScript developers out there, the number is growing.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;3) Browser based JavaScript is the most widely available programming platform, ever.&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;3) JavaScript development is non-blocking (event driven), and closure intensive (Ruby and Perl fans rejoice).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;4) Node.js uses Chrome's V8 to make non-blocking event based service development easy and performant. The community momentum is truly astounding. &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-7042577332824525281?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/7042577332824525281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=7042577332824525281' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/7042577332824525281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/7042577332824525281'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2010/11/javascript-is-future-wait-wha.html' title='JavaScript  is the future... wait wha?'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-870202148189523589</id><published>2010-07-30T07:09:00.000-07:00</published><updated>2010-11-21T17:30:11.870-08:00</updated><title type='text'>Telus FAIL</title><content type='html'>&lt;div&gt;Update: Somewhere around the middle of November the Telus HTC Hero was updated to Android 2.1. The battery life has decreased but at least they released it before Android 2.3 is out. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I love the Android platform for a whole host of reasons, including the fact that it's so open. I accept that this sort of openness can lead ( has ) to fragmentation. This fragmentation means that when the core operating system is updated, it will inevitably take longer for the version specific to my phone, the Telus HTC Hero, to be released.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I've been waiting for months to receive the Android 2.1 (Eclair) release for my Telus HTC Hero.  At this time, I still haven't received it.  It was ported to the HTC Hero months ago, but has yet to be released for Telus. Meanwhile, Android development has moved forward and Android 2.2 (Froyo) has been released. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The HTC Hero will never see Froyo, and this pisses me off. But not as much as the fact that I've entered into a 3 year contract for a phone that has yet to receive a single software update. If you're going to lock user's in, you have a responsibility to keep the software on the phone reasonably updated. I understand hardware requirements might preclude certain releases, but that's the only excuse. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In any event, I've learned my lesson, my next phone will be an official dev phone, as I always want to run the latest and greatest. In the meantime I'm going to be rooting my phone and installing a third party rom. Here's the info:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://b2basiks.com/?p=701"&gt;http://b2basiks.com/?p=701&lt;/a&gt;&lt;div&gt;&lt;a href="http://forum.xda-developers.com/showthread.php?t=581981"&gt;http://forum.xda-developers.com/showthread.php?t=581981&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.villainrom.co.uk/viewforum.php?f=95"&gt;http://www.villainrom.co.uk/viewforum.php?f=95&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-870202148189523589?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/870202148189523589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=870202148189523589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/870202148189523589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/870202148189523589'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2010/07/telus-fail.html' title='Telus FAIL'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-8601072355681902533</id><published>2010-06-13T08:46:00.000-07:00</published><updated>2010-06-13T16:42:41.682-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='App Engine'/><category scheme='http://www.blogger.com/atom/ns#' term='Groovy'/><category scheme='http://www.blogger.com/atom/ns#' term='Grails'/><title type='text'>Grails &amp; App Engine is just not there yet</title><content type='html'>Just a quick follow up to my &lt;a href="http://onlinevillage.blogspot.com/2010/05/while-html-5-holds-tremendous-promise.html"&gt;previous post&lt;/a&gt;; I've unsuccessfully tried to get the 'Hello, World' application running on App Engine. The java script pop-up never works and I run into timeout's far too frequently once deployed. There also doesn't seem to be much in the way of support for this combination yet.&lt;div&gt;&lt;br /&gt;&lt;div&gt;For those interested, there was a brief mention of the problem during a &lt;a href="http://code.google.com/events/io/2010/sessions/fireside-chat-app-engine.html"&gt;fireside chat &lt;/a&gt; at Google IO. &lt;a href="https://wave.google.com/wave/#restored:wave:googlewave.com!w%252B9PNCdLZkBuX"&gt;Here&lt;/a&gt;'s the wave which summarizes the Q/A. If you haven't yet, I highly recommend the &lt;a href="http://code.google.com/events/io/2010/sessions.html"&gt;Google IO videos&lt;/a&gt;. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-8601072355681902533?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/8601072355681902533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=8601072355681902533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/8601072355681902533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/8601072355681902533'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2010/06/grails-app-engine-is-just-not-there-yet.html' title='Grails &amp; App Engine is just not there yet'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-3528761969060474974</id><published>2010-05-30T08:40:00.000-07:00</published><updated>2010-06-01T16:09:57.430-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='Groovy'/><title type='text'>Groovy, Grails and GWT (G3WT) Tutorial</title><content type='html'>While HTML 5 holds tremendous promise, my days of fiddling with CSS are over. Fortunately GWT offers an alternative to the traditional Web Application paradigm; by cross compiling Java into Javascript you only need one language for both your server and your client. Back to the future.&lt;div&gt;&lt;br /&gt;&lt;div&gt;Being a big believer in rapid prototyping, I'd much prefer having a Groovy -&gt; Javascript compiler. Unfortunately Groovy isn't supported in the Client side GWT code since it's the .java files themselves that get cross compiled , not the bytecode.  Still, it &lt;i&gt;is&lt;/i&gt; possible to use Groovy ( Grails ) on the server side. using Grails and the GWT plugin.  This provides the utility of Grails helper/scaffolding scripts and if you know Groovy it may save you time. Groovy's close coupling with Java also means that we need to not depart to far from the GWT paradigm either.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In order to learn Grails/GWT I decided to create a 'Hello World' application which uses RPC. Here's the step by step instructions I used to make it for those who are curious:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;First make sure Groovy, Grails, and GWT are installed. Then we can create our Grails app:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&gt;grails create-app g3wt&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now let's install the gwt plugin:&lt;/div&gt;&lt;div&gt;&gt;cd g3wt&lt;/div&gt;&lt;div&gt;&gt;grails install-plugin gwt&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create a GWT to provide the server side logic:&lt;/div&gt;&lt;div&gt;&gt;&lt;b&gt;grails create-gwt-module g3wt.Application&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create the client facing page which exposes the module we just created:&lt;/div&gt;&lt;div&gt;&gt;&lt;b&gt;grails create-gwt-page main/index.gsp g3wt.Application&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It will (may?) prompt to ask if you want to create the main controller. Choose y for yes.&lt;br /&gt;&lt;br /&gt;Now, lets git rid of the default grails page in favour of our new gwt page. You can do so by editing  &lt;b&gt;grails-app/conf/UrlMappings.groovy&lt;/b&gt;. Change  &lt;b&gt;"/"(view:"/index")&lt;/b&gt; to  &lt;b&gt;"/"(view:"/main/index")&lt;/b&gt; so that it picks up our newly created gwt page.&lt;br /&gt;&lt;br /&gt;Now you're ready to try it.  From a terminal the following to start up your development web server:&lt;br /&gt;&gt;&lt;b&gt;grails run-app&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now start up GWT's "Development Mode" tool by running the following in another terminal:&lt;br /&gt;&gt;&lt;b&gt;grails run-gwt-client&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Click on the &lt;span style="font-weight: bold;"&gt;launch default browser&lt;/span&gt; button. Your new GWT should open and establish a connection with the Development Mode tool. At this point there's not really much here, so let's add a hello world rpc service.&lt;br /&gt;&lt;br /&gt;First we create our Grails service:&lt;br /&gt;&gt; &lt;b&gt;grails create-service Data&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Edit the file &lt;span style="font-weight: bold;"&gt;grails-app/services/g3wt/DataService.groovy&lt;/span&gt;. Remove the empty serviceMethod method. Then add the following below "static transactional = true":&lt;br /&gt;&lt;pre class="brush:groovy"&gt;&lt;br /&gt;static expose = [ 'gwt:g3wt.client' ]&lt;/pre&gt;This line tells the grails helper script where to put the Java interfaces for the RPC calls.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Next replace serviceMethod with:&lt;br /&gt;&lt;pre class="brush:groovy"&gt;&lt;br /&gt;String helloWorld() {&lt;br /&gt;return "Hello, World!"&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then we create  the required normal and asynchronous interfaces under the  &lt;code&gt;src/java&lt;/code&gt;  directory:&lt;br /&gt;&gt;&lt;b&gt;grails generate-gwt-rpc&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;That's it for the server side. Now we edit the client scaffolding that was generated for us in &lt;/div&gt;&lt;div&gt;&lt;b&gt;src/gwt/g3wt/client/Application.java&lt;/b&gt;. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Add the following import statements:&lt;/div&gt;&lt;br /&gt;&lt;pre class="brush:groovy"&gt;&lt;br /&gt;import com.google.gwt.core.client.GWT;&lt;br /&gt;import com.google.gwt.user.client.rpc.ServiceDefTarget;&lt;br /&gt;import com.google.gwt.user.client.rpc.AsyncCallback;&lt;br /&gt;import com.google.gwt.user.client.Window;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;Place the following in the &lt;b&gt;onLoad&lt;/b&gt; method:&lt;/div&gt;&lt;div&gt;&lt;pre class="brush:groovy"&gt;&lt;br /&gt;DataServiceAsync myService = (DataServiceAsync) GWT.create(DataService.class);&lt;br /&gt;&lt;br /&gt;ServiceDefTarget endpoint = (ServiceDefTarget) myService;&lt;br /&gt;&lt;br /&gt;// Note the URL where the RPC service is located!                                                                   &lt;br /&gt;String moduleRelativeURL = GWT.getModuleBaseURL() + "rpc";&lt;br /&gt;endpoint.setServiceEntryPoint(moduleRelativeURL);&lt;br /&gt;&lt;br /&gt;// Call a method on the service!                                                                                    &lt;br /&gt;myService.helloWorld( new AsyncCallback() {&lt;br /&gt;  public void onSuccess(Object result) {&lt;br /&gt;      // It's always safe to downcast to the known return type.                                               &lt;br /&gt;      String resultString = ( String ) result;&lt;br /&gt;      Window.alert( resultString );&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public void onFailure(Throwable caught) {&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;);&lt;br /&gt;&lt;/pre&gt;There's a lot of GWT magic here. My understanding is that the GWT looks at this entire line when it cross compiles and generates the right javascript object for our rpc calls. Then we can perform an rpc call using anonymous call that implements the AsyncCallback interface.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Run it again:&lt;/div&gt;&lt;div&gt;&gt;&lt;b&gt;grails run-app&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Start up GWT's "Development Mode" tool by running the following in another terminal:&lt;br /&gt;&gt;&lt;b&gt;grails run-gwt-client&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;You should see our "Hello, World!" alert box. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the next installment I'm going demonstrate how to run our example under Google App Engine. &lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-3528761969060474974?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/3528761969060474974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=3528761969060474974' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/3528761969060474974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/3528761969060474974'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2010/05/while-html-5-holds-tremendous-promise.html' title='Groovy, Grails and GWT (G3WT) Tutorial'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-6281008243016675514</id><published>2010-05-16T19:06:00.000-07:00</published><updated>2010-05-16T19:14:17.196-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Groovy'/><title type='text'>Groovy++ Sources</title><content type='html'>&lt;div&gt;It seems as though my cynicism was unfounded. You can find the Groovy++ source &lt;a href="http://code.google.com/p/groovypptest/downloads/list"&gt;here&lt;/a&gt;. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My apologies to the author(s?).  In my defence browsing the source tree through google code only yields the demo examples and last I checked the downloads only provided the examples as well. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-6281008243016675514?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/6281008243016675514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=6281008243016675514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/6281008243016675514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/6281008243016675514'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2010/05/groovy-sources.html' title='Groovy++ Sources'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-610318651822551967</id><published>2010-05-15T10:32:00.000-07:00</published><updated>2010-05-16T19:06:25.439-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Groovy'/><title type='text'>Groovy++? Ok, so where's the beef?</title><content type='html'>&lt;div&gt;Update: You can find the sources at http://code.google.com/p/groovypptest/downloads/list&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;If you're a software professional who uses Groovy, you or your colleagues greatest concern about it is likely to be performance.  Groovy++, while having a horrible name, provides a jar which apparently provides some &lt;a href="http://groovy.dzone.com/articles/how-come-groovy-overperform"&gt;mag&lt;/a&gt;-i-c&lt;a href="http://code.google.com/p/groovypptest/wiki/HowDoesItWork"&gt;al&lt;/a&gt; Groovy performance &lt;a href="ttp://stronglytypedblog.blogspot.com/2010/02/groovy-performance-now-were-talkin.html"&gt;gains&lt;/a&gt;.   According to its authors', this new 'Groovy-ness' will be &lt;a href="http://groups.google.com/group/groovyplusplus/browse_thread/thread/c839e7cce4c89bf7?pli=1"&gt;released under the Apache Public License&lt;/a&gt;. Terrific! Wonderful! Hurray! &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So where's the fracking code?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; I can understand a need for control. I can understand the author's desire to turn this into something significant for themselves financially. A man's got to eat. But until the code is open and can be inspected by some experts, I remain skeptical of Groovy++. I am hopeful however that performance improvements can be made given enough manpower and talent. Too bad we all have day jobs ;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-610318651822551967?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/610318651822551967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=610318651822551967' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/610318651822551967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/610318651822551967'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2010/05/groovy-ok-so-wheres-beef.html' title='Groovy++? Ok, so where&apos;s the beef?'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-1363371878134718743</id><published>2010-04-29T18:34:00.000-07:00</published><updated>2010-04-29T20:03:28.522-07:00</updated><title type='text'>Go adds JSON-RPC to core lib</title><content type='html'>Recently I started looking for a small but useful project to serve as a vehicle for learning Go. After mulling on a few ideas I decided to create a &lt;a href="http://en.wikipedia.org/wiki/JSON-RPC"&gt;JSON-RPC&lt;/a&gt; library. I generally appreciate the concept of RESTful webservices, but in my opinion this technology needs a simple common RPC protocol. JSON-RPC is exactly that. I find it particularly useful in  protocols for controlling Daemon's remotely. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Well... I'm glad that I hadn't gotten very far in my implementation; as of  27/04/2010 JSON-RPC &lt;a href="http://blog.golang.org/2010/04/json-rpc-tale-of-interfaces.html"&gt;has been&lt;/a&gt; &lt;a href="http://golang.org/pkg/rpc/jsonrpc/"&gt;included&lt;/a&gt; in the core Go packages. Great minds thing a like I guess... :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-1363371878134718743?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/1363371878134718743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=1363371878134718743' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/1363371878134718743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/1363371878134718743'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2010/04/go-adds-json-rpc-to-core-lib.html' title='Go adds JSON-RPC to core lib'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-689111539510273668</id><published>2010-04-26T19:23:00.000-07:00</published><updated>2010-04-26T20:16:59.899-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Go'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrency'/><title type='text'>Playing with Go Memory Synchronization</title><content type='html'>&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, Arial, sans-serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Go has its own model of process/threads/light-weight processes/coroutines, these are called goroutines. &lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Channel communication is the main method of synchronization between goroutines. There are buffered and unbuffered channels. Both types of channels block on receive. Unbuffered channels block on send, buffered channels block on send once the buffer is full.  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, Arial, sans-serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, Arial, sans-serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;I&lt;/span&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;'ve created some test code based on the sample &lt;/span&gt;&lt;a href="http://golang.org/doc/go_mem.html"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;provided&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt; in the documentation in case someone else want's to play poke black-box-style at the memory model.   Channel 'events' cause memory synchronization to occur. But as the documentation describes you need to be careful with buffered channels, the synchronization occurs during receive not send. If you play around with it a bit you'll see the importance of using &lt;/span&gt;&lt;/span&gt;&lt;a href="http://golang.org/doc/go_mem.html"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;Locks&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;, although you'd probably want to rely on the flexibility, safety and abstraction offered by Channels.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, Arial, sans-serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, Arial, sans-serif;"&gt;&lt;span class="Apple-style-span"  style="font-size:medium;"&gt;&lt;a href="http://github.com/gflarity/GoMemoryModelTest"&gt;Enjoy&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="  ;font-family:Helvetica, Arial, sans-serif;font-size:9.02778px;"&gt;&lt;span class="Apple-style-span"  style=" ;font-size:9.02778px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-689111539510273668?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/689111539510273668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=689111539510273668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/689111539510273668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/689111539510273668'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2010/04/playing-with-go-memory-synchronization.html' title='Playing with Go Memory Synchronization'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-4014329917253845611</id><published>2010-04-03T18:40:00.000-07:00</published><updated>2010-04-07T16:43:37.424-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Go'/><title type='text'>Go Go Gadget-Concurrency</title><content type='html'>Premature optimization may be the root of all evil, but timely optimization is often required. When optimization becomes necessary, coding in Groovy can make refactoring in Java painless.  However, Java is a less than ideal "systems programming" language for a number reasons,  the least not being that it wasn't designed to be such. Yet if you've ever spent significant time using a dynamically typed language such as Groovy or even a statically typed yet garbaged collected like Java, you'll find having to go back to C, or C++ to be onerous to say the least. .&lt;br /&gt;&lt;br /&gt;Enter Go. Taken from the Go &lt;a href="http://golang.org/doc/go_lang_faq.html"&gt;Language Design FAQ&lt;/a&gt;:&lt;br /&gt;"Go is an attempt to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. It also aims to be modern, with support for networked and multicore computing. Finally, it is intended to be fast: it should take at most a few seconds to build a large executable on a single computer. "&lt;br /&gt;&lt;br /&gt;This sounds almost too good to be true, mainly because it's been a long time coming. There hasn't been much inovation- at least that which has received popular traction- in the systems programming space since C/C++. Indeed, Go looks much like C itself with some of the syntax reversed. Digging a little deeper there are number of features that a programmer used to dynamic typing would consider must have. Namely maps, foreach-like loops and minimizing the type declcaration necessary for variable instantiation.&lt;br /&gt;&lt;br /&gt;At the same time, Go offers some impressive concurrency features: light-weight 'threads' or goroutines, segmented stacks and channels as first class objects. Go multiplexes independently executing functions. When a function blocks, such as by calling a blocking system call, the run-time automatically moves other coroutines on the same operating system thread to a different, runnable thread so they won't be blocked.  Combined these features make high performance concurrent applications conceptually simple. &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you haven't already, take a &lt;a href="http://www.youtube.com/watch?v=rKnDgT73v8s"&gt;look&lt;/a&gt; at &lt;a href="http://golang.org/"&gt;Go&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-4014329917253845611?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/4014329917253845611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=4014329917253845611' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/4014329917253845611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/4014329917253845611'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2010/04/go-go-gadget-concurrency.html' title='Go Go Gadget-Concurrency'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-4335394822271857000</id><published>2009-12-25T17:12:00.000-08:00</published><updated>2009-12-25T17:16:36.900-08:00</updated><title type='text'>Transcoding Videos Using VLC</title><content type='html'>I found this &lt;a href="http://tom.zickel.org/vlcmp4/"&gt;great how-to for using VLC to converter/shrink/transcode videos&lt;/a&gt;. This is so you can shrink them to play on your ipod, iphone, Android device, whatever. &lt;br /&gt;&lt;br /&gt;Its a bit slow as I think it actually plays the file normally as it saves the output file. Regardless, It was simple and I got it working on my Mac although the preferences menu entry is in a different spot (under the VLC menu entry ).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-4335394822271857000?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/4335394822271857000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=4335394822271857000' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/4335394822271857000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/4335394822271857000'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/12/transcoding-videos-using-vlc.html' title='Transcoding Videos Using VLC'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-5440751002830603523</id><published>2009-12-22T14:49:00.000-08:00</published><updated>2009-12-23T15:38:53.875-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Groovy'/><title type='text'>Easy Hex SHA-1/MD5 Hashes with Groovy</title><content type='html'>The Java API has included support for a number of cryptographic hash functions ( MD5, SHA-1, etc) since Java 1.4 via the java.security.MessageDigest class. If you ever tried to use these in a web-centric context you've probably been a bit annoyed by the fact that it only provides hash results as byte arrays.  Here's a quick and easy solution using Groovy that I thought I'd share:&lt;br /&gt;&lt;br /&gt;&lt;pre class='brush:groovy'&gt;&lt;br /&gt;def messageDigest = MessageDigest.getInstance("SHA1")&lt;br /&gt;messageDigest.update( stringToHash.getBytes() );&lt;br /&gt;def sha1Hex = new BigInteger(1, messageDigest.digest()).toString(16).padLeft( 40, '0' )&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Notice the padding of zeros since the length of the SHA-1 hex needs to be 40 characters. If you're using a different hashing hex string length will change.&lt;br /&gt;&lt;br /&gt;Note: Code updated to reflect an improvement submitted in the comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-5440751002830603523?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/5440751002830603523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=5440751002830603523' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/5440751002830603523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/5440751002830603523'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/12/easy-hex-sha-1md5-hashes-with-groovy.html' title='Easy Hex SHA-1/MD5 Hashes with Groovy'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-5370183648113334338</id><published>2009-12-16T19:51:00.000-08:00</published><updated>2009-12-16T21:09:38.778-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Grape'/><category scheme='http://www.blogger.com/atom/ns#' term='Perl'/><category scheme='http://www.blogger.com/atom/ns#' term='CPAN'/><category scheme='http://www.blogger.com/atom/ns#' term='Groovy'/><title type='text'>Production Groovy Part I: The trouble with Grape</title><content type='html'>Like Perl, Groovy's utility is most evident while &lt;a href="http://groovy.codehaus.org/Grape"&gt;leveraging&lt;/a&gt; the &lt;a href="http://repo1.maven.org/maven2/"&gt;work of others&lt;/a&gt;. In Groovy 1.7, Grape makes doing so intuitive with the addition of annotations on import statements:&lt;br /&gt;&lt;br /&gt;&lt;pre class='brush:groovy'&gt;&lt;br /&gt;&lt;br /&gt;@Grab( group = 'com.sun.jersey', module='jersey-core', version = '1.1.2-ea' )&lt;br /&gt;import com.sun.jersey.api.core.DefaultResourceConfig&lt;br /&gt;@Grab( group = 'com.sun.jersey', module='jersey-server', version = '1.1.2-ea' )&lt;br /&gt;import com.sun.jersey.api.container.httpserver.HttpServerFactory&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The trouble with Grape is that by default it resolves dependencies by contacting or attempting to contact certain Maven2 repositories. Now, this isn't a problem if you're a web startup looking to bring a product to market as quickly and cheaply as possible. But it is a problem if you're looking to start deploying Groovy to a secure production environment. Fortunately, Groovy's close coupling with Java provides a clean and elegant solution. &lt;br /&gt;&lt;br /&gt;The key is that Maven2 remote repository caching and local repository hosting has been made easy by &lt;a href="http://www.jfrog.org/products.php"&gt;Artifactory&lt;/a&gt;. It can be configured to dynamically dial out and cache artifacts on demand from remote repositories. It can also more simply be used to manually manage artifact deployment. Thus provinding both flexibility and control. &lt;br /&gt;&lt;br /&gt;In order to take advantage of Artifactory you'll want to modify the default Grape/Ivy configuration so it points to your internal Artifactory repository by default. The bad news is that you'll need to modify the an xml file and rebuild the the jar. The good news is that the groovy source itself uses Ivy so modifying the xml and building Groovy is really easy.  &lt;br /&gt;&lt;br /&gt;Simply download the latest &lt;a href="http://groovy.codehaus.org/Download"&gt;Groovy source zip&lt;/a&gt;. Then modify '/src/main/groovy/grape/defaultGrapeConfig.xml'. You can then build yourselve a new zip distribution by running 'ant createJars -DskipTests=true'. &lt;br /&gt;Skipping the tests is optional, of course. &lt;br /&gt;&lt;br /&gt;Thats it. Once you explore Artifactory a bit you'll discover that it can provide as little or as much control of the artifacts available to Grape as you desire.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-5370183648113334338?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/5370183648113334338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=5370183648113334338' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/5370183648113334338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/5370183648113334338'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/12/production-groovy-part-i-trouble-with.html' title='Production Groovy Part I: The trouble with Grape'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-2025434394213959551</id><published>2009-12-11T06:45:00.001-08:00</published><updated>2009-12-11T06:50:31.769-08:00</updated><title type='text'>Fido iPhone Roaming Fraud</title><content type='html'>Here's an interesting post which underscores why Canadians need more wireless broadband competition. Click on the lick to read about how &lt;a href="http://k4t3.org/2009/12/09/why-data-roaming-will-cost-you-way-too-much-even-when-you-dont-use-it/"&gt;Fido's data roaming screws over a customer&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-2025434394213959551?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/2025434394213959551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=2025434394213959551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/2025434394213959551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/2025434394213959551'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/12/fido-iphone-roaming-fraud.html' title='Fido iPhone Roaming Fraud'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-5428519764889149468</id><published>2009-12-02T18:19:00.001-08:00</published><updated>2009-12-02T19:01:44.432-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serialization'/><category scheme='http://www.blogger.com/atom/ns#' term='Groovy'/><title type='text'>Groovy Serialization - Part 2 - Objects</title><content type='html'>In my previous post I discussed the &lt;a href="http://onlinevillage.blogspot.com/2009/12/groovy-serialization.html"&gt;serialization of simple Groovy data structures&lt;/a&gt;. Arbitrary objects can also be serialized using ConfigObject and ConfigSluper and a little trickery. The fact Groovy config files may also contain code makes this all possible. &lt;br /&gt;&lt;br /&gt;In order to instantiate objects inside a Groovy config file, you need import the referenced objects. You also need to override the toString to create the proper instantiation string.&lt;br /&gt;&lt;br /&gt;&lt;pre class='brush:groovy'&gt;&lt;br /&gt;package MyPackage&lt;br /&gt;class MyObject {&lt;br /&gt;   def data;&lt;br /&gt;   String toString() {&lt;br /&gt;          def serializedString = "new MyObject( data : '${data}' )"&lt;br /&gt;          return serializedString&lt;br /&gt;   }   &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//create the datastructure&lt;br /&gt;def myObject = new MyObject( data: 'wtf')&lt;br /&gt;def configObj = new ConfigObject()&lt;br /&gt;configObj.testing = [1, 2, 3]&lt;br /&gt;configObj.nested = [ objects : myObject ]&lt;br /&gt;&lt;br /&gt;//serialize it&lt;br /&gt;new File( 'newout.groovy' ).withWriter{ writer -&gt;&lt;br /&gt;  writer.write( "import ${myObject.getClass().getName()}\n" )&lt;br /&gt;  configObj.writeTo( writer )&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Parsing it is simple:&lt;br /&gt;&lt;pre class="brush:groovy"&gt;&lt;br /&gt;def config = new ConfigSlurper().parse(new File('newout.groovy').toURL())&lt;br /&gt;println config&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Finally one could use .metaClass to override the toString of any Java object and make it work with this serialization technique. Be careful not to shoot yourself in the foot by doing this, as other code might expect the regular toString().&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-5428519764889149468?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/5428519764889149468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=5428519764889149468' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/5428519764889149468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/5428519764889149468'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/12/groovy-serialization-part-2-objects.html' title='Groovy Serialization - Part 2 - Objects'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-8251335367126847634</id><published>2009-12-01T17:55:00.000-08:00</published><updated>2009-12-02T17:21:19.428-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Serialization'/><category scheme='http://www.blogger.com/atom/ns#' term='Groovy'/><title type='text'>Groovy Serialization</title><content type='html'>Groovy's lists and maps provide the simple building blocks of more complex structures. Occasionally you want to serialize these complex structures to files/streams/whatever. Previously I wrote about &lt;a href="http://onlinevillage.blogspot.com/2009/11/groovy-json-using-json-lib-with-groovy.html"&gt;using JSON with Groovy&lt;/a&gt;. While this is still my weapon of choice for this problem, another alternative would be to use the ConfigObject and the ConfigSlurper classes from the &lt;a href="http://groovy.codehaus.org/gapi/"&gt;Groovy API&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here's how you would serialize the data using this method:&lt;br /&gt;&lt;pre class="brush:groovy"&gt;&lt;br /&gt;//create the datastructure&lt;br /&gt;def configObj = new ConfigObject()&lt;br /&gt;configObj.testing = [1, 2, 3]&lt;br /&gt;configObj.nested = [ objects : 'wtf' ]&lt;br /&gt;&lt;br /&gt;//serialize it&lt;br /&gt;new File( 'newout.groovy' ).withWriter{ writer -&gt;&lt;br /&gt;  configObj.writeTo( writer )&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then when you want to parse it:&lt;br /&gt;&lt;pre class="brush:groovy"&gt;&lt;br /&gt;def config = new ConfigSlurper().parse(new File('newout.groovy').toURL())&lt;br /&gt;println config&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;One disadvantage of this method is that the highest level structure must be a map, since that's what ConfigObject inherits from. The data also contains a lot of white-space formatting. Which could be a good or bad depending on the problem you're solving.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-8251335367126847634?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/8251335367126847634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=8251335367126847634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/8251335367126847634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/8251335367126847634'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/12/groovy-serialization.html' title='Groovy Serialization'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-5626030803927005964</id><published>2009-11-27T19:34:00.000-08:00</published><updated>2009-11-27T19:48:34.711-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Groovy'/><title type='text'>Groovy 1.7-RC1 Released / Groovy 1.7 Before Christmas</title><content type='html'>Groovy 1.7 RC1 has just been released and the final &lt;a href="http://docs.codehaus.org/display/GROOVY/2009/11/27/Groovy+1.6.6+and+1.7-RC-1+released"&gt;Groovy 1.7 is to be released by Christmas&lt;/a&gt;. By far my favourite new feature is the ability to add annotations on import statements. This allows you to put your @Grape() calls at the import statement that actually loads the packages grabbed which is where it should be IMHO.&lt;br /&gt;&lt;br /&gt;While I'm still wrestling with the correct model for packaging 'grapes' in a production environment, as a veteran Perl coder I think grape will take Groovy to another level; It finally makes the Java ecosystem accessible and leveraging other's work easy.  Now we just need a repository and IDE's that are grape aware :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-5626030803927005964?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/5626030803927005964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=5626030803927005964' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/5626030803927005964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/5626030803927005964'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/11/groovy-17-rc1-released-groovy-17-before.html' title='Groovy 1.7-RC1 Released / Groovy 1.7 Before Christmas'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-3834796624449277178</id><published>2009-11-20T21:38:00.000-08:00</published><updated>2009-11-20T21:41:28.392-08:00</updated><title type='text'>SQLite vs Derby / Derby SQLite Comparison</title><content type='html'>I stumbled upon this wonderful &lt;a href="http://www.sqlite.org/cvstrac/wiki?p=SqliteVersusDerby"&gt;comparison of Derby and SQLite&lt;/a&gt;. It even contains some details on SQLite's concurrency model that I had been looking for.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-3834796624449277178?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/3834796624449277178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=3834796624449277178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/3834796624449277178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/3834796624449277178'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/11/sqlite-vs-derby-derby-sqlite-comparison.html' title='SQLite vs Derby / Derby SQLite Comparison'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-8501230186337913583</id><published>2009-11-17T16:25:00.000-08:00</published><updated>2009-12-02T17:25:31.857-08:00</updated><title type='text'>Groovy JSON / Using json-lib with Groovy / Using json_simple with Groovy</title><content type='html'>After a bit of research I've concluded there are two clear options for using JSON with groovy.&lt;br /&gt;&lt;br /&gt;1) Using json-lib . Note the annotation is Groovy 1.7 syntax and it rocks.&lt;br /&gt;&lt;pre class="brush:groovy"&gt;&lt;br /&gt;import net.sf.json.groovy.*&lt;br /&gt;@Grab(group='net.sf.json-lib', module='json-lib', version='2.3', classifier='jdk15')&lt;br /&gt;&lt;br /&gt;def books = builder.books {&lt;br /&gt;book(title: "Groovy in Action", author: "Dierk Koenig")&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;assert books.toString() == '''{"books":{&lt;br /&gt;"book":{"title":"Groovy in Action","author":"Dierk Koenig"}}}'''&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;2) Using the json_simple library .&lt;br /&gt;&lt;pre class="brush:groovy"&gt;&lt;br /&gt;import org.json.simple.JSONValue;&lt;br /&gt;def response = [ : ];&lt;br /&gt;&lt;br /&gt;response.error = [ message : "Not authorized" ];&lt;br /&gt;def jsonString = JSONValue.toJSONString( response );&lt;br /&gt;def deserializedResponse = JSONValue.parse( jsonString );&lt;br /&gt;&lt;/pre&gt;I prefer 2) but to be honest I haven't looked into Builders much. There's a simple analogy between Groovy datastructures and JSON. Why complicate it any further?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-8501230186337913583?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/8501230186337913583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=8501230186337913583' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/8501230186337913583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/8501230186337913583'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/11/groovy-json-using-json-lib-with-groovy.html' title='Groovy JSON / Using json-lib with Groovy / Using json_simple with Groovy'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-8930169411977946865</id><published>2009-11-05T17:12:00.000-08:00</published><updated>2009-11-05T17:17:38.764-08:00</updated><title type='text'>The Groovy Cookbook</title><content type='html'>I just stumbled upon an incredible resource that I wish I knew about sooner. &lt;a href="http://pleac.sourceforge.net/"&gt;PLEAC&lt;/a&gt;, short for Progamming Language Example Alike Cookbook provides the solutions to the problems contained in the respected Perl Cookbook using OTHER langues, including Groovy. This is a terrific idea and if my favourite two languages weren't already complete I'd be eager to contribute.&lt;br /&gt;&lt;br /&gt;Here's the Groovy table of Cotents. Learn how to deal with:&lt;br /&gt;&lt;blockquote&gt;&lt;dl&gt;&lt;dt&gt;1. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/strings.html"&gt;Strings&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;2. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/numbers.html"&gt;Numbers&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;3. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/datesandtimes.html"&gt;Dates and Times&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;4. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/arrays.html"&gt;Arrays&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;5. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/hashes.html"&gt;Hashes&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;6. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/patternmatching.html"&gt;Pattern Matching&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;7. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/fileaccess.html"&gt;File Access&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;8. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/filecontents.html"&gt;File Contents&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;9. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/directories.html"&gt;Directories&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;10. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/subroutines.html"&gt;Subroutines&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;11. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/referencesandrecords.html"&gt;References and Records&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;12. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/packagesetc.html"&gt;Packages, Libraries, and Modules&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;13. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/classesetc.html"&gt;Classes, Objects, and Ties&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;14. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/dbaccess.html"&gt;Database Access&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;15. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/userinterfaces.html"&gt;User Interfaces&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;16. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/processmanagementetc.html"&gt;Process Management and Communication&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;17. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/sockets.html"&gt;Sockets&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;18. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/internetservices.html"&gt;Internet Services&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;19. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/cgiprogramming.html"&gt;CGI Programming&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;dt&gt;20. &lt;a href="http://pleac.sourceforge.net/pleac_groovy/webautomation.html"&gt;Web Automation&lt;/a&gt; (100.0%)&lt;/dt&gt;&lt;/dl&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-8930169411977946865?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/8930169411977946865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=8930169411977946865' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/8930169411977946865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/8930169411977946865'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/11/groovy-cookbook.html' title='The Groovy Cookbook'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-8428486142973545112</id><published>2009-11-03T16:50:00.001-08:00</published><updated>2009-12-02T17:26:34.217-08:00</updated><title type='text'>JAX-RS, Jersey and Groovy</title><content type='html'>Groovy makes writing multi-threaded daemon a snap. While searching for a way to control such daemon simply, a co-worker suggested I use  &lt;a href="https://jsr311.dev.java.net/"&gt;JAX-RS&lt;/a&gt;. More specifically, he recommended &lt;a href="https://jersey.dev.java.net/"&gt;Jersey&lt;/a&gt;, sun's reference implementation of JAX-RS or JSR 311.&lt;br /&gt;&lt;br /&gt;Jersey made it extremely easy to implement a RESTful web service inside my Groovy based daemon in order to control it while running.  Groovy's dynamic class loading nature did case some issues with the resource file. In the end it was easy to overcome though.To get up an running quickly follow the &lt;a href="https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.0.3/jersey/getting-started.html"&gt;getting started guide&lt;/a&gt;. You can create a groovy class which uses the Resource Class annotations they show. Then inside your main application you can spawn the webservice like so:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush:groovy"&gt;&lt;br /&gt;def resourceConfig = new DefaultResourceConfig( JSONRPCService.class  )&lt;br /&gt;HttpServer myServer = HttpServerFactory.create("http://localhost:9090/", resourceConfig );&lt;br /&gt;myServer.start();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Notice that we have to create resource config object and pass it to the HttpServerFactory. Thats the key, since under groovy the server factory can not seem to find the resource on its own.&lt;br /&gt;&lt;br /&gt;That's it. Next post I will how how to create an JSON-RPC interface using Jersey and JSON-lib.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-8428486142973545112?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/8428486142973545112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=8428486142973545112' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/8428486142973545112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/8428486142973545112'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/11/jax-rs-jersey-and-groovy.html' title='JAX-RS, Jersey and Groovy'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-5890045017605474354</id><published>2009-10-23T10:37:00.001-07:00</published><updated>2009-11-03T17:15:48.387-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Grape'/><category scheme='http://www.blogger.com/atom/ns#' term='Cli'/><category scheme='http://www.blogger.com/atom/ns#' term='CPAN'/><category scheme='http://www.blogger.com/atom/ns#' term='Groovy'/><title type='text'>Groovy CLI Parameters Made Easy</title><content type='html'>After getting thoroughly frustrated with the CliBuilder ( groovy.util.CliBuilder ), for its lack of documentation and unintuitive usage,  I stumbled upon &lt;a href="http://code.google.com/p/groovy-option-parser/"&gt;GOP&lt;/a&gt; (&lt;a href="http://code.google.com/p/groovy-option-parser/"&gt;groovy-option-parser&lt;/a&gt;). Its almost exactly what I was looking for.GOP makes processing Groovy command line parameters (args) easy. Checkout the synopsis on its project page.&lt;br /&gt;&lt;br /&gt;On a side note, Groovy really needs a CPAN.org equivalent. It has a fanastic runtime dependency loading/resolving system in &lt;a href="http://groovy.codehaus.org/Grape"&gt;Grape&lt;/a&gt;. It just need a single home/community for people to share modules just like this one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-5890045017605474354?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/5890045017605474354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=5890045017605474354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/5890045017605474354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/5890045017605474354'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/10/groovy-cli-parameters-made-easy.html' title='Groovy CLI Parameters Made Easy'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-2002993582432542484</id><published>2009-10-21T17:39:00.000-07:00</published><updated>2009-10-21T21:02:10.286-07:00</updated><title type='text'>The quest for a dark Netbeans theme</title><content type='html'>Little things in Eclipse have been bugging me enough that I've given up the utility of support from colleagues in favour of advantages of using the Netbeans IDE. The last straw was the difficulty of using a dark colour theme.&lt;br /&gt;&lt;br /&gt;Being a long time emacs user I was quite shocked by the lack of dark colour support in both Eclipse and Netbeans. Netbeans clearly has better support for this in the form of text editor colour themes. But what about all the other boxes and dialogues?&lt;br /&gt;&lt;br /&gt;During your search for the allusive dark colour theme you'll notice that its the php and ruby people who've done the work to make these IDEs asthetically (and erogomically) pleasing. Some times I wonder about Java people...&lt;br /&gt;&lt;br /&gt;I finally managed to get a decent dark themed setup for Netbeans working though:&lt;br /&gt;&lt;br /&gt;1) Install the "Extra Ruby Color Themes" plugin via the Plugins-&gt;Available Plugins menu.&lt;br /&gt;2) Goto Options-&gt;Fonts &amp;amp; Colors and pick the Aloha Theme.&lt;br /&gt;3) Follow the instructions here &lt;a href="http://www.mediabits.dk/php/netbeans-the-dark-side/"&gt;http://www.mediabits.dk/php/netbeans-the-dark-side/&lt;/a&gt;. I think this actually alters things at the java/swing level and works fairly well.&lt;br /&gt;&lt;br /&gt;Edit: I'm pleased to say that Netbeans 6.7+ looks terrific on OS X with Aloha. Its not as dark as I'd like but the bright white is gone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-2002993582432542484?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/2002993582432542484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=2002993582432542484' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/2002993582432542484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/2002993582432542484'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/10/quest-for-dark-netbeans-theme.html' title='The quest for a dark Netbeans theme'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-3582494893096601687</id><published>2009-09-10T17:57:00.000-07:00</published><updated>2009-11-01T18:54:23.870-08:00</updated><title type='text'>OpenSource Drobo replacement on Mac OS X (Snow Leopard)</title><content type='html'>Recently I lost a 320 USB hard drive. What was on it can eventually be replaced, but I've decided that its time to take my personal storage more seriously. I briefly considered getting  a drobo.  A friend has one and I'm fairly impressed with its abilities.  The thing that bothers me the most about it is that its a completely closed system. I'm a bit of a open source evangelist, but I don't consider myself a zealot. However, If there's one part of a computer system that should be free and open, its the code the manages data storage.  I can't compromise on this, fsck closed formats.&lt;br /&gt;&lt;br /&gt;After a bit of research I settled on using a 4 drive JBOB usb enclosure in a zfs raidz pool. My server is a Mac a circa 2007 Mac Mini running Snow Leopard. The ZFS support is provided by &lt;a href="http://zfs.macosforge.org/"&gt;this project&lt;/a&gt;. The project still needs some polish but I'm pleased to say it was easy to get my raidz array up and running. The performance is acceptable, I'm sure it would improve if I could use eSATA instead of USB. It's supported by my enclosure but not my mini sadly.&lt;br /&gt;&lt;br /&gt;If you're looking to do something similar with zfs here are a few tips, gotchas &amp;amp; advice:&lt;br /&gt;&lt;br /&gt;-if you're afraid of using the shell you should probably get a drobo, I'd say my setup was about as easy as formating and mounting any other file system under *nix. Just different and cooler&lt;br /&gt;-esata should improve performance considerably, its already good enough as a media center drive IMHO.&lt;br /&gt;- use raidz with whole drives, I achieved 2/3+ usable space with 4 drives, if one fails the system will continue to work until it can be replaced.&lt;br /&gt;-whenever my mini reboots the drives do not automount and I get 4 nasty messages about not being able to initialize those 4 drives. I hit ignore and then in the shell I type 'zpool import -f &lt;pool&gt;'. I'll setup some init scripts for this eventually.&lt;br /&gt;-watch out for the fact that the disk drive names may change since its usb&lt;br /&gt;-watch out for 'GREEN' drives, mine power themselves down frequently and I've had to write a script to prevent this from happening.&lt;br /&gt;&lt;/pool&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-3582494893096601687?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/3582494893096601687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=3582494893096601687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/3582494893096601687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/3582494893096601687'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/09/opensource-drobo-replacement-on-mac-os.html' title='OpenSource Drobo replacement on Mac OS X (Snow Leopard)'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-4601216499301879728</id><published>2009-04-07T18:30:00.000-07:00</published><updated>2009-04-07T18:40:36.713-07:00</updated><title type='text'>RIP: A Remix Manifesto</title><content type='html'>I highly recommend you check out &lt;a href="http://www.opensourcecinema.org/book/rip-remix-manifesto-1-meet-girl-talk"&gt;RIP: A Remix Manifesto&lt;/a&gt;. In particular, there's a segment in which a former member of the Clinton Administration discusses policy regarding globalization and Intellectual Property. The policy was that that the US would  open its markets to global competition, particularly manufactured good, in exchange for agreements on Intellectual Property. He discussed the motivation and vision in contrast to the current reality. Fascinating.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-4601216499301879728?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/4601216499301879728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=4601216499301879728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/4601216499301879728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/4601216499301879728'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2009/04/rip-remix-manifesto.html' title='RIP: A Remix Manifesto'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-7985964558734667580</id><published>2008-10-11T18:03:00.000-07:00</published><updated>2008-10-11T18:34:12.908-07:00</updated><title type='text'>A TED A Day Keeps The Blues Away</title><content type='html'>If you haven't visited &lt;a href="http://www.ted.com/"&gt;TED&lt;/a&gt; yet, then go do it now. TED is yet another example of how the internet is starting to realize its potential as the most powerful educational technology to date. If you're like me, you've had some great lectures  but a lot more average and poor ones. &lt;br /&gt;&lt;br /&gt;TED allows us to imagine a world where every student can attend the seminars offered by the world's greatest lecturers. It allows us to imagine regular teachers in the class rooms focused on providing personal interaction and one on one tutoring. Of course, its hard to envision what the future of education is. But its clearly time to start dreaming and working towards those dreams.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-7985964558734667580?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/7985964558734667580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=7985964558734667580' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/7985964558734667580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/7985964558734667580'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2008/10/ted-day-keeps-blues-away.html' title='A TED A Day Keeps The Blues Away'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-4368569299295766556</id><published>2008-10-11T12:23:00.000-07:00</published><updated>2008-10-11T18:02:43.579-07:00</updated><title type='text'>The End Of Free-Market Fundamentalism</title><content type='html'>The focus of this blog is relationship between technology and politics, culture, and education. However, it is difficult not to comment on the incredible paradigm shifts that we are bearing witness to right now. One of the biggest and most under discussed is the end of Free-Market Fundamentalism. It ended when the government began bailing out Fanny Mae and Freddy Mac, AIG,  and now the passage of the TARP proposal of $700 Billion for Wallstreet. The American government might even start buying equity stakes in Banks.&lt;br /&gt;&lt;br /&gt;When considered as whole there has never been a bigger act of socialism in American history. Tax payer money is being applied to the problem as if were a defibrillator. Will be paid back? How much health care could have been paid for with this money? While those greedy individuals responsible ever be held accountable?&lt;br /&gt;&lt;br /&gt;Here's a &lt;a href="http://therealnews.com/t/index.php?option=com_content&amp;amp;task=view&amp;amp;id=31&amp;amp;Itemid=74&amp;amp;jumival=2415"&gt;great video&lt;/a&gt; that highlights talks by economists on the end of Free-Market Fundamentalism.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-4368569299295766556?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/4368569299295766556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=4368569299295766556' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/4368569299295766556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/4368569299295766556'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2008/10/end-of-free-market-fundamentalism.html' title='The End Of Free-Market Fundamentalism'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-6858092067084287516</id><published>2008-09-18T19:07:00.000-07:00</published><updated>2008-10-11T13:02:12.539-07:00</updated><title type='text'>Open Courseware: The Future Of Education</title><content type='html'>Standford University has released the &lt;a href="http://see.stanford.edu/default.aspx"&gt;Courseware&lt;/a&gt;, including lecture videos, for some of its computer science courses under the &lt;a href="http://creativecommons.org/licenses/by/3.0/us/"&gt;Creative Commons Attribution 3.0 license&lt;/a&gt;.  MIT has undertaken a similar &lt;a href="http://ocw.mit.edu/OcwWeb/Mathematics/18-03Spring-2006/CourseHome/index.htm"&gt;intiative&lt;/a&gt;, release materials under a similar &lt;a href="http://creativecommons.org/licenses/by-nc-sa/3.0/us/"&gt;license&lt;/a&gt;. Standford has fewer courses, they all appear to have videos from each lectures.&lt;br /&gt;&lt;br /&gt;This is an amazing development. But then, when considered, the reasons &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; to post educational materials, such as video lectures, seem selfish. Educator time is best spent answering questions, rather than lecturing. Some Lecturers are also fortunate enough to be in a class of their own, and everyone should benefit from their gift.&lt;br /&gt;&lt;br /&gt;On the whole, Information technology is starting aspire to its true potential and this should be celebrated. Corporations have been realizing this potential for some time, but now there is also a particularly remarkable transformation in the public space right now.  The revolution in education is just getting started, but it will be humanity's greatest accomplishment to date.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-6858092067084287516?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/6858092067084287516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=6858092067084287516' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/6858092067084287516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/6858092067084287516'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2008/09/open-courseware-future-of-education.html' title='Open Courseware: The Future Of Education'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-7541716356902173712</id><published>2008-09-13T13:58:00.000-07:00</published><updated>2008-09-18T19:37:06.706-07:00</updated><title type='text'>Adversity Inspires Innovation</title><content type='html'>I just listened to a fascinating interview with Simon Phipps on &lt;a href="http://twit.tv/FLOSS"&gt;FLOSS weekly&lt;/a&gt;. He's the top open source advocate working at Sun Microsystems. You can check out the interview &lt;a href="http://twit.tv/floss39"&gt;here&lt;/a&gt;.  He covers a lot of ground in about hour, including how adversity inspires innovation, the future of open source software, and why sun created Java in the first place. He describes how, in terms of a technology company, creating free software moves the value farther down the chain and how it is still possible to profit greatly from that value.&lt;br /&gt;&lt;br /&gt;I've always wondered why sun created Java. There never seemed to be much of a profitability model around it, at least as far as I could see. But Simon explained that the creation of Java was motivated by the fear of an Intel hardware monoculture. Which makes perfect sense, its bad for everyone, especially another chip maker like Sun. Its also pretty clear how open sourcing Java would only further this goal. Now I'm surprised it didn't happen sooner.&lt;br /&gt;&lt;br /&gt;I wish the interview had been longer. One point that was quickly covered was his view that the creation of the internet was an accomplishment of even greater historical significance than the creation of the first printing press in Gutenberg. It has me thinking about that printing press and  how significant the mass produced written word has been. Fascinating.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-7541716356902173712?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/7541716356902173712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=7541716356902173712' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/7541716356902173712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/7541716356902173712'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2008/09/i-just-listened-to-fascinating.html' title='Adversity Inspires Innovation'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-4828021805855644884</id><published>2008-08-25T20:26:00.000-07:00</published><updated>2009-02-14T15:57:52.376-08:00</updated><title type='text'>Bittorrent For Your Mother</title><content type='html'>While searching for a suitable mirror for a the latest &lt;a href="http://www.insmod.net/"&gt;Insurgency&lt;/a&gt; release, I stumbled upon an innovative service called &lt;a href="http://bitlet.org"&gt;Bitlet&lt;/a&gt;. The service rolls a Bittorrent client and a torrent file into Java Applet. This removes the need to install a standalone Bittorrent client in order to download files.&lt;br /&gt;&lt;br /&gt;To be honest, I'm a little suprised I haven't seen something like this a long time ago. I'm also suprised thatservices like fileplanet are even necessary anymore. But I'm glad that Bitlet is picking up some momentum. For the files I tried, it worked very well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-4828021805855644884?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/4828021805855644884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=4828021805855644884' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/4828021805855644884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/4828021805855644884'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2008/08/bittorrent-for-your-mother.html' title='Bittorrent For Your Mother'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-6049055617012796225</id><published>2008-08-21T19:24:00.000-07:00</published><updated>2008-09-18T19:06:54.856-07:00</updated><title type='text'>Groovy Is Groovy</title><content type='html'>While I appreciate the need for strongly typed languages, I don't find them very enjoyable to program in. I prefer to prototype and refine as needed. With Java in particular this is difficult to do. But its hard to ignore all the rich libraries being written in/for java these days.&lt;br /&gt;&lt;br /&gt;Groovy is an agile and dynamic language for the Java VM. A number of different colleagues have recommended Groovy to me and I've finally sat down and played with it. I'm very impressed to say the least. Besides being able to use java libraries easily from within a Groovy script, you can also &lt;a href="http://groovy.codehaus.org/Compiling+Groovy"&gt;compile Groovy code&lt;/a&gt; into regular java bytecode, or you can &lt;a href="http://groovy.codehaus.org/Embedding+Groovy"&gt;embed groovy&lt;/a&gt; directly into your Java application.&lt;br /&gt;&lt;br /&gt;Personally, I'm looking forward to prototyping using Groovy in some open source projects I've been thinking of. Anything that is too slow can be refactored in Java. Perhaps by someone else ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-6049055617012796225?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/6049055617012796225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=6049055617012796225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/6049055617012796225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/6049055617012796225'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2008/08/groovy-is-groovy.html' title='Groovy Is Groovy'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7369917695391880645.post-2560739286289362337</id><published>2008-08-21T17:16:00.000-07:00</published><updated>2008-08-21T18:01:53.582-07:00</updated><title type='text'>Next-Generation P2P To Change The World</title><content type='html'>Those who have already used P2P file sharing software regularly are probably already aware that technology is moving far faster than the business models of large content providers. While the Viacoms of the world are going after the YouTubes, they're completely unaware that the war has already been decided. Next generation P2P software promises to give websites with budgets of tens of dollars the ability to compete with YouTube, Viacom and every other broadcaster.&lt;br /&gt;&lt;br /&gt;If you want to see the proof, then go visit the SwarmPlayer &lt;a href="http://trial.p2p-next.org/"&gt;trial page&lt;/a&gt;. It is a project of the &lt;a href="http://p2p-next.org/"&gt;P2P-Next consortium&lt;/a&gt;,  which recently &lt;a href="http://www.tribler.org/P2P-Next/19Million-for-P2P"&gt;recieved&lt;/a&gt; €19 million in government/corporate funding. While presently only a research proof of concept, SwarmPlayer supports both live broadcast streaming as well as video on demand.  Once perfected this technology will radically democratize content distrobution.&lt;br /&gt;&lt;br /&gt;If YouTube is giving Viacom a headache, then SwarmPlayer is the red laser dot hovering on its forehead. The trigger  has yet to be pulled.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7369917695391880645-2560739286289362337?l=onlinevillage.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://onlinevillage.blogspot.com/feeds/2560739286289362337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7369917695391880645&amp;postID=2560739286289362337' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/2560739286289362337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7369917695391880645/posts/default/2560739286289362337'/><link rel='alternate' type='text/html' href='http://onlinevillage.blogspot.com/2008/08/next-generation-p2p-to-change-world.html' title='Next-Generation P2P To Change The World'/><author><name>Geoff Flarity</name><uri>http://www.blogger.com/profile/01239564240519036467</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
