Your SlideShare is downloading. ×
0
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Google App Engine - Java Style
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Google App Engine - Java Style

4,099

Published on

Overview of Google App Engine Java version. Presented at Stockholm Google Technology Usergroup (GTUG) 2010-01-14

Overview of Google App Engine Java version. Presented at Stockholm Google Technology Usergroup (GTUG) 2010-01-14

0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,099
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
130
Comments
0
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Google App Engine Java style Peter Sönnergren Lind GTUG Stockholm 2010-01-14
  • 2. whoami <ul><li>Java dev since like 1999 </li></ul><ul><li>Ruby enthusiast </li></ul><ul><li>Consultant @ Devoteam Quaint </li></ul><ul><li>Owner and CTO @ Pockus </li></ul><ul><ul><li>A book club that doesn't suck </li></ul></ul><ul><ul><li>http://www.pockus.se </li></ul></ul>
  • 3. App Engine 101 <ul><li>Googles Cloud offering </li></ul><ul><li>Run your web apps on Google's infrastructure </li></ul><ul><li>Platform As A Service </li></ul><ul><li>Unique Selling Point - Scalability on demand </li></ul><ul><ul><li>Instances are added when needed </li></ul></ul><ul><li>Two flavors </li></ul><ul><ul><li>Python since spring 2008 </li></ul></ul><ul><ul><li>Java since spring 2009 </li></ul></ul><ul><li>Technology preview :S </li></ul>
  • 4. The first hit is always free <ul><li>App quotas </li></ul><ul><ul><li>Free to start, 5 million pageviews/month </li></ul></ul><ul><ul><li>10 apps per user </li></ul></ul><ul><ul><li>Can enable billing </li></ul></ul><ul><ul><li>AdWords payment model </li></ul></ul><ul><ul><li>$32 worth of resources/month </li></ul></ul><ul><li>http://yourapp.appspot.com </li></ul><ul><li>http://www.yourapp.com using Google Apps for Domains </li></ul>
  • 5. GAE/J in a nutshell <ul><li>A place to run Java Servlets (2.5 API) </li></ul><ul><li>Meaning support for </li></ul><ul><ul><li>Servlets/JSP </li></ul></ul><ul><ul><li>Web Frameworks (Spring MVC/Wicket/Tapestry/Struts ...) </li></ul></ul><ul><li>In a sandbox </li></ul><ul><ul><li>All apps in isolation </li></ul></ul><ul><ul><li>Subset of the JRE </li></ul></ul><ul><li>Jetty customized </li></ul><ul><ul><li>Don't use the Jetty features, this might change </li></ul></ul>
  • 6. Limitations <ul><li>JRE White List </li></ul><ul><li>No threads </li></ul><ul><ul><li>Cron jobs </li></ul></ul><ul><ul><li>Task queues </li></ul></ul><ul><li>No outgoing connections (except mail/http/xmpp) </li></ul><ul><li>Read-only FS </li></ul><ul><li>30 second request limit, no push (upcoming?) </li></ul><ul><li>App spin-up time </li></ul><ul><li>No SLA available </li></ul>
  • 7. Datastore - BigTable <ul><li>NoSQL </li></ul><ul><li>Stores “entities” </li></ul><ul><li>Parent-Child relationships </li></ul><ul><li>Add “properties” at will (beware of restrictions in queries) </li></ul><ul><li>GQL to query </li></ul><ul><li>Transactions – but not global like in databases </li></ul><ul><li>!= for one column only </li></ul><ul><li>Max number of entities returned is 1000 </li></ul>
  • 8. Services – using standard APIs <ul><li>Datastore (BigTable) </li></ul><ul><ul><li>JDO </li></ul></ul><ul><ul><li>JPA </li></ul></ul><ul><li>Memcache – javax.cache </li></ul><ul><li>URL Fetch – java.net </li></ul><ul><li>Mail – javax.mail </li></ul><ul><li>Low-level APIs are available </li></ul>
  • 9. Services – Google APIs <ul><li>Google Accounts </li></ul><ul><li>XMPP </li></ul><ul><li>Image manipulation </li></ul><ul><li>Task Queues </li></ul><ul><li>Blobstore </li></ul><ul><li>Cron jobs </li></ul>
  • 10. Teh awesome <ul><li>Scalability is job #1 </li></ul><ul><ul><li>On demand </li></ul></ul><ul><li>Easy to get started </li></ul><ul><li>No sysadm work needed </li></ul><ul><li>An App Engine app is built to scale </li></ul><ul><ul><li>No long running requests </li></ul></ul><ul><ul><li>NoSQL </li></ul></ul><ul><ul><li>Move processing out of persistence layer </li></ul></ul>
  • 11. Getting started <ul><li>Sign up using phone nr (for verification sms) </li></ul><ul><li>Create app id </li></ul><ul><li>Download Eclipse plugin </li></ul><ul><li>Or use SDK with scripts </li></ul><ul><li>Generate app </li></ul><ul><li>Push to cloud </li></ul>
  • 12. Development <ul><li>dev_appserver.sh </li></ul><ul><ul><li>User service </li></ul></ul><ul><ul><li>Datastore </li></ul></ul><ul><ul><li>Et al, but no cron or tasks </li></ul></ul><ul><ul><li>Generates indexes for Datastore </li></ul></ul><ul><li>Blacklist/whitelist emulation </li></ul><ul><li>Eclipse plugin (official) </li></ul><ul><ul><li>Netbeans, IntelliJ </li></ul></ul><ul><li>Support for mocking the environment for testing </li></ul>
  • 13. Administration <ul><li>https://appengine.google.com </li></ul><ul><li>One app can have several developers </li></ul><ul><li>Concurrent versions </li></ul><ul><ul><li>http://<version>.latest.appspot.com </li></ul></ul><ul><li>Manage billing settings </li></ul><ul><ul><li>Bandwidth/CPU time/storage/mail </li></ul></ul><ul><li>Logs </li></ul><ul><li>Datastore viewer </li></ul>
  • 14. Language support <ul><li>App Engine accepts Java byte code, not source code </li></ul><ul><li>Permissive with reflection magic, creating classloaders etc </li></ul><ul><li>App Engine team works together with JVM Lang implementors </li></ul><ul><li>http://lotrepls.appspot.com/ </li></ul><ul><ul><li>beanshell, clojure, groovy, javascript, jython, jruby, scala, scheme </li></ul></ul><ul><li>PHP through Caucho/Quercus </li></ul>
  • 15. Vendor lock-in? <ul><li>Use standard Java APIs </li></ul><ul><li>Demoed on IBM Websphere </li></ul><ul><li>http://code.google.com/p/appscale/ </li></ul><ul><li>http://code.google.com/p/typhoonae/ </li></ul><ul><ul><li>Python only </li></ul></ul><ul><li>http://arachnid.github.com/bdbdatastore/ </li></ul><ul><ul><li>Use dev_appserver with alternative datastore </li></ul></ul>
  • 16. Demo Your first cloud application in a few minutes!
  • 17. Resources <ul><li>http://code.google.com/appengine/ </li></ul><ul><li>http://googleappengine.blogspot.com/ </li></ul><ul><li>Programming Google App Engine </li></ul><ul><ul><li>On O'Reilly </li></ul></ul><ul><ul><li>Written by a Googler </li></ul></ul><ul><li>Google Groups </li></ul><ul><ul><li>http://code.google.com/appengine/community.html </li></ul></ul>
  • 18. Contact <ul><li>mailto:peter@lind.be </li></ul><ul><li>http://github.com/peterlind </li></ul><ul><li>http://twitter.com/peter_lind </li></ul>

×