Google App Engine (GAE) 演進史

GAE是Googler的御用開發工具,從支援Python語言到Java、Go、PHP,Google的服務舉凡Gmail, Drive等等都是開發在GAE上,讓我們探索GAE的演進史以及讓人愛不釋手的功能

Please download to get full document.

View again

of 33
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.


Publish on:

Views: 3 | Pages: 33

Extension: PDF | Download: 0

  • 1. Google App Engine (GAE) 演進史 GAE is one of Google Cloud Platform project for provide full google management application feature... Simon Su / GCPUG.TW co-organizer Cage Chung / GCPUG.TW
  • 2. Google Cloud Platform Already Here
  • 3. [您知道”GCPUG”要怎麼唸嗎?為什麼會有一隻狗在 Logo裡面呢?] Google Cloud Platform User Group的縮寫是GCPUG GCPUG直接唸成G.C.P.U.G?當然可以! 但它也可以分開來,唸成 G.C. PUG喔~ Pug,指的是巴哥犬,所以 GCPUG的Logo中間才會有一隻可愛的巴哥犬喲。 下次聽到別人說G.C. PUG 的時候,您就可以大聲 說:「我也是G.C. PUG社團成員!」
  • 4. 您的Web架構還是這樣嗎?
  • 5. GAE是Googler的御用開發工具 從支援Python語言到 Java、Go、PHP Google的服務舉凡Gmail, Drive等等都是開發在GAE上 今天我們來介紹GAE (Google App Engine)
  • 6. Angry Birds Khan Academy Royal Wedding Snaptchat EA Games Forbes Bestbuy Who is using it?
  • 7. GAE Before Frontend, Backend, Frontend Cache, Memcache, Datastore, TaskQueue…
  • 8. ● Runtimes and framework ● Reliability and Support ● Bulk downloading GAE Features
  • 9. 看GAE如何提供服務 - GAE Architecture Closest Google Data Center Edge Cache Google Frontend App Engine Data Center App Master (App Engine Management Layer) Static Servers App Engine Frontend App Servers Application Instances Application Instances Application Instances Google’s Fiber ISP Memcache GAE User Datastore Task Queues GAE Scheduled Tasks GAE Search API GAE Logs API GAE
  • 10.
  • 11. ● Frontend instance (not App Engine Front End) ○ Dynamically created and deleted = low cost ○ Enforce fast response and stateless design ○ Suitable for processing short-lived requests ● Backend instance ○ Statically created and deleted = higher cost ○ No limit for response time, supports stateful design ○ Suitable for batch processing Frontend Instance vs. Backend Instance
  • 12. Modules dispatch: - url: "*/favicon.ico" module: default - url: "*/notice/*" module: notice - url: "*/waypoints/*" module: optimal-waypoints - url: "*/screenshot/*" module: screenshot - url: "*/google40fc41ccc276e5c5.html" module: ownership - url: "*/*" module: "default" dispatch.yaml Application hierarchy [App Engine Modules in Python](
  • 13. ● Developers have read-only access to the filesystem on App Engine. Applications can use only virtual filesystems, like gae-filestore.[20] ● App Engine can only execute code called from an HTTP request (scheduled background tasks allow for self calling HTTP requests). ● Users may upload arbitrary Python modules, but only if they are pure-Python; C and Pyrex modules are not supported. ● Java applications may only use a subset (The JRE Class White List) of the classes from the JRE standard edition.[21] ● Datastore cannot use inequality filters on more than one entity property per query.[22] ● A process started on the server to answer a request can't last more than 60 seconds (with the 1.4.0 release, this restriction does not apply to background jobs anymore). ● Does not support sticky sessions (a.k.a. session affinity), only replicated sessions are supported including limitation of the amount of data being serialized and time for session serialization. GAE Restrictions[edit]
  • 14. Google joined Cloud @ 2014
  • 15. Cloud Computing Compute PaasIaaS Application Data Runtime Middleware OS Virtualization Servers Storage Networking Application Data Runtime Middleware OS Virtualization Servers Storage Networking Saas Application Data Runtime Middleware OS Virtualization Servers Storage Networking Infrastructure as a Service Platform as a Service Service as a Service You manage Google manage
  • 16. GAE Now Modules, Managed VM, Container integrated
  • 17. Managed VMs App Engine Beta
  • 18. What’s Docker? [什麼是 Docker | 《Docker —— 從入門到實踐》正體中文版](
  • 19. Managed VMs Compute | Managed VMs ● Extension of App Engine ● Use Docker to run containers ● Can Use ○ Google configured containers ○ Custom containers
  • 20. Managed VM
  • 21. Dockerfile app.yaml $ gcloud preview app run $ gcloud preview app deploy gcloud SDK Docker registry container dockerd VM* * A VM running docker
  • 22. Dockerfile FROM google/appengine-python27 # Install pandas RUN apt-get update && apt-get install -y -q --no-install- recommends python-pandas python-numpy # Install Google Map APIs, Google Client Library ADD requirements.txt /app/ RUN pip install --upgrade pip RUN pip install -r requirements.txt ADD . /app Create the App Engine [Managed VMs - App Engine — Google Cloud Platform](
  • 23. application: waldo-gcp module: optimal-waypoints version: 1 runtime: python27 api_version: 1 threadsafe: yes vm: true automatic_scaling: min_num_instances: 1 max_num_instances: 5 cool_down_period_sec: 60 cpu_utilization: target_utilization: 0.5 Create the App Engine | app.yaml application: waldo-gcp module: screenshot version: 1 runtime: custome api_version: 1 threadsafe: yes vm: true resources: cpu: .5 memory_gb: 1.3 manual_scaling: instances: 1 Standard runtime Custom runtime
  • 24. Managed VM Standard Runtime vs. Custom Runtime
  • 25. Behind the scenes gcloud deploy gcloud build Your awesome docker images your laptop Google App Engine Your awesome docker images docker container private Google Cloud Storage bucket update start Google Compute Engine Instance using google/docker-registry container docker run using google/docker-registry container docker push docker pull
  • 26. App Engine for Docker Simple to manage Private Registry bucket APIs and SDK Loadbalancing Autoscaling Use any library Run any code Transparency New runtimes, build your own Docker for App Engine
  • 27. GAE Other Features App Engine APIs, Cloud Endpoint, Project generator...
  • 28. ● Storage ○ Cloud Storage ○ Cloud SQL ○ Cloud Datastore ● Memcache ● Task Queue ● Cloud Endpoints App Engine APIs Find more
  • 29. Cloud Endpoint
  • 30. Getting Started # 安裝 gcloud SDK $ curl | bash # 更新 gcloud SDK $ gcloud components update Find more
  • 31. Project Generator npm install -g yo npm install -g generator-py-gae mkdir your-project && cd your-project yo py-gae . update .
  • 32. GAE webapp2 starter # clone repo from github $ git clone # install pip packages $ pip -r requirements.txt -t lib # install bower packages $ bower install # install npm packages $ npm install # build assets resources $ gulp [GAE webapp2 starter](
  • 33. Thanks you!
  • Related Search
    We Need Your Support
    Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

    Thanks to everyone for your continued support.

    No, Thanks