Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cloud Operating System Unit 11 Sever Technology II M. C. Chiang Department of Computer Science and Engineering National Sun Yat-sen University Kaohsiung,

Similar presentations


Presentation on theme: "Cloud Operating System Unit 11 Sever Technology II M. C. Chiang Department of Computer Science and Engineering National Sun Yat-sen University Kaohsiung,"— Presentation transcript:

1 Cloud Operating System Unit 11 Sever Technology II M. C. Chiang Department of Computer Science and Engineering National Sun Yat-sen University Kaohsiung, Taiwan, ROC Cloud Operating System

2 Outline  Platform as a Service  Case Study  Google App Engine (GAE)  Amazon Web Service (AWS)  Google App Engine Overview  Features of Amazon Web Service  Highly Customization 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-2

3 Platform as a Service  The middle layer between IaaS and SaaS  Provides an ‘platform’ developing softwares.  The platform interacts with cloud infrastructure.  Providers  GoogleAppEngine  Amazon Beanstalk  Windows Azure 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-3

4 Platform as a Service  What should a PaaS do?  Should aware the loading and capacity, and expand or shrink when necessary. Self-service. Rapid elasticity.  Should be easy to control, prevent outgrowing in rush hours. Measured service.  Should be reliable, of course. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-4

5 Case Study: GAE and AWS  Google App Engine  Initial release: Apri 7, 2008  Newest stable release: February 28, 2012  Support Python, Java, Go, and other JVM language  Amazon Web Service - Beanstalk  Initial release: December 1, 2010 AWS release in July 2002  Newest release: March 20, 2012  Support Java, PHP 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-5

6 Google App Engine  Provides an easy way to build and maintain applications.  Based on the global distributed infrastructure.  Be scalable.  Low cost.  Coupled with numerous Google existing applications. (Gmail, Google Docs, etc.) 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-6

7 GAE - Features  Dynamic web serving.  Persistent storage with queries, sorting and transactions.  Scaling and load balancing automatically.  Local development environment.  Task queue.  Scheduled task. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-7

8 GAE - Components  Runtime Environment  DataStore  Services 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-8

9 GAE – Runtime Environments  Runtime Environment  Python Rapid responses to web requests. Supports popular web application frameworks. Works with any application that supports CGI or WSGI.  Java Based on common Java web technology standards. Plugin for Eclipse. Supports other language. (JRuby, JavaScript, Scala)  Go A statically typed, compiled language. Great for CPU-intensive tasks. Huge external libraries support. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-9

10 GAE – DataStore (1)  BigTable  Characteristics Object-oriented Database Information is represented in the form of objects. No JOIN Not a traditional relationship database. Fault Tolerance Many duplications on different servers. Load Balance Server farm. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-10

11 GAE – DataStore (2)  BigTable  Based on Google File System (GFS) Optimization on data add and read. MapReduce A model for data processing on parallel system. “Map” divides the data. “Reduce” integrates the results. Chubby Providing an interface for loosely-coupled distributed system. Data synchronization. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-11

12 GAE – Services (1)  Services  Memcache  Task Queue  Image Manipulation  URL Fetch  Mail  XMPP 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-12

13 GAE – Services (2)  Memcache  Provides a high performance in-memory key-value cache for the applications.  Task Queue  Initiated by the user.  Can also be created by the application to break down the task.  Image Manipulation  Can resize, crop, rotate and flip images 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-13

14 GAE – Services (3)  URL Fetch  For applications to access resources on the internet.  Available for port 80 (http) and port 443 (https).  HTTP redirect limit: 5. (2008)  Mail  For applications to send email messages.  Uses Google infrastructure. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-14

15 GAE – Services (4)  XMPP  XMPP is an instant-messaging protocol, used by Google Talk, Jabber, and other IM networks.  App Engine does not act as an XMPP service itself.  Supported by Python and Java so far.  These (URL Fetch, Mail, XMPP) are the ways for applications to communicate with the outside world. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-15

16 GAE – Sandbox (1)  What is a Sandbox?  Computer Security A mechanism for separating running programs.  Software Development A testing environment for isolating untested code.  How does a Sandbox work?  Cuts a specified block of memory.  Simulates the true environment in the memory.  Records the behaviors of applications. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-16

17 GAE – Sandbox (2)  Some limitations of GAE sandbox.  Applications can only access the internet through the provided services, such as URL Fetch.  Applications can only be connected from outside by making HTTP or HTTPS requests on the standard ports.  Applications can not write to the file system.  Applications can only read files uploaded with the application code.  Applications code only runs in response to a web request, and must respond in 60 seconds. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-17

18 GAE – GQL  A text-based query language which is similar to SQL.  No JOIN.  It’s inefficient when queries span more than one machine.  Instead, GQL has  ReferenceProperty()  key-lists to help to create relationships between entities. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-18

19 GQL – ReferenceProperty() (1)  One-to-many.  Allows disks to fail without the system failing.  Associates an arbitrary number of repeated types of information with a single entity.  For example, how to design a database for users to assign as many phone numbers to each of their contacts as they like? 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-19

20 GQL – ReferenceProperty() (2) class Contact(db.Model): … class PhoneNumber(db.Model): contact = db.ReferenceProperty(Contact, collection_name=‘phone_numbers’) phone_type = db.StringProperty(choices=(‘home’, ‘work’, ‘mobile’, ‘other’)) number = db.PhoneNumberProperty()  If we have a contact named “Kevin” who has a home phone and a work phone, we can populate his contact information like this: kevin = Contact(name=‘Kevin’) kevin.put() PhoneNumber(contact=kevin, phone_type=‘home’, number=‘(07)551-3146’).put() PhoneNumber(contact=kevin, phone_type=‘work’, number=(06)331-2545).put() 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-20

21 GQL – key-lists  Many-to-many.  Allows lots of different objects to share other instances between each other.  For example, we can design a database with the ability for users to organize their contacts into groups. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-21

22 GAE – Request Handling Architecture 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-22

23 GAE – Request Handling Procedure (1)  Load balancer routes the request to one of the frontends.  Frontend determines the applications supplied from the domain name.  According to the configuration, applications tell frontends how to treat the requests based on the URL paths.  Path may map to a static file which should be served to the client directly.  Path may map to a request handler. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-23

24 GAE – Request Handling Procedure (2)  URL path match conditions  No Match HTTP 404  Match the path of one of the applications static files Frontend routes the request to the static file servers.  Match a pattern mapped to one of the application’s request handlers Frontend sends the request to the application server. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-24

25 GAE – APIs Overview (1)  Backends  Allow application author to retrieve information about backend servers.  Storing Data  Provides persistent storage for App Engine applications.  Can be used directly or via the provided JDO or JPA interfaces.  Does operations like get, put, delete, query to the entities. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-25

26 GAE – APIs Overview (2)  Data Processing (Python)  MapReduce In experimental. Developed by Google. A computing model to do efficient distributed computing over large data sets.  Services  APIs for the existing services. App Identity, Blobstore, Capabilities, Channel Conversion, Images, LogService, Mail, Memcache, Multitenancy, Oauth, Prospective Search, Task Queues, URL Fetch, Users, XMPP. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-26

27 GAE – APIs Overview (3)  Tools  Remote API (Java) Helps to access App Engine services from any Java application.  ProtoRPC (Python) In experimental. A simple way to send and receive HTTP-based RPC services. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-27

28 Amazon Web Service  Amazon is the pioneer of Cloud Computing  Fully customization from bottom-up.  Amazon Web Service (AWS) including IaaS and PaaS.  Users should build up the IaaS first, then develop in the PaaS envrironment, Amazon Beanstalk. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-28

29 Amazon Web Service - Components  Amazon Elastic Compute Cloud (EC2)  Provides virtual machine instances.  Can customize instance images.  Amazon Simple Storage Service (S3)  Provides storage. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-29

30 Amazon Web Service - Components  Amazon Relational Database Service (RDS)  Provides database instances. Can select between MySQL and Oracle in many versions and configurations.  Amazon Elastic Beanstalk  The PaaS solution of AWS.  Still in beta.  Other services  Load balancer, monitors, notification, etc.  About 20 services in total. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-30

31 Amazon Web Service  AWS controls  Operating system  Language (Java, PHP)  Middleware stack (tomcat, RDS…) Can be easily extended  Architecture (Web)  Storage  Data center  User controls  Application Code  Selecting the middleware stack (anything except tomcat)  HW configuration  Performance  Limited control over the OS using Linux tools  JVM tuning/configuration 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-31

32 AWS Beanstalk  Main Design goals  Easy to use  Scalable  Development tools  AWS Toolkit for Eclipse For Java development.  AWS DevTools For PHP development. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-32

33 AWS Beanstalk – Components  Application  Not only the codes  Including Versions Environments Environment configurations  Conceptually similar to a folder 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-33

34 AWS Beanstalk – Components  Version  The real deployable code  Labeled with development iteration (so it called version)  Part of application. Applications can have many versions. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-34

35 AWS Beanstalk – Components  Environment  The instance runs deployed version.  Each environment runs only a single version.  Environment Configuration  Record the collection of parameters of an environment.  Such as instance type, auto scaling limits, scaling trigger, database type, system parameters, etc. 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-35

36 AWS Beanstalk – API Overview  Can categorize into 3 types  The Core Utilities API Query, authentication, request/response  The API Interact with other Amazon services AutoScaling, EC2, S3, RDS, etc.  Extensions (2 extensions currently) API that helps create HTML element for uploading file to S3 service PHP native file management function wrappers for S3 service 9/12/2015 Cloud Operating System - Uint 11: Server Technology 2 U11-36


Download ppt "Cloud Operating System Unit 11 Sever Technology II M. C. Chiang Department of Computer Science and Engineering National Sun Yat-sen University Kaohsiung,"

Similar presentations


Ads by Google