開放原始碼 ch2.2 app - oss - google client api & app engine(ver 1.0)
DESCRIPTION
TRANSCRIPT
1
專案管理軟體–管理與實務 (開放原始碼) O P E N S O U RC E S O FT WA R E
-Google Client API-Google App Engine
CH 2
2
AGENDA
• Google Client API• Google App Engine
3
GOOGLE CLIENT API
• Google Console 管理平台• https-://code.google.com/apis/console
• 需先註冊 Gmail 帳號 (Google 帳號 )
4
GOOGLE CLIENT APIGOOGLE CONSOLE
• 登入 Google Console 管理平台
5
GOOGLE CLIENT APIGOOGLE CONSOLE
6
GOOGLE CLIENT APIGOOGLE CONSOLE
• 註冊專用 KEY• http://code.google.com/intl/zh/apis/loader/
7
GOOGLE CLIENT APIGOOGLE CONSOLE
• 註冊成功網頁
8
GOOGLE CLIENT APIGOOGLE CONSOLE
9
GOOGLE CLIENT APIGOOGLE CONSOLE
10
GOOGLE CLIENT API偵測語系
• https://www.googleapis.com/language/translate/v2/detect?q=我愛中文&pp=1&key={key}
{data: -{
detections: -[
-[
-{
language: "zh-TW"isReliable: falseconfidence: 0.19649315
}]
]}}
11
GOOGLE CLIENT API
• google-api-java-client• http://code.google.com/p/google-api-java-client/
• Supports these Java environments:• Java 5 (or higher) standard (SE) and enterprise (EE)• Android 1.5 (or higher• Google App Engine
12
GOOGLE CLIENT API
• 安裝程式庫• 相依套件• Apache HTTP Client version 4.0.3• Google Guava version r09• Jackson version 1.6.7• Google GSON version 1.6
13
GOOGLE CLIENT APIYOUTUBE
• 撈取指定人名下的清單• 採用 Data API Protocol• 參考 API: API Query Parameters
https://gdata.youtube.com/feeds/api/videos?q=football+-soccer &orderby=published &start-index=11 &max-results=10 &v=2
14
GOOGLE CLIENT APIYOUTUBE- 申請 DEVELOPER KEY
• 申請 developer key• http://code.google.com/apis/youtube/dashboard
• http://code.google.com/intl/zh/apis/youtube/overview.html
15
GOOGLE CLIENT APIYOUTUBE
• DEMO• 抓取 wenhsiaoyi 名下 20 部影片清單。
16
GOOGLE APP ENGINE
• 開發主機應用系統• 利用雲端特性• 快速部署• 負載平衡• 服務不中斷• 擴展性• 與硬體無關• 版本管理
• 基於 Google 雲端系統優勢• Google 平台大量支援與資源
17
GOOGLE APP ENGINE
• GAE 管理介面• https://appengine.google.com/
• App Engine SDK 開發程式庫• http://code.google.com/intl/zh/appengine/
18
GOOGLE APP ENGINEGAE 管理介面
• 價格• http://
www.google.com/enterprise/cloud/appengine/pricing.html
• 按需計價• 成本上限控制• 完整管理平台
19
GOOGLE APP ENGINEGAE 管理介面
• 最多可以建立 10 個應用系統• 應用系統名稱不可以重複
20
GOOGLE APP ENGINEGAE 管理介面
• 提供管理儀表板• 分析圖表• 資源使用狀況• Log 檢視• 版本管理• 排程管理• 配額使用分析• 資料使用管理
21
GOOGLE APP ENGINEGAE 管理介面
• 管理平台 DEMO
22
GOOGLE APP ENGINEAPP ENGINE SDK
• 支援 JAVA 、 PYTHON 、 GO• JAVA• 支援大部分框架 ( 部分限制 )• 支援 JSP• 支援 HTML• 支援 JAVASCRIPT
• 不支援傳統關聯式資料庫• 禁用 JDBC 連線• 採用 Datastore 來存放資料
23
GOOGLE APP ENGINEAPP ENGINE SDK
• 下載 SDK• http://code.google.com/intl/zh/appengine/downloads.html
• 安裝 Eclipse 外掛 - Google Plugin for Eclipse• JAVA 官方文件• http://
code.google.com/intl/zh/appengine/docs/java/overview.html
• 提供繁體中文
24
GOOGLE APP ENGINEAPP ENGINE SDK
• 建立 AppEngine 專案
25
GOOGLE APP ENGINEAPP ENGINE SDK
• 設定 AppEngine 部署資料
26
GOOGLE APP ENGINEAPP ENGINE SDK
• 部署到 Google
27
GOOGLE APP ENGINEAPP ENGINE SDK
• 部署前設定版本
28
GOOGLE APP ENGINEAPP ENGINE SDK
• 開始部署
29
GOOGLE APP ENGINEAPP ENGINE SDK
30
GOOGLE APP ENGINEAPP ENGINE SDK
• 運作即時狀況
31
GOOGLE APP ENGINEAPP ENGINE SDK
• DEMO
32
APP ENGINE 1.5.5 SDK RELEASE
• Overall Changes• Request Duration: The frontend request deadline has
been increased from 30 seconds to 60 seconds. We’ve increased the maximum URLFetch deadline to match from 10 seconds to 60 seconds.
• File limits: We’ve increased the number of files you can upload with your application from 3,000 to 10,000 files, and the file size limit has also been increased from 10MB to 32MB.
• API Limits: Post payloads for URLFetches are now capped at 5MB instead of 1MB.