Distributed & Cloud Computing Test 2 Study Guide

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Common Architectures. Know how the book defines an architectural style. Be able to name the styles listed as typical in the book as most important for distributed systems.

Architectural Style - a style formulated in terms of components, the way that components are connected to each other, the data exchanged between components, and finally how these elements are jointly configured into a system. Four most typical architectures: -Layered Architectures -Object-based Architectures -Resource-centered Architectures -Event-based Architectures

Be able to describe why BitTorrent is a hybrid distributed system. (has p2p and client/server)

BitTorrent is a p2p file downloading system that also uses a tracker, which is a server that keeps track of active nodes that includes part of the requested file.

Be able to describe the terms component, interface, and connector.

Component - a modular unit with well-defined required and provided interfaces that is replaceable within its environment. Interface - a shared boundary which two or more separate components of a computer system exchange information Connector - a mechanism that mediates communication, coordination, or cooperation among components

Be able to describe how a protocol works in a layered architecture.

In communication-protocol stacks, each layer implements one or several communication services allowing data to be sent from a destination to one or several targets. Each layer offers an interface specifying that functions that can be called. The interface should completely hide the actual implementation. Communication Protocol - describes the rules that parties will follow in order to exchange information

Be able to describe a layered architecture and its benefits (why layered architectures are useful for system design). Know what an upcall is, and know what a downcall is. Know what pure and mixed layering are.

Layered Architecture - components are organized in a layered fashion where a component at layer Lj can make a downcall to a component at lower-level layer Li (i < j) and generally expects a response. Only in exceptional cases will an upcall be made to higher level-components. Pure Layering - standard organization in which only downcalls to the next lower layer are made. Mixed Layering - only downcalls, and libraries are included as additional layers, not necessarily connected to every component

Know the typical layers of an application, and know their purpose. Be able to give an example, and identify the layers of the components of an applications. Know the term persistence.

Layers of an Application: -The application-interface level -contains units for interfacing to users or external applications -The processing level -middleware that contains the core functions of an application -The data level -contains the data that a client wants to manipulate through the application. Often persistent. Ex. Internet search engine, decision support system for stock brokerage Persistence - even if no application is running, data will be stored somewhere for next use.

Understand how a non-threaded server must be written. Also be able to describe the strengths and weaknesses of writing a non-threaded server.

Non-threaded server: -Finite state machine (one thread) -Uses non-blocking IO calls -Must record state of where it is in processing a request -As messages come in they get processed, and this causes transitions from one state to the next Pros: -Achieves high performance through parallelism -No context switching Con: -Uses non-blocking calls, which is generally hard to program and maintain

Be able to describe object-based architectures. Know what a distributed, or remote, object is, and know the advantages of distributed objects. Know what a stub, or proxy, is, and know what a skeleton is.

Object-based Architectures - each object corresponds to what we have defined as a component, and these components are connected through a procedure call mechanism. Provides a natural way to encapsulate an object's state and methods. Pros: An object is completely independent of its environment, making it replaceable. Distributed object - When an interface is placed on a separate machine from the object. Stub/Proxy - an implementation of an object's interface, that is loaded into the client's address space when a client bonds to a distributed object. It marshals method invocations into messages and unmarshals reply messages to return the result of the method invocation of the client. Skeleton - a server-side stub that provides the bare means for letting the server middleware access the user-defined objects

Know how request dispatching works for server clusters. In particular, know how packet rewriting and TCP handoff works.

Packet Rewriting - a router can decide to hand packets off to different servers TCP handoff - router delegates work to server. Server rewrites source address and talks to client directly.

Be able to compare and contrast a process virtual machine and native virtual machine monitor.

Process Virtual Machine - Runtime system that provides an abstract instruction set that is used for executing applications. Virtualization is only for a single process. (ex. the Java runtime environment) Native Virtual Machine Monitor - provide a system that is implemented as a layer shielding the original hardware, but offering the complete instruction set of that same (or other) hardware as an interface. (ex. Virtualbox)

Be able to describe Publish-subscribe architectures. Know the terms referential coupling, and temporal coupling. Be able to determine if a protocol is referentially (de)coupled and temporally (de)coupled given a description of the protocol (or give the name of a protocol we have studied). Be able to describe the actions of publishing and subscribing. Know what an event bus is (maps for subscribers). Know what a topic-based publish-subscribe system is.

Publish-Subscribe Architecture - viewing a system as a collection of autonomously operating processes. Coordination encompasses the communication and cooperation between processes. Referential coupling - I have to have exact ID to talk to them Referential decoupling - Don't have to know exact ID (middleware takes care of that) Temporal coupling - Sender and receiver must both be online Temporal decoupling - Sender can send message when receiver is offline, and then receiver can get message the next time it is online Ex. TCP is referentially coupled and temporally coupled Publish-Subscribe - each message has set of attributes/properties and subscribers register certain properties to receive Event Bus - part of the middleware that is responsible for the publish subscribe implantation. Maps properties to subscriber and delivers the messages.

Be able to describe Resource-based architectures. Know what REST is. Know the properties of a restful architecture. Know what stateless execution means. Know the operations that can be performed on REST architectures.

Resource-based architectures - viewing a distributed system as a huge collection of resources that are individually managed by components. Representation State Transfer (REST) - adaptation of resource-based architectures for the Web. Four Key Characteristics of REST: 1. Resources are identified through a single naming scheme 2. All services offer the same interface, consisting of at most four operations 3. Messages sent to or from a service are fully self-described 4. Stateless Execution - After executing an operation at a service, that component forgets everything about the caller Rest Operations: -Put - create a new resource -Get - retrieve the state of a resource in some representation -Delete - delete a resource -Post - modify a resource by transferring a new state

Centralized Systems Architectures - Client Server organizations. Be able to describe and discuss the client-server architecture. In particular, be able to describe the advantages of client-server. Be able to describe the roles of the client and the roles of the server (who establishes a connection, who sends requests, etc).

Server - a process implementing a specific service (ex. a file system service or a database service) Client - a process that requests a service from a server by sending it a request and subsequently waiting for the server's reply This behavior is called request-reply behavior Using a connection-less protocol has the advantage of being efficient but is susceptible to occasional transmission failures. The client cannot detect whether the original reply was lost, or if the transmission of the reply failed. Reliable connection-oriented protocol performs poorly in local-are networks, but works fine in wide-are systems. Before interacting, the client sets up a connection to the server, and the server uses this connection to respond. However, setting up and tearing down a connection is relatively costly.

Be able to describe service-oriented architectures. Know what service composition is. Be able to identify a description of a service-oriented architecture.

Service-oriented architectures - a distributed application or system is essentially constructed as a composition of many different services, and not all of these services may belong to the same administrative organization. Service composition - making sure services operate in harmony. Ex. Using cloud services, web based stores

Centralized Systems Architectures - Multi-tiered organizations. Be able to describe what a multi-tier architecture is, and be able to describe it advantages.

Single-tiered - everything is handled by the server while the client is essentially no more than a dumb terminal, possibly with a graphical interface. Two-tiered - distinction between client and server machines Three-tiered - server may sometimes need to act as a client. Programs that form part of the processing layer are executed by a separate server, but may additionally be partly distributed across the client and server machines.

Know what soft state is. Know what session state is.

Soft state - server promises to maintain state on behalf of the client, but only for a limited time. After the time expires, any information the server kept on account of the associated client is discarded. Session state - associated with a series of operations by a single user and should be maintained for some time, but not indefinitely. Session state is often maintained in three-tiered client-server architectures, where the application server needs to query a database before being able to respond to the requesting client. Stateless servers can be written by stateless protocols by using cookies.

Be able to discuss stateful versus stateless servers. be able to discuss the following: Is HTTP a stateless protocol? Can stateful servers be written using stateless protocols?

Stateful server - protocol keeps information on the state of its clients, and notifies clients when its state is changed. (ex. a file server that allows a client to keep a local copy of a file. The server would maintain a table containing (client, file) entries in order to keep track of clients) Stateless server - protocol does not keep information on the state of its clients, and can change its own state without having to inform any client. (ex. An HTTP web server forgets the client completely once the connection is complete)

Be able to compare and contrast a thin client and a fat client. Given two example clients, be able to identify the thin client/fat client. Know what X and VNC are and why one is a fat client and the other is a thin client. Be able to identify the advantages and disadvantages of both.

Thin-client - client machine used only as a terminal with no need for local storage (ex. in networked user interfaces, everything is processed and stored at the server) Fat-client - contains logic to understand the underlying system. Virtual Network Computing(VNC) - remote frame buffering protocol that just knows how to draw shapes and pixels. -Thin-client. -Good for wide-area network but doesn't know how to handle traffic. -Bad for local-area network (ex. cannot play full motion video) X - understands the operations and behaviors of a windowing system. -Fat-client. -Not good for wide-area network due to chattiness.

Understand why process VM are useful in heterogenous systems.

This is useful because processes can remain ignorant of the migration itself: they need not be interrupted in their execution, not should they experience any problems with used resources. The resources are either migrated along with the process, or the way that the process accesses a resource is left unaffected.

Be able to describe the strengths and weaknesses of user level threads. Know how threads are used in a server (which thread(s) handle connections? Which thread(s) handle requests? ...)

User-level threads - the constructed thread library is executed entirely in user space. Pros: -Cheap to create and destroy threads -Thread context switching can often be done in just a few instructions Con: -deploying the many-to-one threading model: multiple threads are mapped to a single schedulable entity. As a consequence, a blocking system call will immediately block the entire process to which the thread belongs, and all other threads in that process. Multi-threaded Servers: -One thread, the dispatcher, reads incoming requests for a file operation. The requests are sent by clients to a well-known end point for this server. -After examining the request, the server chooses an idle (blocked) worker thread and hands it the request.

Decentralized Systems Architectures - Know the difference between vertical and horizontal distribution and be able to recognize examples of each. Know what a (un)structured peer-to-peer system is, and be able to identify a description of one. Be able to describe flooding and random walk for distributing data in an unstructured decentralized system. You do not have to know the details of a particular random walk algorithm.

Vertical Distribution - achieved by placing logically different components on different machines. Horizontal Distribution - a client or server may be physically split up into logically equivalent parts, but each part is pertaining on its own share of the complete data set, balancing the load. (ex. p2p) Structured p2p systems - nodes (processes) are organized in an overlay that adheres to a specific, deterministic topology: a ring, a binary tree, a grid, etc. Each data item is uniquely associated with a key, and that key is used as an index. Unstructured p2p systems - each node maintains an ad hoc list of neighbors. The resulting overlay resembles a random graph. We result to searching for data. Flooding - Issuing node u passes request for d to all neighbors. Request is ignored when receiving node had seen it before. Otherwise, v searches locally for d (recursively). May be limited by a max number of hops, or Time-To-Live Random Walk - Issuing node u passes request for d to randomly chosen neighbor, v. If v does not have d, it forwards request to one of its randomly chosen neighbors, and so on,

Be able to discuss what virtualization is and why it is important. In particular, be able to discuss hardware independence, portability, and flexibility.

Virtualization deals with extending or replacing an existing interface so as to mimic the behavior of another system. Virtualization Importance: -abstracts away the underlying hardware (ex. legacy software can run on VMs) -portability is a non-issue due to virtualization allowing every machine to look the same -Process migration to load balance allows flexibility

Know what process/code migration is and why it may be desirable. Know what a mobile agent is. Be able to describe the four paradigms in the book for code mobility.

When to migrate code: -Load distribution -Ensuring that servers in a data center are sufficiently loaded (ex. to prevent waste of energy) -Minimizing communication by ensuring that computations are close to where the data is (ex. mobile computing) Mobile agent - small mobile program that moves from site to site. Linear speedup is achieved by exploiting parallelism and making several copies of the mobile agent and sending them to different sites. Four paradigms: -Client-server computing - code, execution state, and resource segment are all located at the server, and after execution, only the execution state at the server is modified. -Remote evaluation - client migrates code to the server where that code is executed and leading to a modification of the execution state at the server -Code-on-demand - receiver-initiated scheme by which the client obtains code from the server with its execution modifying the client-side execution state and operating on the client's resources -Mobile agents - follow a sender-initiated approach, moving code as well as execution state from client to the server, operating on both the client's as well as the server's resources.

Be able to describe why and when process switching occurs when processes communicate. Be able to describe why systems programmers use threads.

When two processes communicate, a message will cross address space boundaries. The process must first make a call to the OS which causes a context switch between the process and kernel. The kernel then pushes the message into the address space of the receiving process. The kernel then causes a context switch between the kernel and the receiving process. Systems programmers may use threads because threads give good scalability due to minimal overhead.

Middleware organization. Know what a wrapper, or adapter, is and what problem it solves. Know what a message broker is and know its purpose. (Middleware that is like an all-encompassing wrapper). Know what an interceptor is. (Can filter requests when they have certain attributes)

Wrapper/Adapter - a special component that offers an interface acceptable to a client application, of which the functions are transformed into those available at the component. Solves the problem of incompatible interfaces. Broker - logically a centralized component that handles all the accesses between different applicatinos Message Broker - Applications send requests to the broker containing information on what they need. The broker then contacts the appropriate applications, possibly combing and transforming the responses and returns the result to the initial application. Because the broker provides offers a single interface to each application, we now need at most O(N) wrapper instead of O(N^2). Interceptor - a software construct that will break the usual flow of control and allow other (application specific) code to be executed. Interceptors are a primary means for adapting middleware to the specific needs of an application.


Kaugnay na mga set ng pag-aaral

Understanding Products and Their Risks 2

View Set

Art 105 practice quiz - Exam 4 review

View Set

Chapter 43: Nursing Care of the Child With an Alteration in Urinary Elimination/Genitourinary Disorder

View Set

RN nursing care of children online practice 2019 B w/NGN

View Set

Christian Ethics Study Guide Test 1

View Set

Assignment 1 Multiple Choice w/o problems

View Set