Upload
sergeylerg
View
558
Download
2
Embed Size (px)
DESCRIPTION
Google App Engine - отличное решение для масштабируемых веб-приложений. Используется как крупными компаниями, так и любителями. А язык Go является наиболее эффективным для этой платформы (другие поддерживаемые языки: Java, PHP и Python). Доклад посвящен языку Go и особенностям его использования на Google App Engine.
Citation preview
Go на Google App Engine
Сергей Лалов - @SergeyLerg
spiralcodestudio.com
Кто я вообще такой?
• C -> PHP -> Python -> Lua + Go
• Corona SDK
• Google App Engine
• Зачем?
Краткий экскурс
• RBaaS - Rusty Bucket as a Setup
• IaaS - Infrastructure as a Service
• PaaS - Platform as a Service
• SaaS - Software as a Service
• (M)BaaS - (Mobile) Backend as a Service
БОЛЬШЕ АБСТРАКЦИЙ!
PaaS
• AWS Elastic
• Heroku
• Google App Engine
• Великая грусть сисадмина
Google App Engine
• Распределенность
• Масштабируемость
• Высокая надежность
• Удобство работы
• Низкая стоимость
• Бесплатные квоты
Google App Engine
• Python, Java, Go, PHP
• Sandbox
• Datastore
• Blobstore
• CloudSQL
Services
• Channel
• Log
• OAuth
• Search
• Sockets
• Users
• XMPP
• ...
Why Go?
Go is Awesome
Why Go?
Go is AWESOME!!11
Why Go?
• 2007, 2009, 2011
• Компилируемый
• Статическая типизация
• Конкурентный (pun intended)
• GC
• Fun
Go на Google App Engine
• Самый ресурсо эффективный
• Легко использовать
• Соответствует идеологии масштабируемых систем
• goapp serve
• goapp deploy
• my-app-id.appspot.com
• HTTPS бесплатно
Go
• Go Lite IDE
• Export
• Interface
• OOP
• go fmt
• Ниже вероятность ошибок
Hello, Engine
package hello12345
import (
"fmt"
"net/http"
)
func init() {
http.HandleFunc("/", handler)
}
func handler(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Hello, Engine!")
}
app.yaml
application: hello12345
version: 1
runtime: go
api_version: go1
handlers:
- url: /.*
script: _go_app
Модульность
application: penguin-daycare-simulator
module: default
version: 1
runtime: go
api_version: go1
automatic_scaling:
max_concurrent_requests: 500
handlers:
- url: /.*
script: _go_app
Penguin Daycare Simulator
• Go (Google App Engine) + Lua (Corona SDK)
• http://habrahabr.ru/post/220031/
Спасибо за внимание!
• @SergeyLerg
• http://github.com/Lerg