state may be replicated and that 網多書面報告 第三組 replicas reside at different locations 陳伯翰 Concurrency Hides the coordination of activities between objects to achieve consistency at a higher level Distributed System: Definition Failure Hides failure and possible recovery of A distributed system is a piece of software Persistence Hides the fact that an object may be that ensures (partly) passivated by the system that: Note: Distribution transparency may be set A collection of independent computers that as a goal, appears to its users as a single coherent but achieving it is a different story. system Degree of Transparency Two aspects: (1) independent computers Observation: Aiming at full distribution and transparency objects (2) single system middleware. may be too much: Local OS Local OS Local OS _ _ Users may be located in different continents; Machine A Machine B Machine C distribution Network is apparent and not something you want Distributed applications to hide Middleware service _ Completely hiding failures of networks and Goals of Distributed Systems nodes Connecting resources and users – You cannot distinguish a slow computer Distribution transparency from Openness a failing one Scalability – You can never be sure that a server Distribution Transparency actually Transparency Description performed an operation before a crash _ _ _ _ Access Hides differences in data is (theoretically and practically) impossible _ Full transparency will cost performance, representation and invocation exposing mechanisms distribution of the system Location Hides where an object resides – Keeping Web caches exactly up-to-date Migration Hides from an object the ability of a with system to change that object’s location the master copy Relocation Hides from a client the ability of a – Immediately flushing write operations to system to change the location of an disk object to which the client is bound for fault tolerance Replication Hides the fact that an object or its Openness of Distributed Systems Open distributed system: Be able to interact with services from other open systems, irrespective of the underlying environment: _ Systems should conformto well-defined _ Allow (dynamic) setting of caching policies, preferably per cachable item _ Support different levels of trust for mobile code _ Provide adjustable QoS parameters per data stream _ Offer different encryption algorithms Systems should support portability of Scale in Distributed Systems applications Observation: Many developers of modern Systems should easily interoperate distributed Achieving openness: At least make the system easily use the adjective “scalable” distributed without making system independent from heterogeneity of clear why their system actually scales. the underlying Scalability: At least three components: interfaces _ _ environment: _ _ _ Hardware Platforms Languages Policies versus Mechanisms _ Number of users and/or processes (size scalability) _ Maximum distance between nodes (geographical scalability) _ Number of administrative domains Implementing openness: Requires support (administrative scalability) for different Most systems account only, to a certain policies specified by applications and users: extent, for What level of consistency do we require for size scalability. The (non)solution: powerful clientcached servers. data? Today, the challenge lies in geographical Which operations do we allow downloaded and administrative code scalability. to perform? Techniques for Scaling Which QoS requirements do we adjust in the Distribution: Partition data and face computations across of varying bandwidth? multiple machines: _ _ _ _ What level of secrecy do we require for communication? Implementing openness: Ideally, a _ _ _ Move computations to clients (Java applets) Decentralized naming services (DNS) Decentralized information systems (WWW) distributed system Replication: Make copies of data available provides only mechanisms: at different machines: _ Networks of Computers tolerance) Multiprocessors and Multicomputers Replicated databases Distinguishing features: _ _ _ _ Replicated file servers (mainly for fault Mirrored Web sites Large-scale distributed shared memory _ _ Private versus shared memory Bus versus switched interconnection systems Networks of Computers Caching: Allow client processes to access High degree of node heterogeneity: local copies: _ _ _ High-performance parallel systems Web caches (browser/Web proxy) (multiprocessors File caching (at server and client) as well as multicomputers) Scaling – The Problem Observation: Applying scaling techniques is _ _ High-end PCs and workstations (servers) Simple network computers (offer users only easy, network except for one thing: access) Havingmultiple copies (cached or replicated), leads to inconsistencies: modifying one copy makes that copy different from the rest. Always keeping copies consistent and in a general way requires global _ _ Mobile computers (palmtops, laptops) Multimedia workstations High degree of network heterogeneity: _ _ _ _ Local-area gigabit networks Wireless connections Long-haul, high-latency POTS connections Wide-area switched megabit connections synchronization Observation: Ideally, a distributed system on each modification. hides these Global synchronization precludes differences large-scale Distributed Systems: Software Concepts solutions. Observation: If we can tolerate inconsistencies, we may reduce the need for global _ _ _ Distributed operating system Network operating system Middleware synchronization. System Description Main goal Observation: Tolerating inconsistencies is DOS Tightly-coupled OS for application Distributed Operating System dependent. Distributed Systems: Hardware Concepts Some characteristics: Multiprocessors other computers _ _ Multicomputers _ _ OS on each computer knows about the OS on different computers generally the same system with Services are generally (transparently) networking facilities _ distributed _ Computers work independently (i.e., they across computers may even Kernel Kernel Kernel have different operating systems) Machine A Machine B Machine C _ Services are tied to individual nodes (ftp, Network telnet, Distributed operating system services WWW) Distributed applications _ Highly file oriented (basically, processors Multicomputer Operating System share Harder than traditional (multiprocessor) OS: Because Distributed System (Middleware) memory is not shared, emphasis shifts to Some characteristics: processor only files) _ OS on each computer need not know about communication by message passing: the Often no simple global communication: other computers _ – Only bus-based multicomputers provide _ OS on different computers need not hardware generally be broadcasting the same – Efficient broadcasting may require network _ Services are generally (transparently) interface distributed programming techniques across computers No simple systemwide synchronization Need for Middleware mechanisms Motivation: Too many networked Virtual (distributed) shared memory requires applications were OS hard or difficult to integrate: _ _ to maintain global memory map in software _ Inherent distributed resource management: _ _ Departments are running different NOSs Integration and interoperability only at level no central of primitive point where allocation decisions can be NOS services made _ Need for federated information systems: Practice: Only very few truly multicomputer – Combining different databases, but operating providing systems exist (example: Amoeba) a single view to applications Network Operating System – Setting up enterprise-wide Internet Some characteristics: services, Each computer has its own operating making use of existing information systems _ – Allow transactions across different databases – Allow extensibility for future services (e.g., _ _ _ Authentication and authorization services Simple encryption services Auditing service teleworking, collaborative applications) Comparison of DOS, NOS, and Middleware Constraint: use the existing operating 1: Degree of transparency systems, 2: Same operating system on each node? and treat them as the underlying 3: Number of copies of the operating system environment (they 4: Basis for communication provided the basic functionality anyway) 5: How are resources managed? Middleware Services (1/2) 6: Is the system easy to scale? Communication services: Abandon 7: How open is the system? primitive socketbased Item Distributed OS Network Middlemultiproc. message passing in favor of: multicomp. OS ware DS Procedure calls across networks 1 Very High High Low High Remote-object method invocation 2 Yes Yes No No Message-queuing systems 31NNN Advanced communication streams 4 Shared Event notification service memory Information system services: Services Messages Files Model that help manage specific data in a distributed system: 5 Global, Large-scale, systemwide naming services central Advanced directory services (search Global, engines) distributed Location services for tracking mobile objects Per node Per node Persistent storage facilities 6 No Moderately Yes Varies Data caching and replication 7 Closed Closed Open Open Middleware Services (2/2) Client–Server Model mobility, _ _ _ _ _ _ _ _ _ _ _ Control services: Services giving applications control over when, where, and how they access _ _ _ Basic model Application layering Client–Server architectures Distributed transaction processing Basic Client–Server Model (1/2) Code migration Characteristics: data: _ _ Security services: Services for secure processing and communication: _ There are processes offering services (servers) _ There are processes that use services (clients) _ Clients and servers can be distributed across different machines _ Clients follow request/reply model with respect to using services Basic Client–Server Model (2/2) Servers: Generally provide services related to a shared resource: _ Servers for file systems, databases, implementation repositories, etc. _ Servers for shared, linked documents (Web, Lotus Notes) _ _ Servers for shared applications Servers for shared distributed objects Clients: Allow remote service access: _ Programming interface transforming client’s local service calls to request/reply messages _ Devices with (relatively simple) digital components (barcode readers, teller machines, hand-held phones) _ Computers providing independent user interfaces for specific services _ Computers providing an integrated user interface for related services (compound documents)