Docsity

Scalability Lecture: Understanding Cloud Computing and Server Instances, Study notes of Computer Science

Toggle sidebar
bg1
So far, we've constructed cloud applications according
to a (so far) unjustified set of "commandments: "
ā—‹
Thou shalt write thy client to contact only one
designated (logical) server.
a.
Thou shalt store all persistent data in distributed
objects, not on the server or client!
b.
Thou shalt exchange information with other
application instances only through use of distributed
objects, and not via direct communications between
instances.
c.
Thou shalt use strong consistency of the distributed
datastore to insure that application instances see the
same view of data.
d.
Scalability
Wednesday, February 03, 2010
3:59 PM
Scalability Page 1
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e

Partial preview of the text

Download Scalability Lecture: Understanding Cloud Computing and Server Instances and more Study notes Computer Science in PDF only on Docsity!

So far, we've constructed cloud applications according to a (so far) unjustified set of " commandments : "

Thou shalt write thy client to contact only one designated (logical) server. a. Thou shalt store all persistent data in distributed objects , not on the server or client! b. Thou shalt exchange information with other application instances only through use of distributed objects, and not via direct communications between instances. c. Thou shalt use strong consistency of the distributed datastore to insure that application instances see the same view of data. d. The commandments of cloud computing Scalability Wednesday, February 03, 2010 3:59 PM Docsity.com

So far, you've been taught to write killer apps through killer programs of high complexity. The lesson of the cloud: simple programs always win. I will emphasize how to fit a program into the cloud, by simple application of internally complex black boxes. This means: the real complexity of programming the cloud is in dealing with complex interfaces. Basic theme of this lecture Wednesday, February 09, 2011 4:33 PM Docsity.com

An application is the combination of client-side and server-side code that results from a project. A server is a physical or virtual machine that runs applications. A service is a specific mechanism for responding to requests from within an application. Some vocabulary Some vocabulary Thursday, February 04, 2010 3:29 PM Docsity.com

… and a machine that follows the blueprint. A blueprint for a server … and a running application that follows the blueprint. An application as a blueprint for execution … and a running service that has that behavior. A service as a blueprint for behavior We want to be able to distinguish between Alas, this language is inadequate Inadequacies of language Thursday, February 04, 2010 3:40 PM Docsity.com

A server (class, configuration) is a blueprint for building a server. A server instance is a machine built (deployed) to those specifications. An application (class, deployable) is a blueprint for interactions with the cloud. An application instance is an executing (deployed) program that satisfies that blueprint. A service (class) is a blueprint for behavior in responding to clients. A service instance is a running (deployed) service that satisfies that blueprint. Objects and instances Objects and instances Thursday, February 04, 2010 3:44 PM Docsity.com

An application is deployed as a set of application i nstances. Each application instance is assigned to and executes on a (unique) server instance. Each application instance consists of one or more service instances, e.g., google AppEngine servlets. Deployment, objects, and instances Deployment, objects, and instances Thursday, February 04, 2010 1:56 PM Docsity.com

An application is like a program: it has the potential to run and provide services. It is also like a class, in the sense that it has predefined properties. An application instance is analogous to a running program (process) ; it is providing services. It has the character of a class instance. Applications versus application instances Applications versus application instances Thursday, February 04, 2010 3:06 PM Docsity.com

A server class refers to a blueprint for configuration of hardware and software, while A server instance is a machine configured according to that blueprint. A machine becomes a server instance by conforming to requirements for the instance. There is an analogous relationship between server classes and server instances (End of lecture on 2/7/2011) Server versus server instance Thursday, February 04, 2010 3:19 PM Docsity.com

Church's thesis Undecidability Any graduate of Comp170 knows that there are computer programs "complex enough" that the only way to generate their output is to execute them. E.g., due to State machine Pushdown automaton (state machine with a stack) Comp170 also demonstrates that simpler programs can be analyzed and implemented flexibly, e.g., by a Aside: Turing computability and the cloud Aside: Turing computability and the cloud Wednesday, February 09, 2011 3:35 PM Docsity.com

You might think that I'm going to teach you how to write very complex programs in the cloud. In fact, I'm going to do the exact opposite: to show you how to keep programs simple by employing powerful abstractions. The ideal cloud program is -- at some level -- conceptually a finite state machine (or, at worst, a pushdown automaton). More complex program features are compartmentalized, interfaced, documented, and the internal details forgotten. This will lead us -- eventually -- to Event/Condition/Action (ECA) programming Complexity and the cloud Aside: Turing computability continued Wednesday, February 09, 2011 3:40 PM Docsity.com

No matter how much money you spend, a single server has a "speed limit" that doubles according to Moore's law every two years. Unfortunately, the number of potential users of a service can easily grow beyond the capacity of one server. One solution: horizontal (edge) scaling. Limits of a single server Edge scaling. Core scaling. Network scaling. Different kinds of scaling work independently. Limits of a single server Thursday, February 04, 2010 4:40 PM Docsity.com

Deploy several application instances of the same application. Deploy a service switch that chooses which instance to use. "Horizontal scaling" means using peers of a server at the same level. "Vertical scaling" means using a hierarchy of servers. "Core scaling" means expanding the infrastructure of the cloud itself. Horizontal (edge) scaling Horizontal scaling Thursday, February 04, 2010 3:07 PM Docsity.com

Service switch serves as gateway to N servers, all identical. Each of N servers has the same view of the cloud. Incoming requests are forwarded to the " least busy server" Also sometimes called load balancing. The simplest form of horizontal scaling The simplest form of horizontal scalability Thursday, February 04, 2010 1:38 PM Docsity.com

Switching time is negligible. Datastore behavior dominates server behavior. If the servers are not too busy, service request time stays roughly the same as for one server, because Switching time is still negligible. Response time = datastore response time + service response time. As servers become busy, their computation time becomes a bottleneck resource. What does horizontal scaling do? What does horizontal scaling do? Monday, February 08, 2010 12:47 PM Docsity.com