<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Über Software &#187; Web2.0</title>
	<atom:link href="http://www.uebersoftware.com/category/web2-0/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.uebersoftware.com</link>
	<description>Opinions and thoughts on Software and Technology.</description>
	<lastBuildDate>Thu, 29 Apr 2010 06:04:30 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>UX and App Design at Google &#8211; Takeaways</title>
		<link>http://www.uebersoftware.com/2010/02/ux-and-app-design-at-google-takeaways/</link>
		<comments>http://www.uebersoftware.com/2010/02/ux-and-app-design-at-google-takeaways/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 13:32:36 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web2.0]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://www.uebersoftware.com/?p=206</guid>
		<description><![CDATA[Yesterday I was at an interesting UX knowledgeshare event where Simon Raess spoke about user experience and application design at Google. Google being an engineering company at heart they arguably only put in the recent years more weight on Ux and Design. Also nowadays Google employs only 200 designers. Being an engineer myself, I expected [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I was at an interesting <a href="http://internet-briefing.ch/index.cfm?page=119770&amp;cfid=39657541&amp;cftoken=82013183">UX knowledgeshare event</a> where <a href="http://www.google.co.uk/search?q=Simon+Raess">Simon Raess</a> spoke about user experience and application design at Google. Google being an engineering company at heart they arguably only put in the recent years more weight on Ux and Design. Also nowadays Google employs only 200 designers. Being an engineer myself, I expected to get some new insights from another perspective.</p>
<p>The talk was built around the first principle of Googles <a href="http://www.lgoogle.com/intl/en/corporate/tenthings.html">corporate philosophy</a> &#8220;Focus on the user and all else will follow&#8221;. Being the first principle it is the most important one, and prioritised in favor of other conflicting aspects when making a product. Among other things, this means that the first thougth when starting with a product is not how to make money but what do users want.</p>
<p>The execution of this philosophy was explained with an outline how the product process works.<br />
<a rel="attachment wp-att-208" href="http://www.uebersoftware.com/2010/02/ux-and-app-design-at-google-takeaways/dad/"><img class="alignnone size-medium wp-image-208" title="Focus on the user" src="http://www.uebersoftware.com/wp-content/uploads/2010/02/dad-300x207.png" alt="Focus on the user" width="300" height="207" /></a></p>
<p>Specifically for UX and design there are 4 interation phases Google follows:</p>
<p>1 Define                 4 Validate<br />
2 Research            3 Design</p>
<p>The first thing is the definition of the product, and gathering of ideas. This comes from various sources, like their 20% time, Market Needs, and others.</p>
<p>After there&#8217;s a clear product idea the research phase starts. Research here does most importantly mean: Going out to the user, talk to the user and get feedback. So very early in the process of creating a product Google already starts to gather feedback for a rough idea. It is important to get feedback from a representative group of users, the type of users that should use the product in the end. Later in the research phase they create abstract personas. Personas are a way to classify typical user groups with their interest, habits, jobs, daily activities, emotions etc.</p>
<p>The next phase is the Design phase, where the actual design happens in the following sequence: Information Architecture, Layout/Workflow, Interaction Model, Visual Design. The design and research phase is lead by a designer and a researcher which are in tight collaboration. The design and research goes over many interations until feedback from users start to get positive.</p>
<p>Only when the feedback from users is positive detail planning starts. Finally the Design is validated by users and Google employees when the product is first internally launched.</p>
<p>Some tools they use to gather user feedback are: eye tracking, Labs, before and after experience questions.</p>
<p>Quite interesting to me was: no single line of code is written until detail design is finished. However engineers are involved during the design process but it was not so clear to what level and for what tasks. For me it would have been interesting to get some more information on the collaboration between engineers and designers in the process. Other than that, great talk!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.uebersoftware.com/2010/02/ux-and-app-design-at-google-takeaways/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nuux &#8211; Launch of Location Aware Mobile Social Network &#8211; with focus on real-time</title>
		<link>http://www.uebersoftware.com/2009/12/nuux-launch-of-location-aware-mobile-social-network-with-focus-on-real-time/</link>
		<comments>http://www.uebersoftware.com/2009/12/nuux-launch-of-location-aware-mobile-social-network-with-focus-on-real-time/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 05:22:39 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Web2.0]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[mobile development]]></category>
		<category><![CDATA[mobile social network]]></category>

		<guid isPermaLink="false">http://www.uebersoftware.com/?p=192</guid>
		<description><![CDATA[Today, a main project of mine, Nuux is opening its doors officially for the public Beta! Nuux is a mobile social network dedicated to real-time social nightlife information. I would like to take the opportunity to let you know some details about this network and how it works. I will try not to make too [...]]]></description>
			<content:encoded><![CDATA[<p>Today, a main project of mine, <a title="Nuux.net" href="http://www.nuux.net">Nuux</a> is opening its doors officially for the public Beta! Nuux is a <strong>mobile</strong> social network dedicated to <strong>real-time social nightlife information</strong>. I would like to take the opportunity to let you know some details about this network and how it works. I will try not to make too much of a plug, but I am biased, since I&#8217;m the main person behind this, so reader beaware! <img src='http://www.uebersoftware.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Ok, so Nuux is about real-time nightlife information. You can checkout live where friends are partying, checkin to locations and events, message your friends for free, see what&#8217;s the hottest venues and generally get insider information about a particular town. To get my motivation behind this project maybe I can explain how it all began:</p>
<p>I was going out with some friends and ended up in a place where we had already paid some cover charge but it was not good at all. How would it be to have some network to check-out what other places and events are like, right now? An app to see where your friends are right now, how they like it, see pics, and recommendations from people just like me?</p>
<p>The idea developed into what has become Nuux right now. Currently you can checkout Nuux as a <a title="Nuux" href="http://www.nuux.net">web platform</a>, a <a title="Nuux Mobile Site" href="http://m.nuux.net">mobile site</a>, and the <a title="Nuux Youtube Site" href="http://www.youtube.com/user/nuuxmobile">mobile application</a>. Nuux is tightly integrated into Facebook (Single Sign On, Friend Connect, Publish, Pictures Sharing etc.).  This means that for example the there is no actual friend building process required you can just use your connections from Facebook if you like, which are sync&#8217;ed on a daily basis.</p>
<p>The Mobile App, which is actually the main part is a 2ME Client available for most of the phones from Nokia, Samsung, SE, LG, Moto (other clients are comming, Blackberry the soonest in about a months time, then iPhone, Android).  The website currently only shows a small part of the functionality which is available in Nuux. For example you can let your friends know of your <a href="http://www.nuux.net/plans/myplans">Weekend Plans</a> by linking directly to a <a href="http://www.nuux.net/venues">venue </a>of your city. Venues can all be filled with user generated content &#8211; ratings, tags, comments, pics, and weekend plans. So you can find out what is going to be a popular venue in a particular city on all those attributes.</p>
<p>In the near future we will also offer an API, to enable fellow developers developing their own applications on the Nuux network. If you would like to be notified for an early access, please contact us on developers@nuux.net.</p>
<p>If you would like to get more info please check out the <a href="http://http://nuux.tumblr.com/">Nuux Blog</a>, or follow Nuux on <a href="http://www.twitter.com/nuuxlive">Twitter </a>. </p>
<p>And yes, please let me know what you think about it either in the comments or on <a href="http://nuux.uservoice.com/">uservoice</a>. </p>
<p>Thanks &#8211; and I promise this will be the first and only plug for Nuux, really!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.uebersoftware.com/2009/12/nuux-launch-of-location-aware-mobile-social-network-with-focus-on-real-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website deployments: Plain old Ant</title>
		<link>http://www.uebersoftware.com/2009/10/website-deployments-plain-old-ant/</link>
		<comments>http://www.uebersoftware.com/2009/10/website-deployments-plain-old-ant/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 20:26:29 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Web2.0]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[webapps]]></category>

		<guid isPermaLink="false">http://www.uebersoftware.com/?p=150</guid>
		<description><![CDATA[In the last entry I was mentioning several solutions for managing web site deployments and packaging for php webapps. Since with PHP there is usually no build process already at development time this has often to be established especially for test &#038; production &#8211; and yes there needs to be a build process if you [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://www.uebersoftware.com/2009/10/initialise-external-javascript-in-page-fragments/">last entry</a> I was mentioning several solutions for managing web site deployments and packaging for php webapps. Since with PHP there is usually no build process already at development time this has often to be established especially for test &#038; production &#8211; and yes there needs to be a build process if you do serious php web development.</p>
<p>Despite Sprocket or similar tools I decided to go for the plain old ANT approach. Why? It was the most practical tool, you have full control of what you are doing and the other tools did not quite what I wanted.</p>
<p>One part of this ant solution was to configure production setting in several source files. I rediscovered just how powerful and really simple this great tool is. Once you get used to is configure,combine,pack and deploy your php/js/html/css is a piece of cake:</p>
<p>Here some excerpts<br />
In order to have just one source file I defined some custom preprocessor variables in my various files:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//@@prod@@ $config['base_dir']=&quot;&quot;;</span>
<span style="color: #666666; font-style: italic;">/*@@dev@@*/</span> <span style="color: #000088;">$config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'base_dir'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Foo/&quot;</span><span style="color: #339933;">;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;!--@@js-dev-start@@ --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;assets/js/jquery.plugin1.js&quot;&gt;&lt;/script&gt;
&lt;script type='text/javascript' src='assets/js/jquery.plugin2.js'&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;assets/js/jquery.plugin3.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;assets/js/jquery.plugin4.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;assets/js/jquery.plugin5.js&quot;&gt;&lt;/script&gt;
&lt;!-- @@js-dev-end@@ --&gt;
&lt;!-- @@js-prod-start@@ &lt;script type=&quot;text/javascript&quot; src=&quot;assets/js/jsbuild.js&quot;&gt;&lt;/script&gt; @@js-prod-end@@ --&gt;</pre></div></div>

<p>then in ant this looks as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;Configuring PHP config for production&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replaceregexp</span> <span style="color: #000066;">byline</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">flags</span>=<span style="color: #ff0000;">&quot;m&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;regexp</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;^.*@@dev@@.*$&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;substitution</span> <span style="color: #000066;">expression</span>=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;php/config/*.php&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/replaceregexp<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replaceregexp</span> <span style="color: #000066;">byline</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">flags</span>=<span style="color: #ff0000;">&quot;m&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;regexp</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;^.*@@prod@@(.*)$&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;substitution</span> <span style="color: #000066;">expression</span>=<span style="color: #ff0000;">&quot;\1&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;php/config/*.php&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/replaceregexp<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>And for the javascript in my php &#8211; view files</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;echo</span> <span style="color: #000066;">message</span>=<span style="color: #ff0000;">&quot;Configuring referenced Javascript for production&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replaceregexp</span> <span style="color: #000066;">flags</span>=<span style="color: #ff0000;">&quot;sg&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;regexp</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;@@js-dev-start@@[^\@]*@@js-dev-end@@&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;substitution</span> <span style="color: #000066;">expression</span>=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}/php/view&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;**/*.php&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/replaceregexp<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;replaceregexp</span> <span style="color: #000066;">byline</span>=<span style="color: #ff0000;">&quot;true&quot;</span>  <span style="color: #000066;">flags</span>=<span style="color: #ff0000;">&quot;m&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;regexp</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;^.*@@js-prod-start@@(.*)@@js-prod-end@@.*$&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;substitution</span> <span style="color: #000066;">expression</span>=<span style="color: #ff0000;">&quot;\1&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fileset</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${build.dir}/php/view&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
                <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;**/*.php&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fileset<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/replaceregexp<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Applying the concat task for js and css concatenation and apply java to invoke the yuicompressor and you&#8217;re done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.uebersoftware.com/2009/10/website-deployments-plain-old-ant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Long development cycles of compiled languages &#8211; the real killer</title>
		<link>http://www.uebersoftware.com/2009/09/development-cycles-of-compiled-languages/</link>
		<comments>http://www.uebersoftware.com/2009/09/development-cycles-of-compiled-languages/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 13:24:20 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Web2.0]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming languages]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[webapps]]></category>

		<guid isPermaLink="false">http://www.uebersoftware.com/?p=83</guid>
		<description><![CDATA[Ever asked yourself what are the reasons for the rise of scripting  languages like PHP, Ruby, Groovy for web development in the last couple of years? Let&#8217;s take the concrete case of Java. Common critiques of the language and the API&#8217;s, and the J2EE/JEE frameworks were/are in a loose historical order:

performance &#8211; too slow: this [...]]]></description>
			<content:encoded><![CDATA[<p>Ever asked yourself what are the reasons for the rise of scripting  languages like PHP, Ruby, Groovy for web development in the last couple of years? Let&#8217;s take the concrete case of Java. Common critiques of the language and the API&#8217;s, and the J2EE/JEE frameworks were/are in a loose historical order:</p>
<ul>
<li>performance &#8211; too slow: this was quite a while ago. JVM&#8217;s are very fast nowadays</li>
<li>bloated: still true for some aspects. E.g. no closures (still..)</li>
<li>too complex &amp; heavyweight, meaning too many dependencies to setup and take care of. Especially for J2EE this was the case. JEE changed a lot here.</li>
</ul>
<p>The list could go on, but is mostly centered on those arguments which are however mostly referring older releases of the language and its libraries. Nowadays JEE is actually very lightweight, has a great set of tools that speed up app development and is lighening fast. With the advance of tooling support, common IDE&#8217;s  make it irrelevant if you have to generate setters and getters (bloated?) or not, and enable refactoring of code with a button click.</p>
<p>When you compare the (web)framework support between Java and interpreted scripting languages Java has learned a lot from past mistakes with J2EE 1.2-1.4.  CoC (Convention over Configuration), DRY (Don&#8217;t repeat yourself), Scaffolding, etc. can be found in Java frameworks just as in RoR. I don&#8217;t think that there&#8217;s a general winner &#8211; this really depends on the task and situation at hand.</p>
<p>Then there&#8217;s dynamic types vs. static types. There are pro and cons for both here, I prefer static typed to detect errors early at development time.</p>
<p>I claim that the real reason for the continued success of scripting languages are the faster development cycles. Especially there is no compilation, un- and redeployment needed. This speeds up development considerably and enables more trial and error coding if you feel like &#8211; though better do white-box testing.</p>
<p>Apart from that I cannot see any real advantage of interpreted languages today especially in compare to Java. The JVM is some of the most advanced piece of technology we have today: robust, scales, understood and has many mature implementations on all platforms.</p>
<p>What is your preferred language and why?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.uebersoftware.com/2009/09/development-cycles-of-compiled-languages/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Internet-scale Java Web Applications</title>
		<link>http://www.uebersoftware.com/2009/07/internet-scale-java-web-applications/</link>
		<comments>http://www.uebersoftware.com/2009/07/internet-scale-java-web-applications/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 15:30:00 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[EC2]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Terracotta]]></category>
		<category><![CDATA[Web2.0]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scaling]]></category>
		<category><![CDATA[webapps]]></category>

		<guid isPermaLink="false">http://www.uebersoftware.com/2009/07/internet-scale-java-web-applications/</guid>
		<description><![CDATA[I am currently working on 2 application architectures. One is a PHP Facebook app (IFrame) with Postgresql in the backend, the other is a Glassfish/Jersey/Toplink/PostgreSql stack.
When reading the glowing web 2.0 tech stories in the news and sites like highscalability it seems like just about everyone requiring a &#8220;internet-scale&#8221; architecture is using MySQL, many are [...]]]></description>
			<content:encoded><![CDATA[<p>I am currently working on 2 application architectures. One is a PHP Facebook app (IFrame) with Postgresql in the backend, the other is a Glassfish/Jersey/Toplink/PostgreSql stack.</p>
<p>When reading the glowing web 2.0 tech stories in the news and sites like <a href="http://www.highscalability.com/">highscalability</a> it seems like just about everyone requiring a &#8220;internet-scale&#8221; architecture is using MySQL, many are using stacks in the line of {Phyton,Django|PHP, Zend}{memcached/MySQL} and  take advantage of the new offerings of <a href="http://aws.amazon.com/ec2/">Amazon </a>or <a href="http://code.google.com/appengine/">Google</a> to push their infrastructure to the cloud ( <a href="http://www.microsoft.com/azure">Microsoft Azure</a> is another big one, <a href="http://www.sun.com/solutions/cloudcomputing">Sun </a>has something cooking, and there are many smaller cloud service providers).</p>
<p>I actually also had in the back of my head to go for EC2 in the near future for my apps &#8211; thinking of EC2 just of a vserver with more/less power on demand.</p>
<p>However when thinking about it, I was not so sure anymore if the architecture I am using is even ready for the Cloud &#8211; and ready to scale.</p>
<p>When hearing the advocates of BigTable, traditional RDBMS are not suited for such endavours. Nowadays all the hype seems about simple data structures, like hashtables, and doing the Joins in a Application Layer.  Another approach is to do sharding  &#8211; divide the database into shards which are exact replicas of each other, direct e.g. usergroup x to shard z, ensuring that they mostly only need data from this shard.</p>
<p>Where do JEE technologies fit in those high-scalability scenarios and why not Postgres &#8211; is the transactional db a scalability killer?</p>
<p>Lets examinate my concrete questions for my 2 use cases:</p>
<p><span style="font-weight: bold;">a) MySQL vs. Postgres</span><br /><a name="pooling"></a> <br />The traditional PHP application goes within Apache with mod_php using process forking &#8211; so every request is basically a new php process. Very different from the concept of a container. This implies that in regards to data caching there is nothing out of the PHP box. Maybe not so astonishing anymore that PHP does not have connection pooling support &#8211; yes it just wouldn&#8217;t make sense. Quoting Rasumus Lersdorf, Creator of PHP from a 2002 <a href="http://www.sitepoint.com/article/phps-creator-rasmus-lerdorf/4/">interview</a>:<a href="http://www.sitepoint.com/article/phps-creator-rasmus-lerdorf/4"></a></p>
<p><span style="font-style: italic;">A pool of connections has to be owned by a single process. Since most people use the Apache Web server, which is a multi-process pre-forking server, there is simply no way that PHP can do this connection pooling …</span><br /><span style="font-style: italic;"> If/when the common architecture for PHP is a single-process multithreaded Web server, we might consider putting this functionality into PHP itself, but until that day it really doesn’t make much sense. Even Apache 2 is still going to be a multi-process server with each process being able to carry multiple threads. So we could potentially have a pool of connections in each process</span>.</p>
<p>Connections to MySQL <em>MyISAM</em> storage engine are apparently only 4KB and quite cheap. On the other hand Oracle connections</p>
<p><a style="font-style: italic;" href="http://vsbabu.org/mt/archives/2003/02/12/php_oracle_performance.html">every single connection takes up 5MB in NT4 for Oracle 8i 816</a></p>
<p>The truth is, that most of the MySQL-PostgresSQL comparisons found on Google are really outdated.  Postgres made huge performance increases from in their last version 8 as well as MySQL had significantly improved their transactional INNODB engine. So in terms of performance it more depends on the optimal configuration and design than MySQL vs. Postgres. Both are good databases and after going over an excellend <a href="http://www.slideshare.net/xzilla/scaling-with-postgres">presentation &#8220;Scaling with Postgres&#8221; </a>by Robert Treat given at the Percona Performance Conference 2009, I feel in good hands using Postgres.</p>
<p><span style="font-weight: bold;">b) Data caching</span></p>
<p>1) facebook app with PHP/Postgres</p>
<p>How would i cache to improve performance when i see that direct database access is taking too much. Well actually <a href="http://www.danga.com/memcached/">memcache </a>can be used by many database systems, it just happens that a lot of people use it with MySQL, but it also <a href="http://pgfoundry.org/projects/pgmemcache/">integrates with Postgres </a>and many more.</p>
<p>Besides memcached i am sure  there are other distributed caches usable with PHP.</p>
<p>2) Glassfish/Jersey/Toplink/Postgres</p>
<p>Here I am using JEE JPA with Toplink Essentials. The later does not have clustering support &#8211; or at least no production quality. The open source Toplink code base EclipseLink 1.0 was last time i looked at it (ca. Jan 2009) a bit unstable.</p>
<p>So I guess I would have to look at other distributed caches. Fortunately the choices here are not too little &#8211; hibernate integrates with EHCache, OSCache to name a few. So I guess I do not have to worry too much about distributed caching for my JEE app right now.</p>
<p><span style="font-weight: bold;">c) Physical Infrastructure</span></p>
<p>My current vServer provider (which i can absolutly not recommend but this is another story.. ) charges about 100 CHF / a month for 1 GB (3GB burstable) RAM, 60GB Hd, 2 GHz Xeon processor. I am already a bit short of RAM at times, so the next bigger package is dedicated which starts 200 CHF / month , or more realistcally a 350 / month for a dual core Xeon and 4 GB of RAM.</p>
<p>From the <a href="http://aws.amazon.com/ebs/">Amazon Website</a>:</p>
<p><span style="font-style: italic;">&#8220;As an example, a medium sized website database might be 100 GB in size and expect to average 100 I/Os per second over the course of a month. This would translate to $10 per month in storage costs (100 GB x $0.10/month), and approximately $26 per month in request costs (~2.6 million seconds/month x 100 I/O per second * $0.10 per million I/O).&#8221;</span></p>
<p>Given my app  is no video/media sharing the scenario would be a small instance always on, and moderate  Elastic Block Storage (EBS) requirements for the data storage. This gives me a rough estimate using their  handy <a href="http://calculator.s3.amazonaws.com/calc5.html">calculator:</a>
<ul>
<li>Small (1.7 GB RAM,..) Linux Instance (always on 1 month, 36$ EBS costs): 118 $</li>
<li>Large (7.5 GB RAM,..) Linux Instance (always on 1 month, 36$ EBS costs): 363 $</li>
</ul>
<p>The <a href="http://aws.amazon.com/ec2/instance-types/">instance types</a> of EC2 also include high performance CPU instances and different OS. For me right now something between a small and a large instance would be ideal, just in terms of RAM. (I mean just for a single glassfish instance the recommended memory allocation is 1 GB ..). Maybe having 2 small instances would be the best solution in my case.</p>
<p>So overall I guess I will go with EC2. There are a bunch of articles, <a href="http://www.mahalo.com/answers/web-development/godaddy-virtual-dedicated-server-vs-amazon-ec2-vs-rackspace-which-is-better-for-a-startup-and-why">questions </a>and <a href="http://www.simplyhaddad.com/pigeon-box/design-tutorials/88-which-one-is-for-me-amazon-s3ec2-vs-dedicated-server-vs-shared-hosting-vs-vps.html">comparisons </a>out there that list all the pro and cons between dedicated servers, cloud providers, and vservers. Fact is that Amazon has been a leader in the Cloud space and improved their services constantly. Also the usablility with the Management Console has increased significantly.</p>
<p><span style="font-weight: bold;">d) Impacts of EC2 on Application Architecture / Clustering</span></p>
<p>On the WebServer / DNS tier EC2 offers <a href="http://aws.amazon.com/ec2/#functionality">Elastic Load Balancing</a>. This is 1 public static ip adress per AWS account. The ip adresses of the instances will change upon reboot, but their only private so don&#8217;t have to worry about this. Furthermore the elastic ip feature implies a load balancing included for you to distribute load to the instances.</p>
<p>One problem with EC2 though is in the application tier because is there&#8217;s no multicast &#8211; makes sense when you think about the potential network flood it would possible generate. This s a problem, because most of the applications/frameworks/application servers usually rely on multicast for their clustering solutions &#8211; in order to the discovery of other service instances</p>
<p>I found a nice <a href="http://blog.decaresystems.ie/index.php/2007/02/12/amazon-web-services-the-future-of-datacenter-computing-part-2/">article </a>on a <a href="http://www.terracotta.org/">Terracotta</a> architecture solving this problem. Terracotta provides clustering and caching for Java objects by instrumenting the Java byte-codes and doing things like (pre)fetching content or updating copies. They do this via TCP/IP and therefore enable clustering and distributed caches that do not rely on multicast. What&#8217;s really cool is that they went recently OSS and you can download their software for free!</p>
<p>How does Terracotta  work?</p>
<p>A few interesting quotes from their forum:</p>
<p><span style="font-style: italic;">Every application node is connected to the Terracotta Server Cluster via a TCP connection. There is no multicast. Terracotta is very efficient over the network. Because it intercepts field-level changes, only the changes to your objects are sent across the wire. In addition, objects do not live everywhere, so Terracotta only sends changes where objects are resident. In the case where you have a well partitioned application, this means that on average, your changes will only be copied to the Terracotta Server Cluster, and not to all of the application nodes (because they don&#8217;t need a copy of objects they do not have a reference to in Heap)</span></p>
<p><span style="font-style: italic;">Just because one has 1000 clients running the same application doesn&#8217;t mean all data is everywhere. One of the features of Terracotta is that it has a virtual heap. Objects are only where they need to be when they need to be there. Some users do have large numbers of clients and it works quite well. Scale is more of a question of concurrency and rate of change than number of clients.</span></p>
<p><span style="font-style: italic;">The Terracotta server uses an efficient mechanism to send changes using Java NIO under the covers to achieve high scalability. </span></p>
<p>There are integrations with several App Servers, among them <a href="http://www.terracotta.org/web/display/orgsite/GlassFish+Integration">Glassfish</a>. Yes!</p>
<p><span style="font-size:130%;"><span style="font-weight: bold;">Summary</span></span></p>
<p>Without further ado, my takeaways to this rather long post are:</p>
<p>Postgres does not <span style="font-style: italic;">per se</span> underperform MySQL<br />Memecache can be used with Postgres<br />Do not use Persistent DB Connections in PHP ever<br />EC2 will fit my bill for infrastructure/hosting<br />Terracotta will be a good candidate  for clustering in a EC2 environment without multicast<br />Hibernate with EHCache, JBoss Cache, OSCache is your distributed cache replacement for Toplink Essentials</p>
]]></content:encoded>
			<wfw:commentRss>http://www.uebersoftware.com/2009/07/internet-scale-java-web-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
