Reliable Distributed Systems

Slides:



Advertisements
Similar presentations
The Challenges of CORBA Security It is important to understand that [CORBAsecurity] is only a (powerful) security toolbox and not the solution to all security.
Advertisements

Two phase commit. Failures in a distributed system Consistency requires agreement among multiple servers –Is transaction X committed? –Have all servers.
TRANSACTION PROCESSING SYSTEM ROHIT KHOKHER. TRANSACTION RECOVERY TRANSACTION RECOVERY TRANSACTION STATES SERIALIZABILITY CONFLICT SERIALIZABILITY VIEW.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 9 Distributed Systems Architectures Slide 1 1 Chapter 9 Distributed Systems Architectures.
Distributed Databases John Ortiz. Lecture 24Distributed Databases2  Distributed Database (DDB) is a collection of interrelated databases interconnected.
1 CSIS 7102 Spring 2004 Lecture 8: Recovery (overview) Dr. King-Ip Lin.
CS-550: Distributed File Systems [SiS]1 Resource Management in Distributed Systems: Distributed File Systems.
Adding scalability to legacy PHP web applications Overview Mario A. Valdez-Ramirez.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 16 – Intro. to Transactions.
Lecture 2 Page 1 CS 236, Spring 2008 Security Principles and Policies CS 236 On-Line MS Program Networks and Systems Security Peter Reiher Spring, 2008.
CMPT Dr. Alexandra Fedorova Lecture X: Transactions.
Distributed Databases Logical next step in geographically dispersed organisations goal is to provide location transparency starting point = a set of decentralised.
Distributed Systems 2006 Styles of Client/Server Computing.
Distributed Systems Architectures
CS 582 / CMPE 481 Distributed Systems
From Class Diagrams to Databases. So far we have considered “objects” Objects have attributes Objects have operations Attributes are the things you record.
Transaction Processing IS698 Min Song. 2 What is a Transaction?  When an event in the real world changes the state of the enterprise, a transaction is.
EEC-681/781 Distributed Computing Systems Lecture 3 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
The Architecture of Transaction Processing Systems
CS514: Intermediate Course in Operating Systems Professor Ken Birman Ben Atkin: TA Lecture 6: Sept. 12.
1 More on Distributed Coordination. 2 Who’s in charge? Let’s have an Election. Many algorithms require a coordinator. What happens when the coordinator.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 7: Planning a DNS Strategy.
PRASHANTHI NARAYAN NETTEM.
SM3121 Software Technology Mark Green School of Creative Media.
Lecture 8 Epidemic communication, Server implementation.
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Distributed File Systems Concepts & Overview. Goals and Criteria Goal: present to a user a coherent, efficient, and manageable system for long-term data.
Transactions and Reliability. File system components Disk management Naming Reliability  What are the reliability issues in file systems? Security.
Distributed Deadlocks and Transaction Recovery.
For more notes and topics visit:
Day 10 Hardware Fault Tolerance RAID. High availability All servers should be on UPSs –2 Types Smart UPS –Serial cable connects from UPS to computer.
Distributed Systems Principles and Paradigms Chapter 10 Distributed File Systems 01 Introduction 02 Communication 03 Processes 04 Naming 05 Synchronization.
Networked File System CS Introduction to Operating Systems.
DBSQL 7-1 Copyright © Genetic Computer School 2009 Chapter 7 Transaction Management, Database Security and Recovery.
Lecture On Database Analysis and Design By- Jesmin Akhter Lecturer, IIT, Jahangirnagar University.
Scalability Terminology: Farms, Clones, Partitions, and Packs: RACS and RAPS Bill Devlin, Jim Cray, Bill Laing, George Spix Microsoft Research Dec
COM vs. CORBA Computer Science at Azusa Pacific University September 19, 2015 Azusa Pacific University, Azusa, CA 91702, Tel: (800) Department.
Distributed File Systems
DCE (distributed computing environment) DCE (distributed computing environment)
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
Csi315csi315 Client/Server Models. Client/Server Environment LAN or WAN Server Data Berson, Fig 1.4, p.8 clients network.
Unit – I CLIENT / SERVER ARCHITECTURE. Unit Structure  Evolution of Client/Server Architecture  Client/Server Model  Characteristics of Client/Server.
Distributed File Systems Overview  A file system is an abstract data type – an abstraction of a storage device.  A distributed file system is available.
What is a Distributed File System?? Allows transparent access to remote files over a network. Examples: Network File System (NFS) by Sun Microsystems.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
Distributed Database Systems Overview
Personal Computer - Stand- Alone Database  Database (or files) reside on a PC - on the hard disk.  Applications run on the same PC and directly access.
MapReduce and GFS. Introduction r To understand Google’s file system let us look at the sort of processing that needs to be done r We will look at MapReduce.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
Darkstar. Darkstar is a Sun research project on massively parallel online games The objective (not yet demonstrated!) is to supply a framework for massively.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
Day12 Network OS. What is an OS? Provides resource management and conflict resolution. –This includes Memory CPU Network Cards.
ITGS Network Architecture. ITGS Network architecture –The way computers are logically organized on a network, and the role each takes. Client/server network.
Replication (1). Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Distributed File Systems 11.2Process SaiRaj Bharath Yalamanchili.
Secure Operating Systems Lesson F: Capability Based Systems.
Introduction to Distributed Databases Yiwei Wu. Introduction A distributed database is a database in which portions of the database are stored on multiple.
Lecture On Introduction (DBMS) By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 16 – Intro. to Transactions.
DISTRIBUTED FILE SYSTEM- ENHANCEMENT AND FURTHER DEVELOPMENT BY:- PALLAWI(10BIT0033)
Whether you decide to use hidden frames or XMLHttp, there are several things you'll need to consider when building an Ajax application. Expanding the role.
Introduction to client/server architecture
Fault Tolerance Distributed Web-based Systems
Chapter 2: Operating-System Structures
Outline Review of Quiz #1 Distributed File Systems 4/20/2019 COP5611.
Database System Architectures
Security Principles and Policies CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Chapter 2: Operating-System Structures
Presentation transcript:

Reliable Distributed Systems Stateless and Stateful Client-Server Systems

Client-Server Computing 99% of all distributed systems use client-server architectures! This approach underlies CORBA and Web Services Today: look at the client-server problem Discuss stateless and stateful architectures Review major file system and database system issues (will revisit some issues in later lectures)

Client-Server concept Server program is shared by many clients RPC protocol typically used to issue requests Server may manage special data, run on an especially fast platform, or have an especially large disk Client systems handle “front-end” processing and interaction with the human user

Server and its clients

Examples of servers Network file server Database server Network information server Domain name service Microsoft Exchange Kerberos authentication server

Business examples Risk manager for a bank: tracks exposures in various currencies or risk in investments Theoretical price for securities or bonds: traders use this to decide what to buy and what to sell Server for an ATM: decides if your withdrawal will be authorized

Bond pricing example Server receives market trading information, currency data, interest rates data Has a database of all the bonds on the market Client expresses interest in a given bond, or in finding a bond with certain properties Server calculates what that bond (or what each bond) should cost given current conditions

Why use a client-server approach? Pricing parameters are “expensive” (in terms of computing resources) to obtain: must monitor many data sources and precompute many time-value of money projections for each bond Computing demands may be extreme: demands a very high performance machine Database of bonds is huge: large storage, more precomputation

On client side Need a lot of CPU and graphics power to display the data and interact with the user Dedicated computation provides snappy response time and powerful decision making aids Can “cache” or “save” results of old computations so that if user revisits them, won’t need to reissue identical request to server

Summary of typical split Server deals with bulk data storage, high perf. computation, collecting huge amounts of background data that may be useful to any of several clients Client deals with the “attractive” display, quick interaction times Use of caching to speed response time

Statefulness issues Client-server system is stateless if: Client is independently responsible for its actions, server doesn’t track set of clients or ensure that cached data stays up to date Client-server system is stateful if: Server tracks its clients, takes actions to keep their cached states “current”. Client can trust its cached data.

Best known examples? The UNIX NFS file system is stateless. Bill Joy: “Once they replaced my file server during the evening while my machine was idle. The next day I resumed work right where I had left off, and didn’t even notice the change!” Database systems are usually stateful: Client reads database of available seats on plane, information stays valid during transaction

Typical issues in design Client is generally simpler than server: may be single-threaded, can wait for reply to RPC’s Server is generally multithreaded, designed to achieve extremely high concurrency and throughput. Much harder to develop Reliability issue: if server goes down, all its clients may be “stuck”. Usually addressed with some form of backup or replication.

Use of caching In stateless architectures, cache is responsibility of the client. Client decides to remember results of queries and reuse them. Example: caching Web proxies, the NFS client-side cache. In stateful architectures, cache is owned by server. Server uses “callbacks” to its clients to inform them if cached data changes, becomes invalid. Cache is “shared state” between them.

Butler Lampson’s advice Cache “hints” Speed up system when hint is correct Some mechanism can detect when hint is wrong and seek more up to date information If cached data is viewed as hints, relationship of client and server can be stateless Example: information about location of a mailbox: if hint is wrong, can run more costly protocol

Butler Lampson’s advice Application Name Server Cache Object was moved Hint became stale

Example of stateless approach NFS is stateless: clients obtain “vnodes” when opening files; server hands out vnodes but treats each operation as a separate event NFS trusts: vnode information, user’s claimed machine id, user’s claim uid Client uses write-through caching policy

... example issues raised Cache may be stale if someone writes the file after it is opened Create operation may fail with error EEXISTS if server is not responsive at instant when the create is issued

Example of stateful approach Transactional software structure: Data manager holds database Transaction manager does begin op1 op2 ... opn commit Transaction can also abort; abort is default on failure Transaction on database system: Atomic: all or nothing effects Concurrent: can run many transactions at same time Independent: concurrent transactions don’t interfere Durable: once committed, results are persistent

Comments on transactions Well matched to database applications Requires special programming style Typically, spits operations into read and update categories. Transactional architecture can distinguish these Idea is to run transactions concurrently but to make it look as if they ran one by one in some sequential (serial) order

Why are transactions stateful? Client knows what updates it has done, what locks it holds. Database knows this too Client and database share the guarantees of the model. See consistent states Approach is free of the inconsistencies and potential errors observed in NFS

Tradeoffs… When we build a reliable application we need to start by asking what reliability goals we have in mind Then can try to map them to a stateless client-server paradigm, or a transactional paradigm Sometimes this won’t work – some applications need more – but in such cases there are other ways to implement the needed functions Each approach brings advantages and disadvantages and we are often forced to make tradeoffs

Examples of tradeoffs? Stateless approaches are easier to build but we know much less about the state in which the system may find itself after a crash Transactional approaches are well supported but really assume a database style of application (data lives “in” the database) Other mechanisms we’ll explore often force us to implement hand-crafted solutions in our applications and depart from the platform architectural standards (or go “beyond” them). Companies hesitate when faced with such options because they are costly to support

What would be an example that goes beyond limits? Suppose that we want to build a highly available service that replicates data Clients can talk to any of its members The servers run some protocol to keep multiple copies “fresh” and consistent Transactions “can” support this but normally don’t… an issue of performance (and we’ll see where it comes from) So if we actually need this… we have to roll our own

Performance: the monster in the closet Often, the hidden but huge issue is that we want high performance After all, a slow system costs more to operate and may drive users crazy! The issue is that some techniques seem simple and seem to do the trick but are as much as thousands of times slower than other alternatives Forcing us to use those alternatives... And perhaps driving us away from what the platforms support

Market failures In fact, many researchers and developers see reliability in the broad sense as victim of a market failure This means that we know how to solve the problem, but Major platform vendors don’t believe the market will pay for the solutions A chicken and egg issue: with a solution, you could use it, and your use would contribute to a market. But lacking a solution of course there is no market…

Why do vendors see this? They cite failures in the 1980’s High reliability platforms were costly to build and tricky to use, and only customers with very stringent needs opted for them So the broader market – the 80% solution – went with less flexible, limited solutions Companies that build platforms, like HP and IBM and Microsoft, learned the lesson and decided to aim for the 80% sweet spot

Could this change? As network systems continue to expand and mature They are getting much larger, hence we need to automate reliability and repair And they are facing bigger load bursts, forcing us to think more about replication And operators of big commercial sites are seeking to offer better guarantees of response time, availability, etc All of this is creating a new market pressure for richer reliability options

How we’ll handle this Our course can’t just sit and wait a decade for commercial solutions to appear So we’ll learn what the existing platforms offer, but also will learn how one could implement other properties Ideally, someday, these mechanisms will be part of the platforms But meanwhile, you’ll be able to hack up your solution in a way that is “compatible” with the standards even if not “standard”, strictly speaking