<?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>maxheapsize.com &#187; google</title>
	<atom:link href="http://maxheapsize.com/tag/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://maxheapsize.com</link>
	<description>Oliver Wehrens on Programming and Agile</description>
	<lastBuildDate>Tue, 14 Jun 2011 20:41:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>A Quick Look at Google App Engine for Java</title>
		<link>http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/</link>
		<comments>http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 20:52:51 +0000</pubDate>
		<dc:creator>Oliver Wehrens</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://maxheapsize.com/?p=182</guid>
		<description><![CDATA[At Campfire One Google announced their App Engine for Java (this was in the rumor mill for a couple of days already). The first 10,000 developers would get an early look at App Engine&#8217;s Java language support. I would have almost missed it. Some tweets reminded me of registering with Google. I heard of AppEngine [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fmaxheapsize.com%2F2009%2F04%2F08%2Fa-quick-look-at-google-app-engine-for-java%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fmaxheapsize.com%2F2009%2F04%2F08%2Fa-quick-look-at-google-app-engine-for-java%2F&amp;source=owehrens&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><img alt="" src="http://maxheapsize.com/static/appengine.gif" class="alignleft" width="145" height="111" />At <a href="http://code.google.com/campfire/">Campfire One</a> Google <a href="http://googleappengine.blogspot.com/2009/04/seriously-this-time-new-language-on-app.html">announced</a> their App Engine for Java (this was in the rumor mill for a couple of days already). The first 10,000 developers would get an early look at App Engine&#8217;s Java language support. I would have almost missed it. Some tweets reminded me of registering with Google. I heard of AppEngine before but the fact that it was only available for Python did not make it very attractive to me. Now the game changed a bit with introducing Java (and <a href="http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine">other JVM languages</a> (JRuby, partial Scala &#8230;), well <a href="http://blog.springsource.com/2009/04/07/write-your-google-app-engine-applications-in-groovy/">Groovy</a> for sure, <a href="http://olabini.com/blog/2009/04/dynamic-languages-on-google-app-engine-an-overview/">Ola Bini</a> has more on that).</p>
<p>After <a href="http://appengine.google.com/">registering</a> with my Google ID they wanted to verify my account with a sms text message. Google is just listing  3 countries and then &#8216;Other&#8217; for sms verification and I expected it would not work with a german cellphone. But it did <img src='http://maxheapsize.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>The <a href="http://code.google.com/appengine/docs/java/gettingstarted/">Tutorials</a> on their site are working nicely (even if you don&#8217;t have Eclipse which they are always referring to). Just follow the instructions step by step, use ant and the command line to get through the examples. Don&#8217;t copy the template project, this is not in line with the documentation.</p>
<p>In the last hour or so I went from nothing to a running <a href="http://maxheapsize.appspot.com/">Guestbook App at Google (try it!)</a>. Once you get the environment right, the code is pretty straight forward.</p>
<p>I see a couple of things which I do like about the App Engine.</p>
<p><strong>Support for Google Id and Sign In</strong><br />
AppEngine support sign in with an Google ID with 2! lines of code. Great. I don&#8217;t want to worry about that (this generates the Google login page and redirects).</p>
<pre name="code" class="java">
UserService userService = UserServiceFactory.getUserService();
User user = userService.getCurrentUser();
</pre>
<p><strong>Automagic Persistence</strong><br />
With simple annotation you persist your objects. No mapping, no nothing. You can configure if you want to be using JDO or JPA. No database hassle or whatsoever. Of course it needs to be seen how this work with more complex domain models. </p>
<pre class="brush: java; title: ;">
@PersistenceCapable(identityType = IdentityType.APPLICATION)
..
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent
    private User author;

    @Persistent
    private String content;

    @Persistent
    private Date date;
...
</pre>
<p><strong>Local Development &#8211; Remote Depolyment</strong><br />
Everything works locally. If you deploy it to Google it uses the Google facilities. I don&#8217;t have to worry (deployment is one ant command).</p>
<p><strong>Scalability and free Use</strong><br />
If your application is successful you can grow with Google. More Resources at your fingertips. Of course this costs money (but you should make money at this point right?). If you are beyond the <strong>free</strong> 10 GB bandwidth in/day, 10 GB bandwidth out/day, 5 million pageviews a month, 46.3 cpu h/day and 1000 emails/day you pay:</p>
<ul>
<li>CPU Time 	$0.10/CPU hour </li>
<li>Bandwidth Out $0.12/GByte </li>
<li>Bandwidth In $0.10/GByte </li>
<li>Stored Data $0.005/GByte-day</li>
<li>Recipients Emailed $0.0001/Email </li>
</ul>
<p><strong>Monitoring</strong><br />
You get nice and detailed overview of the status of you application. You can upload new version any time and go live on demand.<br />
<div class="wp-caption alignnone" style="width: 460px"><img alt="Google AppEngine Dashboard" src="http://maxheapsize.com/static/GoogleAppEngineDashboard.jpg" title="Google AppEngine Dashboard" width="450" height="303" /><p class="wp-caption-text">Google AppEngine Dashboard</p></div></p>
<p>This this is limited access and Google titles it &#8216;early look&#8217; there must be some gotchas but I hope they will get worked out. Of course you will depend on Google&#8217;s code but I could imagine with a good abstraction layer you can minimize the dependencies to the AppEngine (although replacing some services you might need to use could be hard).</p>
<p>The downside of using it are (gathered from various sources)</p>
<ul>
<li>No own threads</li>
<li>Restrictions of java.io.File</li>
<li>Restrictions on reflection</li>
<li>Maximum of 30 seconds per request</li>
<li>An application may not open sockets</li>
</ul>
<p>For sure there are some more benefits in hosting with Google (I guess the same goes for Amazon with S3/EC2). In the past I heard from a couple of startups using those kind of services but I never imagined that it would be that easy.  As I said, I was up and running in under one hour.</p>
<p>I certainly will use AppEngine for a small application in the near future.</p>
<div class="google_plusone_widget"><g:plusone 
      count="true" href="http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/" size="medium"></g:plusone></div><!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/&amp;title=A+Quick+Look+at+Google+App+Engine+for+Java" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/&amp;title=A+Quick+Look+at+Google+App+Engine+for+Java" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=A+Quick+Look+at+Google+App+Engine+for+Java&amp;url=http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/&amp;title=A+Quick+Look+at+Google+App+Engine+for+Java" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/&amp;title=A+Quick+Look+at+Google+App+Engine+for+Java" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/&amp;bm_description=A+Quick+Look+at+Google+App+Engine+for+Java" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/&amp;title=A+Quick+Look+at+Google+App+Engine+for+Java" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/&amp;title=A+Quick+Look+at+Google+App+Engine+for+Java" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.sphere.com/sphereit/http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/" rel="nofollow" title="Add to&nbsp;SphereIt"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/sphereit.png" title="Add to&nbsp;SphereIt" alt="Add to&nbsp;SphereIt" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.spurl.net/spurl.php?url=http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/&amp;title=A+Quick+Look+at+Google+App+Engine+for+Java" rel="nofollow" title="Add to&nbsp;Spurl"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/spurl.png" title="Add to&nbsp;Spurl" alt="Add to&nbsp;Spurl" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+A+Quick+Look+at+Google+App+Engine+for+Java+@+http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://maxheapsize.com/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://maxheapsize.com/2009/04/08/a-quick-look-at-google-app-engine-for-java/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

