Your SlideShare is downloading. ×
Google App Engine for Java v0.0.2
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 for Java v0.0.2

976
views

Published on

Google App Engine 3 hour workshop for Java developers presented at GIDS 2010 in Bangalore, India

Google App Engine 3 hour workshop for Java developers presented at GIDS 2010 in Bangalore, India

Published in: Education

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

No Downloads
Views
Total Views
976
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
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 a JVM cloud computing workshop by Matthew McCullough, Ambient Ideas, LLC
  • 2. Matthew McCullough ★ Open Source Architect Ambient Ideas, LLC ★ Twitter @matthewmccull ★ Email matthewm@ambientideas.com ★ Web ambientideas.com/blog
  • 3. 90 min 90 min
  • 4. on ? Le ss sto ry H i
  • 5. v elo pe rs! We ’re De
  • 6. Let’s build an app!
  • 7. Google App Engine SDK
  • 8. Google Web Toolkit SDK
  • 9. Google Eclipse Plugin
  • 10. Let’s code!
  • 11. deploy to local development server
  • 12. debugging defaults
  • 13. Success!
  • 14. Why the cloud?
  • 15. I have an idea for an app!
  • 16. scrounge up money
  • 17. LD SO
  • 18. going great, then...
  • 19. Spiked Traffic
  • 20. D LD LO S OS
  • 21. Whew! We survived!
  • 22. Not again!
  • 23. D LD LD LO O S OS S
  • 24. can’t afford to keep doing this!
  • 25. success = crowds
  • 26. crowds can be good
  • 27. crowds can be bad
  • 28. crowds are sudden
  • 29. crowds are transient
  • 30. fu nds! No Re
  • 31. pay-per-use!
  • 32. brilliant!
  • 33. GAE Account
  • 34. before a real deployment
  • 35. sign up for GAE
  • 36. http://appengine.google.com
  • 37. Google account
  • 38. SMS-delivered code
  • 39. demo of signup
  • 40. Production Deployment
  • 41. reserve App ID
  • 42. http://appengine.google.com Control Panel
  • 43. demo reserving App ID
  • 44. set App ID & Version
  • 45. demo setting App ID
  • 46. deploy...
  • 47. demo deploying to production GAE from eclipse
  • 48. <appid>.appspot.com
  • 49. Pay-as-you-go?
  • 50. who thought of this?
  • 51. Joh nM cCa r thy
  • 52. 1960
  • 53. 1960
  • 54. 1960
  • 55. “com putation may someday d as a publ ic utility” be organize -John McCarthy
  • 56. with the premise that the data services and “It starts be on servers. We c all it cloud computing architecture should be in a cloud somewhere.” – they should -Eric Schmidt, 8/9/2006
  • 57. what does this solve?
  • 58. New Signups Active Users Users Jan Feb Mar Apr May Jun Jul Aug Sep
  • 59. minimal cost for short-lived peaks
  • 60. Command Line (SDK)
  • 61. appcfg.sh appcfg.cmd
  • 62. production maintenance
  • 63. > appcfg.sh help Action must be one of: help: Print help for a specific action. request_logs: Write request logs in Apache common log format. rollback: Rollback an in-progress update. update: Create or update an app version. update_indexes: Update application indexes. update_cron: Update application cron jobs. update_queues: Update application task queue definitions. update_dos: Update application DoS protection configuration. version: Prints version information. cron_info: Displays times for the next several runs of each cron job. Use 'help <action>' for a detailed description.
  • 64. demo appcfg help
  • 65. push to production
  • 66. appcfg.sh update war
  • 67. fetch logs
  • 68. appcfg.sh request_logs war mylogs.log
  • 69. demo appcfg fetch logs
  • 70. dev_appserver.sh dev_appserver.cmd
  • 71. Jetty Servlet Container
  • 72. demo dev_appserver
  • 73. The WAR
  • 74. WAR folder format
  • 75. no actual WAR
  • 76. optimized to upload delta
  • 77. Logging
  • 78. log4j
  • 79. java.util.logging
  • 80. System.out == info System.err == warning
  • 81. The Datastore
  • 82. A place to store data
  • 83. Filesystem
  • 84. Relational database
  • 85. column-oriented
  • 86. List ( Maps ( Maps ) )
  • 87. schema-less
  • 88. Persisting Easily ★ Low Level Datastore API ★ com.google.appengine.api.datastore
  • 89. low level API
  • 90. full control but... vendor lock in
  • 91. DataNucleus
  • 92. Who?
  • 93. DataNucleus
  • 94. JDO
  • 95. JPA
  • 96. demo JDO persistence
  • 97. demo two rows with columns differing
  • 98. Why Google’s cloud?
  • 99. free to start
  • 100. generous free quotas
  • 101. no hardware to own
  • 102. no OS to patch
  • 103. no network to secure
  • 104. SaaS PaaS IaaS
  • 105. Python + JVM languages
  • 106. Java Runtime 1.6
  • 107. Jetty servlet container
  • 108. Google uptime
  • 109. Google scaling brilliance
  • 110. freedom through constraints
  • 111. freedom through constra ints
  • 112. The Whitelist
  • 113. the allowed classes
  • 114. Banned ⅘ Java
  • 115. The JRE Class White List A Java App Engine application's access to the classes in the Java standard library (the Java Runtime Environment, or JRE) is limited to the following classes: java.awt.datatransfer.DataFlavor java.awt.datatransfer.MimeType java.awt.datatransfer.Transferable java.beans.AppletInitializer java.beans.BeanDescriptor java.beans.BeanInfo java.beans.Beans java.beans.ConstructorProperties java.beans.Customizer java.beans.DefaultPersistenceDelegate java.beans.DesignMode java.beans.Encoder java.beans.EnumPersistenceDelegate java.beans.EventHandler java.beans.EventSetDescriptor java.beans.ExceptionListener java.beans.FeatureDescriptor java.beans.IndexedPropertyChangeEvent java.beans.IndexedPropertyDescriptor java.beans.IntrospectionException java.beans.Introspector java.beans.MethodDescriptor java.beans.ParameterDescriptor java.beans.PersistenceDelegate java.beans.PropertyChangeEvent java.beans.PropertyChangeListener
  • 116. org.xml.sax.DocumentHandler org.xml.sax.EntityResolver org.xml.sax.ErrorHandler org.xml.sax.HandlerBase org.xml.sax.InputSource org.xml.sax.Locator org.xml.sax.Parser org.xml.sax.SAXException org.xml.sax.SAXNotRecognizedException org.xml.sax.SAXNotSupportedException org.xml.sax.SAXParseException org.xml.sax.XMLFilter org.xml.sax.XMLReader org.xml.sax.ext.Attributes2 org.xml.sax.ext.Attributes2Impl org.xml.sax.ext.DeclHandler org.xml.sax.ext.DefaultHandler2 org.xml.sax.ext.EntityResolver2 org.xml.sax.ext.LexicalHandler org.xml.sax.ext.Locator2 org.xml.sax.ext.Locator2Impl org.xml.sax.helpers.AttributeListImpl org.xml.sax.helpers.AttributesImpl org.xml.sax.helpers.DefaultHandler org.xml.sax.helpers.LocatorImpl org.xml.sax.helpers.NamespaceSupport org.xml.sax.helpers.ParserAdapter org.xml.sax.helpers.ParserFactory org.xml.sax.helpers.XMLFilterImpl org.xml.sax.helpers.XMLReaderAdapter org.xml.sax.helpers.XMLReaderFactory
  • 117. controversial
  • 118. you agree with Sun policing it or not, “Whether all very well for Java compatib ility has served us over a decade. es being sure as a d eveloper that all That includ ll platforms. core classes a re present on a -sets of the cor e classes in the Creating sub tform was forb idden for a really Java pla nd irresponsible to good reaso n, and it's wanton a casually flaunt the rules.” s -Simon Phipps, OSS Manager, Sun Microsystem
  • 119. what about J2ME?
  • 120. No threads
  • 121. No File I/O
  • 122. No Sockets
  • 123. No JNI
  • 124. demo violating the whitelist locally
  • 125. demo violating the whitelist remotely
  • 126. Why another vendor’s cloud?
  • 127. better response times
  • 128. 3000 ‘hello world’ 2250 GAE response times in milliseconds 1500 750
  • 129. OS neutrality
  • 130. choice of programming language
  • 131. avoiding G AE platform l ock-in
  • 132. EC2
  • 133. SimpleDB
  • 134. S3 Storage
  • 135. CloudServers
  • 136. Windows OS
  • 137. Linux OS
  • 138. CDN
  • 139. open networking
  • 140. root access
  • 141. 1.5 cents/hour
  • 142. 0.66 rupees/hour
  • 143. Dashboard
  • 144. web console
  • 145. logging
  • 146. datastore inspector
  • 147. usage graphs
  • 148. Memcache
  • 149. retrieve, but don’t calculate
  • 150. why the 2nd data source?
  • 151. tested, measured, proven
  • 152. JSR-107 / JCache
  • 153. demo memcache
  • 154. Mail
  • 155. email services
  • 156. common for web apps
  • 157. realiable delivery
  • 158. URL Fetch
  • 159. only means of port connectivity
  • 160. 10 second limit
  • 161. 10 MB request limit
  • 162. demo URLFetch
  • 163. demo fail on 10MB get
  • 164. Task Queue
  • 165. webhook pattern
  • 166. outbound = API
  • 167. inbound = HTTP POST
  • 168. scheduled
  • 169. queues
  • 170. worker, processing
  • 171. but still limited to 30 seconds
  • 172. Quotas
  • 173. why?
  • 174. multi-tenancy
  • 175. cumulative
  • 176. per day
  • 177. per minute
  • 178. 30 seconds max per request
  • 179. demo quota limit grid
  • 180. profiling usage
  • 181. demo quota code
  • 182. demo app stats
  • 183. Costs
  • 184. very affordable
  • 185. great for startups
  • 186. great for weekend experiments
  • 187. demo cost grid
  • 188. Security
  • 189. helped by constraints
  • 190. built-in authentication
  • 191. developer roles
  • 192. web.xml
  • 193. demo security config
  • 194. spring security (formerly acegi)
  • 195. Co-Developers
  • 196. dev invite process
  • 197. https:// only for appspot domains
  • 198. Domain Names
  • 199. CNAME entries
  • 200. Real World Comparisons
  • 201. Limits too tight?
  • 202. Blobs > 50MB?
  • 203. Throughput > 72GB / day?
  • 204. Throughput > 1TB / day?
  • 205. Transactions > 43,000,000 / day?
  • 206. Blob Store
  • 207. images, zips, audio
  • 208. Datastore, 1 MB limit
  • 209. 50MB max
  • 210. XMPP
  • 211. Jabber, Google Talk, Google Wave
  • 212. instant message service
  • 213. why in a GAE app?
  • 214. webhook pattern
  • 215. demo XMPP console, API
  • 216. Image Manipulation
  • 217. convenience functions
  • 218. AWT on blacklist
  • 219. Secure Data Connector
  • 220. Enterprise
  • 221. Concerns
  • 222. p s ck u ba
  • 223. no binary solution
  • 224. csv export
  • 225. Resources
  • 226. Official Blog
  • 227. App Gallery
  • 228. http://vancouver2010.crosspollinate.org/search
  • 229. Issue Tracker
  • 230. Datastore Archive Feature Request
  • 231. Maven Support Feature Request
  • 232. The takeaways
  • 233. What is the single biggest benefit of GAE? Scalability
  • 234. What type of business best fits GAE? Startups
  • 235. What types of apps best fit GAE? Web Mashups
  • 236. What is the hardest limit of GAE to work around? 30 sec. processing
  • 237. Google App Engine a JVM cloud computing workshop att end ing! you for Th ank by Matthew McCullough, Ambient Ideas, LLC
  • 238. Resources SDK Downloads: http://code.google.com/appengine/downloads.html App Gallery: http://appgallery.appspot.com/ Issue Tracker: http://code.google.com/p/googleappengine/issues/list Secure Data Connector Install: http://code.google.com/securedataconnector/docs/1.0/installing.html
  • 239. Photo Credits Various Clouds: http://www.ambientideasphotography.com Newspaper: http://www.flickr.com/photos/12836528@N00/1202823367 Flickr Chart: http://www.flickr.com/photos/85494010@N00/84912961 No Refunds: http://www.flickr.com/photos/8804814@N08/2591957763 Cell Phone Number Pad: http://www.flickr.com/photos/88543347@N00/2243527026 Men Conversation: http://www.flickr.com/photos/99037763@N00/2314463032 Backup Tape: http://www.flickr.com/photos/48615294@N00/75622824
  • 240. Photo Credits Clouds: http://www.flickr.com/photos/cindy47452/1624383308/ Big Chair: http://www.flickr.com/photos/annapickard/20988642/sizes/o/ Yellow Crowd: http://www.flickr.com/photos/twose/887903401/sizes/l/ Multicolor Crowd: http://www.flickr.com/photos/akc77/3370167184/sizes/l/ Jet Truck: http://www.flickr.com/photos/85819182@N00/301495633 Puzzled Power Plug: http://www.flickr.com/photos/95492938@N00/3203311346 Power Towers: http://www.flickr.com/photos/97544179@N00/3317530283 Reporter: http://www.flickr.com/photos/19953384@N00/4101633839 Idea Lightbulb Head: http://www.flickr.com/photos/17731548@N00/981372736