Google AppEngine for Java enterprise applications Andrew Skiba Tikal
Introduction <ul><li>You have a typical Java web application </li></ul><ul><ul><li>JSP and Servlets frontend
Hibernate, JPA or JDBC backend
Spring configuration </li></ul></ul><ul><li>Created long before it was known about AppEngine
What it takes to deploy to Google servers? </li></ul>
Welcome to Pet Clinic
App Engine for Java <ul><li>Data storage
Web application support
Other services
JVM programming languages
Development tools
Production tools </li></ul>
It's not the same Java <ul><li>Not full JRE support </li><ul><li>No file system access
No sockets
No process or thread creation
No graphics
No JDBC </li></ul><li>Most of JavaEE features are not supported </li><ul><li>No EJB, JCA, JMS, JNDI </li></ul><li>Sun's CO...
Datastore <ul><li>Interface to BigTable
Motivation </li><ul><li>Google web indexing, Google Earth, Google Finance
Big data with complicated structure
Serialize? </li><ul><li>RDBMS don't like BLOBs </li></ul><li>BigTable! </li><ul><li>&quot;sparse, distributed, persistent ...
Very different from RDBMS – no JOINs, no aggregations </li></ul></ul></ul>
Upcoming SlideShare
Loading in...5
×

Google App Engine

1,974

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,974
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Google App Engine

  1. 1. Google AppEngine for Java enterprise applications Andrew Skiba Tikal
  2. 2. Introduction <ul><li>You have a typical Java web application </li></ul><ul><ul><li>JSP and Servlets frontend
  3. 3. Hibernate, JPA or JDBC backend
  4. 4. Spring configuration </li></ul></ul><ul><li>Created long before it was known about AppEngine
  5. 5. What it takes to deploy to Google servers? </li></ul>
  6. 6. Welcome to Pet Clinic
  7. 7. App Engine for Java <ul><li>Data storage
  8. 8. Web application support
  9. 9. Other services
  10. 10. JVM programming languages
  11. 11. Development tools
  12. 12. Production tools </li></ul>
  13. 13. It's not the same Java <ul><li>Not full JRE support </li><ul><li>No file system access
  14. 14. No sockets
  15. 15. No process or thread creation
  16. 16. No graphics
  17. 17. No JDBC </li></ul><li>Most of JavaEE features are not supported </li><ul><li>No EJB, JCA, JMS, JNDI </li></ul><li>Sun's COSO Simon Ph ipps slams App Engine's Java Support </li></ul>
  18. 18. Datastore <ul><li>Interface to BigTable
  19. 19. Motivation </li><ul><li>Google web indexing, Google Earth, Google Finance
  20. 20. Big data with complicated structure
  21. 21. Serialize? </li><ul><li>RDBMS don't like BLOBs </li></ul><li>BigTable! </li><ul><li>&quot;sparse, distributed, persistent multi-dimensional sorted map&quot;
  22. 22. Very different from RDBMS – no JOINs, no aggregations </li></ul></ul></ul>
  23. 23. Datastore APIs <ul><li>Low level API </li><ul><li>Exposes all features of Datastore
  24. 24. Google proprietary
  25. 25. Easy to use for new project </li></ul><li>JPA </li><ul><li>With some limitations
  26. 26. Needs class &quot;enhancement&quot; build step </li></ul><li>JDO </li><ul><li>Will Google resurrect this spec? </li></ul></ul>
  27. 27. Web application on AppEngine <ul><li>Servlets are supported </li><ul><li>Servlet filters are supported
  28. 28. Response time outs
  29. 29. Streaming responses are limited </li></ul><li>JSP, JSTL, tag libraries are supported
  30. 30. Good old web.xml (with limitations)
  31. 31. HTTPS is supported
  32. 32. Security constraints supported with serious limitations </li></ul>
  33. 33. Google Web Toolkit <ul><li>Develop a desktop application (Swing-like API)
  34. 34. Debug a desktop application
  35. 35. Deploy an AJAX web application
  36. 36. Fully supported on AppEngine </li></ul>
  37. 37. More services <ul><li>Memcache </li><ul><li>JCache (javax.cache)
  38. 38. Low-level API </li></ul><li>Mail </li><ul><li>java.mail
  39. 39. Low-level API </li></ul><li>URL fetch </li><ul><li>java.net
  40. 40. Low-level API </li></ul></ul>
  41. 41. ... and more services <ul><li>Google Authentication </li><ul><li>Only google accounts
  42. 42. Very limited access control </li><ul><li>Admin
  43. 43. Registered user
  44. 44. Anonymous </li></ul></ul><li>Scheduled tasks </li><ul><li>cron.xml
  45. 45. Handled by servlets </li></ul></ul>
  46. 46. ... and even more services <ul><li>Image API </li><ul><li>Resize, crop, &quot;I feel lucky&quot;
  47. 47. Is necessary because Java 2D is not supported </li></ul><li>XMPP API
  48. 48. Task Queue API </li><ul><li>experimental </li></ul></ul>
  49. 49. Other programming languages <ul>Supported <li>JRuby
  50. 50. Scala
  51. 51. Jython (finally: Python on AppEngine :-)
  52. 52. Groovy </li><ul><li>Grails support for Datastore </li></ul><li>Rhino (JavaScript) </li></ul><ul>Supported <li>Quercus (PHP)
  53. 53. BeanShell
  54. 54. CAL </li></ul>
  55. 55. Development tools <ul><li>Eclipse plugin </li><ul><li>Create projects
  56. 56. Debug locally
  57. 57. Validate
  58. 58. Deploy </li></ul><li>Development server </li><ul><li>Implements or simulates all services </li></ul><li>GWT runner </li></ul>
  59. 59. Development tools <ul><li>SDK </li><ul><li>CLI tools for Windows and *nix
  60. 60. Libraries </li></ul><li>Unit testing </li><ul><li>Supported, with some overhead </li></ul><li>Ant tasks </li><ul><li>Enhancing JDO and JPA classes
  61. 61. Run development server
  62. 62. Deploy </li></ul></ul>
  63. 63. Dashboard <ul><li>Main </li><ul><li>Dashboard
  64. 64. Quota Details
  65. 65. Logs
  66. 66. Cron Jobs
  67. 67. Task Queues </li></ul><li>Datastore </li><ul><li>Indexes
  68. 68. Data Viewer </li></ul></ul>
  69. 69. Dashboard <ul><li>Administration </li><ul><li>Application Settings
  70. 70. Developers
  71. 71. Versions
  72. 72. Admin Logs </li></ul><li>Billing </li><ul><li>Billing Settings
  73. 73. Billing History </li></ul></ul>
  74. 74. Porting PetClinic to AppEngine
  75. 75. Porting PetClinic to AppEngine <ul><li>Removed Hibernate, JDBC, TopLink and JPA code
  76. 76. Implemented DAL using low level DataStore API </li><ul><li>Reminds writing JDBC code
  77. 77. Java DataStore API much less effective than Python one
  78. 78. Surprisingly works from the first shot </li></ul><li>Removed AspectJ code </li><ul><li>Could be rewritten using AOP alliance API </li></ul><li>Removed Log4j file appenders </li></ul>
  79. 79. Considerations <ul><li>Porting costs
  80. 80. Not full Java spec support
  81. 81. Response timeouts
  82. 82. Authentication only by Google accounts
  83. 83. Limited background jobs </li></ul><ul><li>Very different database
  84. 84. Backup
  85. 85. No guarantee on availability </li><ul><li>On July 2, 2009 AppEngine was down for 6 hours </li></ul><li>Billing
  86. 86. Vendor lock in </li><ul><li>Proprietary APIs
  87. 87. Unusual database </li></ul></ul>
  88. 88. Links <ul><li>Google AppEngine community
  89. 89. http://code.google.com/appengine/community.html
  90. 90. Project demos
  91. 91. http://code.google.com/p/googleappengine/source/browse/#svn/trunk/java/demos
  92. 92. Will it play in AppEngine?
  93. 93. http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine
  94. 94. JRE white list
  95. 95. http://code.google.com/appengine/docs/java/jrewhitelist.html
  96. 96. BigTable white paper
  97. 97. http://labs.google.com/papers/bigtable-osdi06.pdf </li></ul>
  98. 98. Questions?

×