![Page 1: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/1.jpg)
Ikai Lan - @ikaiSingapore GTUG
June 12, 2011
GAE Program Update
Monday, June 13, 2011
![Page 2: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/2.jpg)
About the speaker
• Developer Relations at Google based out of San Francisco, CA
• Software Engineer at heart
• Singapore, Kuala Lumpur and Taipei on this trip
• Twitter: @ikai
Monday, June 13, 2011
![Page 3: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/3.jpg)
Agenda
• What is Google App Engine?
• What’s new in App Engine?
• What’s coming in App Engine?
• Go on App Engine
Monday, June 13, 2011
![Page 4: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/4.jpg)
3
What iscloud
computing?
Monday, June 13, 2011
![Page 5: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/5.jpg)
IaaS
APaaS
SaaS
Source: Gartner AADI Summit Dec 2009
Monday, June 13, 2011
![Page 6: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/6.jpg)
IaaS
APaaS
SaaS
Source: Gartner AADI Summit Dec 2009
Monday, June 13, 2011
![Page 7: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/7.jpg)
IaaS
APaaS
SaaS
Source: Gartner AADI Summit Dec 2009
Monday, June 13, 2011
![Page 8: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/8.jpg)
IaaS
APaaS
SaaS
Source: Gartner AADI Summit Dec 2009
Monday, June 13, 2011
![Page 9: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/9.jpg)
• Easy to build
• Easy to manage
• Easy to scale
Monday, June 13, 2011
![Page 10: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/10.jpg)
“We wear pagers soyou don’t have to”
Monday, June 13, 2011
![Page 11: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/11.jpg)
Monday, June 13, 2011
![Page 12: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/12.jpg)
>130K Apps
>90K Developers
>700M daily pageviews
Monday, June 13, 2011
![Page 13: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/13.jpg)
SDK & “The Cloud”
Hardware
Networking
Operating system
Application runtime
Java, Python
Static file serving
20
Monday, June 13, 2011
![Page 14: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/14.jpg)
Duke, the Java mascotCopyright © Sun Microsystems Inc., all rights reserved.Go Gopher
Monday, June 13, 2011
![Page 15: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/15.jpg)
• Java
• Scala
• JRuby (Ruby)
• Groovy
• Quercus (PHP)
• Rhino (JavaScript)
• Jython (Python)
Duke, the Java mascotCopyright © Sun Microsystems Inc., all rights reserved.
Extended Language support through JVM
Monday, June 13, 2011
![Page 16: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/16.jpg)
The Go Gopher
(We’ll talk about this guy
in a bit)
Monday, June 13, 2011
![Page 17: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/17.jpg)
BlobstoreImages
Mail XMPP Task Queue
Memcache Datastore URL Fetch
User Service
Core APIs
Monday, June 13, 2011
![Page 18: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/18.jpg)
Apr 2008 Python launchMay 2008 Memcache, Images API
Jul 2008 Logs export
Aug 2008 Batch write/delete
Oct 2008 HTTPS support
Dec 2008 Status dashboard, quota details
Feb 2009 Billing, larger files
Apr 2009 Java launch, DB import, cron support, SDC
May 2009 Key-only queries
Jun 2009 Task queues
Aug 2009 Kindless queries
Sep 2009 XMPP
Oct 2009 Incoming email
Dec 2009 Blobstore
Feb 2010 Datastore cursors, Appstats, Async UrlFetch
Two+ years in review
Monday, June 13, 2011
![Page 19: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/19.jpg)
Jun 2010 Python Precompilation, raised Task Queue limitsAug 2010 Multitenancy
Oct 2010 Datastore Admin, query improvements
Dec 2010 Always on, Channel API, Task queue out of labs
Jan 2011 High Replication Datastore, datastore copy
Feb 2011 XMPP Presence, programmatic Task Queue deletions
Mar 2011 Files API, Prospective Search, Testbed API
May 2011 Backends, Pull Queues, massive bugfix release
Mar 2010 Read policies, IPv6
May 2010 OpenID, OAuth, Bulkloader
Two+ years in review
Monday, June 13, 2011
![Page 20: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/20.jpg)
App Engine Roadmap
http://code.google.com/appengine/docs/roadmap.html
• App Engine out of Preview• SSL access on custom domains• Full-text search over Datastore• Support for Python 2.7• Support for running MapReduce jobs across App Engine datasets• Bulk Datastore Import and Export tool• Improved monitoring and alerting of application serving• Logging system improvements to remove limits on size and storage• Integration with Google Storage for Developers
Monday, June 13, 2011
![Page 21: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/21.jpg)
• Strongly consistent, multi-datastore, multi-data center serving solution
• Write once, have your data be available in a highly consistent manner
• No data loss, no datastore outages
High Replication
Monday, June 13, 2011
![Page 22: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/22.jpg)
Leaving preview ...
• Pricing changes towards a sustainable model
• Guarantee that Google is investing in long term future of App Engine
• Premium support available
Monday, June 13, 2011
![Page 23: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/23.jpg)
• Go with most features intact on App Engine
• Goroutines
• Execution speed!
Go on App Engine
Monday, June 13, 2011
![Page 24: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/24.jpg)
Why Go?
• Fast, modern language
• Strongly typed, very flexible interfaces
• Functions as first class objects
• Ridiculously fast compilation times
• Concurrency baked in
• Tooling
Monday, June 13, 2011
![Page 25: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/25.jpg)
Fast, modern languages
• Standard library: JSON, websockets, web server; more
• Garbage collection
• Multiple return values
• Unicode
Monday, June 13, 2011
![Page 26: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/26.jpg)
Strongly typed
• ... but feels like a dynamic languages
• // Combo statement - We can infer type here, so no Java style type declaration redundancy
s := “This is a String”
Monday, June 13, 2011
![Page 27: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/27.jpg)
Flexible interfaces// This is an interface declarationtype myInterface interface { set(i int)}
// This is a Type declaration. Note that it is a type, not a classtype myType struct { i int }
// This is how we define a function where myType is a receiver// With an instance of myType we can call myType.set(123)func (p *myType) set(i int) { p.i = i }
// Because myType defines a function with the signature set(int i) method, // we can use it anywhere myInterface is accepted!func setToThousand(x myInterface) { myInterface.set(1000)}
Monday, June 13, 2011
![Page 28: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/28.jpg)
First class functionspackage main import "fmt"
// Make a function that returns a new functionfunc makeAdd(increment int) (counter func(int) int) { return func(v int) int { return v + increment; } }
func main() { fmt.Printf("value of makeAdd(100)(1) is %v\n", makeAdd(100)(1)); fmt.Printf("value of makeAdd(200)(2) is %v\n", makeAdd(200)(2)); }
// Outputs:// value of makeAdd(100)(1) is 101// value of makeAdd(200)(2) is 202
Monday, June 13, 2011
![Page 29: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/29.jpg)
Concurrency baked in
• goroutines - prefix a go in front of a method and it will run concurrently! Similar to appending & in *nix systems
• channels - blocking or buffered queues for cross process communication
Monday, June 13, 2011
![Page 30: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/30.jpg)
Goroutines and Channels
package main import ( "fmt" "time")
func doLotsOfWork(until int, ch chan int) { c := 0 for i := 0; i < until; i++ { c += i time.Sleep(1000) } ch <- c }
func main() { ch := make(chan int) // First the work off into the background go doLotsOfWork(5, ch) // Do more work here while we wait for this process to complete // Block until doLotsOfWork sends data back on this channel i := <- ch fmt.Printf("Final value: %v\n", i)}
Monday, June 13, 2011
![Page 31: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/31.jpg)
It runs on App Engine!
• Currently requires whitelisting
• Experimental status
• Goroutines allow for concurrency within request; concurrent requests coming
• Demo app: http://moustach-io.appspot.com/
• Source: https://code.google.com/p/appengine-go/source/browse/example/
Monday, June 13, 2011
![Page 32: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/32.jpg)
Mustachio
Monday, June 13, 2011
![Page 33: 2011 June - Singapore GTUG presentation. App Engine program update + intro to Go](https://reader034.vdocuments.net/reader034/viewer/2022051817/54881aecb4af9fbd5d8b50e3/html5/thumbnails/33.jpg)
Summary
• Lots has been going on with App Engine!
• Lots more on the way
• Go (golang.org) - worth a look
Monday, June 13, 2011