Distributed System
2017-05-21 19:02:24 0 举报
AI智能生成
登录查看完整内容
分布式系统知识网络
作者其他创作
大纲/内容
DS
RMI and RPC
JAVA RMI
Failure Tolerance Measures
Mechanism to filter duplicates
Strategy for results retransmission
Strategy to retry request message
Semantics
Maybe invocation semantics
At-least-once invocation semantics
At-most-once
complete fault tolerance
Java RMI and CORBA support at-most-once invocation semantic.
CORBA allows maybe semantics for calls that do not return values.
Sun RPC supports at-least-once semantic.
Common
Remote Object
An object that can receive remote invocations is called a remote object.
Remote Object Reference
A unique identifier that can be used throughout the distributed system for identifying an object
Remote Interface
A remote interface defines the methods that can be invoked by external processes. Remote objects implement the remote interface.
Garbage collection
Is achieved through reference counting.
Proxy/Stub
Unmarshalling the results and forwarding them to the invoking object
Dispatcher
There is one dispatcher for each remote object class.
Is responsible for mapping to an appropriate method in the skeleton based on the method ID.
Skeleton
RPC
Transparancy
Access Transparency
Clients should be unaware of the distribution of the files.
The files could be present on a totally different set of servers which are physically distant apart
a single set of operations should be provided to access these remote as wellas the local files
Location Transparency
Files or groups of files may be relocated without changing their pathnames.
location transparent name contains no information about the named object’s physical location.
e.g. access resources by universal api
Concurrency Transparency
Users and Applications should be able to access shared data or objects without interference between each other.
Replication Transparency
replicate the data at two or more sites for more reliability
The client generally should not be aware that a replicated copy of the data exists
Failure Transparency
concealment of faults
User can complete their tasks despite the failure of software/hardware component
Mobility Transparency
Load balance
Performance Transparency
Allows the system to be reconfigured to improve the performance as the load varies
Scaling Transparency
A system should be able to grow without affecting application running.
Indirect Communication
Event
Observer=Publisher
Forwarding
Sending notifications to all subscribers who have expressed interest in the event
Filtering of notifications
When notifications are based on particular conditions the observer filters the event of interest
Patterns of events
Correlating events from multiple observers to understand patterns.
Notification mailboxes
In some cases the notification can have to delayed until the subscriber is ready to receive this information
Publish-Subscriber System
Type
Channel Based
Publishers publish to named channels and subscribers subscribe to all events on a named channel.
Type Based
Subscribers register interest in types of events and notifications occur when particular types of events occur.
Topic Based
Subscribers register interest in particular topics and notifications occur when any information related to the topic arrives.
Content Based
Subscribers can specify interest in particular values or ranges of values for multiple attributes(e.g. with favorite tags).
Group
Typical APIs
Create Group
Join Group
Leave Group
Remove Failed member
Multi-cast
Ordering
FIFO
Preserving order on the sender side
causal ordering
A message HAPPENS earlier would be preserved in the delivery at all processes
total ordering
A message DELIVERED earlier would be preserved in the delivery at all processes
Group address changed
Openess
Memory Sharing
Tuple Spaces
Distributed Share Memory
Message Queue
send
blocking receive
a consumer waits for at least one message on a queue then returns
non-blcoking receive
notify
https://www.youtube.com/watch?v=szqdtIEgTR4
Definition
Communication between entities in a distributed system through an intermediary
with no direct coupling between the sender and the receiver(s).
Coupling
Space uncoupling
sender does not know or need to know the identity of the receiver(s)
Time uncoupling
DS Issues
Concurrency
Tackling
Semaphore
Making access sequential
Multiple clients can access the same resource at the same time
Issure
Components executed in concurrent processes read and update share resources
No global clock
Heterogeneity
Issue
Use standard protocols
Use agreed upon formats or data types
Adhering to an agreed upon api
Use middleware
Java RMI (JRMP procotol)
RPC (http protocol)
Openness
Extension and integration with new components
Publishing key interfaces
Provision a uniform communication mechanism
Security
Checksum (integrity control)
MD5
SHA1
Authorization
Authentication
Encryption
RSA
Scalability
Concerns whether the system remains effective when there's rise of demand(resources and users)
Avoiding Performance bottlenecks: Decentralized algorithms should be used to avoid performance bottlenecks.
Resources should not run out (e.g. IP addresses 32bits to 128bits)
Controlling the performance loss
Controlling cost of physical resources (not grow too much as the system scales)
Failure Handling
Redundancy
Recovery
it can recover the original state after a crash
Tolerating
failure is reported back to the user (e.g. web server not being available)
Masking
Detecting
Concerns whether the system continue to function when some of its nodes fail
Transparency
Concealment from the user and the application programmer of the separation of components in a distributed system
Model
Communication Paradigms
Interprocess communication
Remote invocation
Indirect communication
Architectural Styles
Client-server
Clients invoke services in servers and results are returned
Poor scalability
Peer-to-peer
Each process in the systems plays a similar role interacting cooperatively as peers (playing the roles of client and server simultaneously)
Bit torrent
Features
Services provided by multiple servers
A service may be separated into multiple processes running on multiple hosts on the system network.
Partition the set of objects on which the service is based and distributethose objects between themselves
(e.g. Sun Network Information Service (NIS))
Proxy servers and caches
Cache: A store of recently used data objects for easier access
Increase the availability and performance of the service by reduce duplicate loading of resources over network
Proxy Server: A server act as broker for requests and access distribution
Mobile Code and Agents
Mobile code
Mobile code is sent from one computer to another to run at the destination
Examples
Java Applet
Javascript
Flash
Mobile Agents
A running program (code + data) that travels from one computer toanother in a network carrying out a task on someone's behalf
http://www.codeproject.com/Articles/11064/Mobile-Agents-Software-on-the-move
IBM Aglet
Network Computers
e.g. Cloud machine with package managers
Thin Clients
Business logic not downloaded but executed on server
Move complexity away from the end-user device
Layering
Performance of communication channels
Latency
Bandwidth
Jitter
Models
Physical Model
A representation of underlying hardware elements and composition of a system.
Architecture Model
Fundamental Model
Interaction Model
Concerned with the performance of processes and communication channels and the absence of a global clock
Failure Model
Classifies the failures of processes and basic communication channels in a distributed system
Security Model
Identifies the possible threats to processes and communication channels
DS Characterization
the extent to which errors and subsequent recoveries of hosts and services within the system are invisible to users and applications
Byzantine Tolerance
Fault: Any fault presenting different symptoms to different observers
Failure: The loss of a system service due to a Byzantine fault in systems that require consensus (a node is trying to do sth arbitrarily)
http://blog.sina.com.cn/s/blog_5c4b68750100v151.html
Middleware
Middleware is a software layer between the distributed application and the operating systems which hides the underlying heterogeneity
1. JVM
2. MessageQueue
3. Proxy Server
4. Distributed application integration(e.g. Weblogic)
Omission Failure
Omission failures either due to process crash or communication link failures are detected via timeouts.
Web Services
Web services paradigm allows programs (not just browsers) to be clients for web programs
Data between the server and the client is often passed using Extensible Markup Language (XML)/JSON.
SOAP protocol (Simple Object Access protocol) allows client to invoke web services.
0 条评论
回复 删除
下一页