Fichas
311 - Distributed System
Fichas del conjunto (160)
- 1What is the cloud? (computing)A cloud is a set of internet based application, storage and computing services sufficient to support most users needs thus enabling them to largely or totally dispense with local data storage and application software
- 2How do Cloud services work?Virtualisation - host + guest(VM)
- close to physical performance
-multi-tenacy
-nested virtualisation
-Tech: Xen, KVM, VMWare...
Different Economic model - By product of the rapid expanse
XaaS: everything has an API (accessible) - Potential to build complex interconnected systems - 3What is an API?Application Programming Interface
Exposes a function/set of functions through a predefined interface - 4What are the advantages of APIs?self descriptive (easy to use)
programming language neutral
separate concerns (maintenance, evolution, etc)
hard to misuse - 5What does every cloud come with?different forms: -provisioning levels
-deployment model
Different costs attached to each - 6What are the provisioning levels of Cloud?Software as a service
Platform as a service
Infrastructure as a service - 7What is provided by each provisioning level in cloud computing?SaaS: turn-key application
PaaS: runtime enviroment: software packages and storage support
IaaS: bare bones hardware resources + OS - 8What is the usage of each cloud provisioning level?SaaS: application transactions - run jobs, manipulate data, etc
PaaS: develop applications
IaaS: customise run time enviroments - 9How do you decide which provisioning level to use?identify your skill set; real core competency
how much want to/ can you spend on each layer (time and money)
how much flexibility can i live with (or without)
legal + privacy concerns - 10What are the deployment models for cloud service? Don't forget to describe them!Public cloud: third party service provider offers services to the general public
private cloud: organisations (or possibly third parties) set up and maintain cloud services for their own internal use
Hybrid cloud: a mix of both strategies and multi-cloud, via broker, federated cloud - 11What is private deployment of clouds?outsourced private clouds: on-site clouds managed by 3rd party
- 12What are the advantages of cloud computing? (so what?)less reliance on stand alone applications
impossible applications now possible
resources available as and when required
different way of tackling problems:
-more integration and transparency
-less control
alteration in skill set expectations
-users know less. developers know more - 13What are the future trends of Cloud computing?container - ring fenced namespaces to provide portable exec units
server-less - ephemeral stateless logic that is only called when needed
resource pooling (e.g. Mesos) - resource management across an entire datacentre
Disaggregation - individual components (CPU, memory, storage) are interconnected over a high-bandwidth network rather than overa bus within a single chasis - 14What is the internet of things (IoT)?is the interconnection of uniquely identifiable smart computing devices within the existing infrastructure
- 15What can IoT devices do?sense (measure)
Actuate
Store
Communicate
Describe its own possible interactions
Be accessed and programmed remotely
Integrate with environment fabric - 16What are examples of Internet of Things things but not devices?Wireless sensors and actuators - Agricultural and enviromental monitoring
Connected vehicles
smart grid
smart cities
smart highways
smart homes - 17By 2020 there will be too many devices for the cloud to cater for what?mobility support
centralised model
high latency - 18What roles does fog computing support?aggregation
pre-processing
fault mitigation
co-ordination and automation
bridging between boundaries, e.g. translators and syncrhonisation
network middlebox, e.g. caching and traffic scrubbing - 19What does Fog computing do?extend the cloud paradigm to the edge of the network
-compute and data resources on demand
enhance delivery of current applications and services
enable new generation of context driven application and services - 20What does Fog computing require?redesigning of applications
-hot area of research and industry - 21What are the different ways you can scale? What does each mean?size - support massive growth in number of users
geography - supporting distributed systems that span continents (dealing with latency, inconsistency, etc)
administration - supporting systems which spawn many different administrative organisation - 22How do you design for scalability at the hardware level?use of top end hardware, multi-core processors
adoption of cluster computers - 23How do you scale at operating system level?multi threading
high performance protocol, fast context switches etc - 24How do you scale at middleware level?use of caching (client and server side)
use of replication, load balancing, functional decomposition, mitigation of load to the client
use of P2P techniques, agents - 25Although we focused on scalability, what are other factors we must consider?reliability
openness
performance
(scalability) - 26What are protocol buffersan open source way of encoding structured data in an efficient yet extensible format
used for serialisation and subsequent storage or transmission - 27What are protocol buffers intended to be?simple,fast and efficient
- 28What do protocol buffers support?simple style of RPC where operations have one argument and one result
protocol buffers send through RpcChannels and monitored through RPC Controllers - 29What is MapReduce?A service offering a simple programming model for large scale computation over very large data sets
- 30What are MapReduces designed with an acknowledgement that?hardware fails
network is slow (slower than disk in most cases)
machines are different - 31What are the two key phases in MapReduce and describe them?Map: processes a key/value pair to generate a set of intermediate key/value pairs (extract something useful)
Reduce: merges intermediate values (aggregate, summarise, filter, transform) - 32What are the steps for MapReduce map phase?Take a series of tuples
process each tuple
outputs 0 or more tuples - 33What are the steps for MapReduce reduce phase?Called once for each unique
iterates through each value
Output 0 or more results as - 34What is the MapReduce way to count all the books that mention 'x' in the library?divide the library into sections
one worker per section reads all books and records mentions
all workers meet in the meeting room when done
collate all finding - 35What are the GFS requirements?Assume that all components will fail
optimise for very large (multi-GB) files
workload consists mainly of reads with some writes
high sustained bandwidth is more important than latency
support multiple concurrent appends efficiently
scalability - 36Describe the highlights of the GFS Architecture?Each cluster has one master and multiple chunkservers
files replicated on by default 3 chunkservers
system manages fixed size chunks 64MB (very large)
Over 200 clustes and some with up to 5000 machines offering 5petabytes of data and 40 gigabytes/sec throughput - 37How does GFS scale involving hardware and operating systemsTraditional Google approach of very large number of commodity machines
Designed to tolerate failure (how to deal with it 'when' not 'if' it happens) - 38How does GFS scale involving caching strategy?No client caching due to: -size of working sets -streaming nature of many data sources
No server caching - reliance on the Linux buffer
in memory meta-data on master - 39How does GFS scale involving Distributed system support?Replication
Centralised master allows optimum management decisions
Separation of control and data flows
Relaxed consistency management optimised for appends - 40How does a system recovery correctly?if its internal state is consistent with the observable behaviour of the system before the failure
- 41What is the problem with passive replication?Primary/Backup handover leads to consistency issues
-primary crashes, backup may be lagging behind
-backup may not resume exactly where primary left off
-risk of inconsistency from client point of view - 42How can the problems with Passive replication be avoided?synchronise backup with primary more frequently (aka checkpointing)
but too frequently = high overhead - 43What is the output commitment problem?Clients should not see changes that hasn't been made permanent
- 44What are the different semantics of exactly once? (the different types)No counter and retry -> at least once
counter and retry -> at most once semantics
exactly once requires some atomicity mechanisms - 45All the solutions to the output commit problem not address and what the solution for this?They all do not scale to many clients/large state
solution: use logging
-save log of operations performed on primary
on recovery: latest checkpoint + reapply current log - 46What is a property of Transactions?Either do the whole thing or nothing
- 47What is a distributed transaction?A transaction where operations involve multiple servers (e.g. airline + hotel)
- 48What operations do a transaction engine provide? What does each do?Begin transaction - start a transaction
End transaction - end transaction + try to commit
abort - kill transaction and forget everything about it - 49What is the issue with distributed transactions?need distributed algorithms for concurrency control and recovery schemes mentioned above
must deal with added difficulty of distributed deadlock
crucial issue of atomic commit protocols - 50How do we do one phase atomic commit for distributed transactions?the coordinator keep requesting all participants to commit until they return an acknowledgement
no chance of a participant to initiate an abort - 51How do we do two phase atomic commit for distributed transactions?Phase 1: calls for participants' vote
Phase 2: complete a commit or an abort according to output of the vote - 52In detail, describe the steps in 2 phase commit protocol for the voting phase1. coordinator sends a canCommit? request to all participants
2. on receiving canCommit? each participants replies yes or no. if yes it saves the transaction state into permanent storage before sending the yes reply.
if no aborts immediately - 53in 2 phase commit protocol what happens in detail during the voting phase?3 if all voted yes, including coordinator. send a doCommit to all
else send doAbort to all that said yes
4 voting participants wait for doCommit or doAbort and act accordingly. if they commit they send a have committed acknowledgement - 54What happens in 2 phase commit protocol if a do commit it sent and a participant fails?-transaction is blocked until the participant resumes
-consistency is assured because of transaction state being saved in stable storage - 55What happens if commit fails and a server goes down during the annoucement for it in 2 phase commit protocol?no need to wait for failed servers - its there job to catch up
failed servers still need to check with coordinator
-they do not know the outcome of the transaction
-transaction could have succeeded - 56What are the distributed computations?MapReduce and Sawzall
- 57In the distributed systems infrastructure what are data and coordination examples?Google File system (GFS)
Chubby
Bigtable - 58In distributed systems infrastructure what are the communication paradigms?Protocol buffers
Publish-subscribe - 59What is the Chubby lock service? (what does it provide and support)Provides simple file system API for small files
Supports coarse grained synchronisation in loosely coupled (asynchronous) and large scale distributed systems - 60What are the uses of the chubby lock service?As a small scale filling system for e.g. metadata
as a name-server
to achieve distributed consensus/locking/election (use Lamports' Paxo Algorithm) - 61Chubby utility is a very simple protocol for?cache consistency with deterministic semantics
important for client services. e.g. bigtable stores access control list
hence Google use as a name server - avoids inconsistency with DNS - 62What are the steps of Paxos?Electing a coordinator
Seeking consensus
Reaching consensus - 63In detail describe step one of PaxosElecting a coordinator
-coordinator can fail => a flexible process is adopted which can result in multiple coordinators co-existing, with the goal of rejecting msgs from old coordinators
-sequence numbers are sent out, highest wins and becomes coordinator - 64Describe in detail the second step in PaxosSeeking consensus
-an elected coordinator may submit value and then broadcast an accept msg with this value to all replicas. Replicas can ACK if they want to accept or reject. coordinator waits for a majority to ACK this msg - 65Describe in detail the third and final step in PaxosReaching consensus
-if a majority ACK. Consensus has been achieved. The coordinator broadcasts a commit msg to notify replicas of this agreement - 66What is Bigtable and what does it support?a very large scale distributed table indexed by row, column and timestamps (built on top of GFS and Chubby)
Supports semi-structured and structured data on top of GFS (but without full relation operations, e.g. join) - 67How does BigTable work?table split by rows into fixed size tablets optimised for GFS
some client, master, worker pattern as with GFS (worker manage tablet) but also with select (client) caching for tablet location
rows clustered together by naming convention to optimise access
often used with MapReduce for large scale computation on datasets - 68What are the key design philosophies for Google infrastructure? (D.S systems)Simplicity - do 1 thing and do it well, avoid feature-rich design
Performance - every millisecond counts
Testing - 'if it aint broke, you're not trying hard enough'
- use logging and tracing to resolve faults
Don't follow any convention/school of thought (whatever works best use)
use cheap commodity hardware (risk analysis) - 69What is Peer to Peer (P2P) computing?is the sharing of computer resources and services by direct exchange between systems (peers)
- 70In peer to peer network what happens as the number of users grow?so too does the number of resources
- 71What could the resources be in peer to peer?storage, compute cycles, bandwidth, content and human presence
- 72If millions of internet users want to download/visit the same popular huge file, why does the client server model fail? (aka basic p2p scenario)not enough bandwidth
can't afford to deploy enough servers - 73Describe NapsterA hybrid system (not pure p2p network)
was used primarily to share music file sharing
Has central server but files copied in P2P manner - 74Describe Gnutella?Address some of Napster's weaknesses and introduces it own problems
Originally developed at Nullsoft (AOL - accidentally released on website
Pure peer to peer -no central server - fully decentralised lookup for files - 75How does Gnutella work?All peers are fully equal - no central server
peer needs to know another peer, thats in the network to join
Direct downloads
Search based on flooding - sending messages to many peers - 76What are the steps in Gnetulla to discover peers? (don't need detail)Step 0: Join the network
Step 1: Determining who is on the network
Step 2: searching - flood based search
Step 3: Downloading - 77Explain the Step 1 of GnutellaDetermining who is in the network
-ping packet is used to announce your presence on the network
-other peers respond with a "pong" packet and also forward your ping to other connected peers
-pong packet contains: ip address, port number, amount of data that peer is sharing, pong packet come back via same route - 78Explain step 2 in GnutellaStep 2: searching - flood based search
-client queries 7 neighbours
-if they don't have it, they contact 7 if their neighbours for max 10 hop counts
-reverse path forwarding for response (not files) - 79Describe step 3 of GnutellaStep 3: Downloading
-peer responds with a query hit (contains contact info)
-file transfer uses direct connection using HTTP Protocol - 80Describe the Gnutella Search issue?Flooding based search is extremely wasteful with bandwidth
-enormous number of redundant messages
-all users do this in parallel: local load grows linearly with size - 81In BitTorrent what is free riding?File sharing networks rely on users sharing data
Two types:
-downloading but not sharing any data
-not sharing any interesting data - 82What are the contents of .torrent file?url of the tracker
chunk size
checksum for each chunk
"files" <- allows download of multiple files - 83In BitTorrent where are files hosted?Files is hosted at a well known web server
The .torrent has address of tracker for file
Tracker which runs on a web server,keeps track of all peers downloading file - 84What is a BitTorrent Swarm and what are the 2 roles within it?BitTorrent clients form a swarm: a self-organised network
Seeder - peer having entire file
Leecher - peer downloading the file - 85How do you choose which chunk to download first in BitTorrent?Client randomly download a first chunk
Then chooses the rarest first - the chunk owned by least amount of peers - 86What is the benefits of Tit-for-tat strategy in BitTorrent and how does it work?Encourages cooperation, discourages free riding (a peer serves peers that serve it)
Choke happen if peer A decides not to upload to peer B (B is choked)
Each peer unchokes at most 4 interested peers
Another is randomly chosen (optimistic unchoking) - 87Why does BitTorrent use optimistic unchoking and what is it?Randomly unchoking a peer,
Done to periodically look for better choices
optimistically unchoked peers rotate every 30seconds - 88What is Bitcoin?an electronic payment system
based on p2p technology, hence totally decentralised
infinitely divisible - 89Where are bitcoins stored? What are they made up of? Describe these parts?bitcoins are stored within wallets
wallets consist of:
public keys: account number
private keys: used to send/release bitcoins - 90What are blocks in Bitcoin?Records of transaction
-each contains some transactions with hashed signatures, and linked to the previous block
-work of generating new blocks is called mining which involves complex cryptographic computation to pack transactions into a block - 91What happens during bitcoin transaction verification?miners verify that A has enough bitcoin to make the payment
miners race to bundle data from the pending transaction with other unrecorded transaction, plus the last block of transaction recorded in the public ledger - 92What happens in and during proof of work (bitcoin)?miner applies a cryptographic hash function to the unrecorded transaction to generate a digest
the transaction chain must have a certain but arbitrary number of zeros at the at the beginning -proof of work puzzle -can only be done by trying different keys
when a miner finds a proof number that satifies the req, the discovery is announced to the rest of the network and is awarded some newly created bitcoins
the hash block is published to the public ledger - 93What is the requirement to be able to double spend in bitcoin?person wanting to double spend must have access to computational power that is greater than the computation power of all honest miners put together
-unlikely -would be better put as a legitimate bitcoin mining - 94What is the issue with focusing in the underlying protocol when it comes to RPC?Request message may get lost
reply message may get lost
client may crash
server may crash - 95What are the semantics of the Exactly once protocol? (remote invocation context)The remote procedure call will be carried out once (completely) or not at all (the operation will be aborted)
- 96What are the semantics of the maybe and at least once lightweight protocols?Maybe: sends request to server; which sends back a reply. no real guarantee at all if anything goes wrong
at least once: send message and if not received after given time, the message is resent (with failure assumed after n tries)
Guarantees the call is made at least once but possibly multiple times
ideal for idempotent operations (same effect) - 97Whats the difference between RMI and RPC?RMI has extra expressiveness
-object oreinted programming features in distributed context
x reference remote object x invoke their methods x passs/return object across network
RPC - only exported functions
RMI - methods - 98What is the goal of RMI? What does Java RMI allow? What is Java RMI based on?intention: to make distributed programming as easy as standard java programming
allows: one java object to call methods on another java object in a different JVM
Java RMI is interface based - a remote object (or distributed service) is specified by an interface - 99What are the steps to lookup in in Java RMI?Server bind name to RMI registry
Client lookup name in RMI Registry
Either use method invocation in object - 100In RMI what must you do before you can invoke a method? What is the RMI registry?need a reference to this object using the RMI registry
RMI registry is a naming service
-seperately running
-server program registers remote objects
-client programs lookup object references that match this service name - 101What is a distributed system?a system that compromise of more than one computer with the goal of reaching a level of performance and/or providing a serious that is quite difficult or infeasible to do on a single computer
- 102Why distributed systems?because the world is distributed, e.g. booking hotel in x while in y
problems rarely hit two different places at the exact same time - 103What does middleware provide?high level programming abstraction
hides the complexity associated with distributed systems (including the underlying heterogeneity) - 104What are the mistaken beliefs (fallacies) of distributed computing?the network is reliable
latency is zero
bandwidth is infinite
the network is secure
topology doesnt change
there is 1 administrator
transport cost is zero
the network is homogeneous (alike/same) - 105What is Middleware?software that acts as bridge between OS and applications
- 106The goal of middleware are to provide protocols that... what?resource sharing: aability to access and share resources in a distributed enviroment. distributed caching
Transparency: views distributed systems as single computer varying dimension of transparency incl location,access,mitigation
openness: offering of service according to standard rules (syntax and semantics) provide support for key properties
Extensibility: ability to introduce new or modified functionality
Scalability: many facets, e.g. size, geography, administration
Dependability/Quality of serivce: security and fault tolerance - 107What is Diffie-Hellman?an algorithm used to establish a shared secret between 2 parties
used to create a shared key (symmetric) - 108What is a signature needed to ensure?Origin: only this sender can sign the message
Integrity: Signature cannot be copied from one msg to another
Non-repudiation: sender cannot creditably deny signature - 109What does Certificate Authority (CA) and Registration Authority (RA) do? Whats the issue with this system?CA: issue certificates for public keys
RA: issue certificate requests
issues:
CA masquerading (government, hackers)
Certificate revocation takes time - 110What are the aspects of security management?Key management: -key establishment (generation) -key distribution -key revocation
Authorisation management: -granting access rights -delegating access rights
Auditing: -event management, prevention, mitigation, evidence - 111What is the client server model (how does it work)? Advantage and disadvantages?server communicates with many clients
Advantages: centralised -easy to manage -high security -consistent data
Disadvantage: centralised -single point of failure - 112What are the ways to apply the client server model?Layering
Tiering: Two tiered vs three tier
Replication - 113What is layering? An example? advantages?Complexity of distributed systems, common to partition services vertically into service layers
lower layers provide services to higher layers with higher layers being being unaware of implementation in those lower layers -low interlayer dependencies
Examples: protocol stack, middleware
Advantages -> abstraction, reusability, loose coupling (isolated management, testing, etc) - 114What is tiering? what are the common layers? advantage?Tiering complements layering by considering the logical organisation within a layer and the mapping to server
3 layers: -the user interface (presentation) tier: maintaining the interaction between the user and application
-processor tier: often referred to as business logic of the application
the data tier: managing the persistent state of the application often released by a (generic) database supporting meta-data, queries etc.
Advantages: availability, flexibility, easy management, scalability (based on tiers) - 115What are the 3 different problems when it comes to security and java RMI? what are the solutions?Protection against malicious mobile code : sandboxing
secure communication : encryption
Access control : authentication - 116Why use mobile code? Why is mobile code a security threat?Useful to pass objects from oen machine to another that has no local implementation of the object
-the local machine dynamically downloads this object class from a remote location
Malicious mobile code can compromise the server or client
Java disallows mobile code unless sandboxing is activated - 117What does class loader do?tag classes according to where they came from
shield classes from different sources
birth certificates provided to classes - 118What is the goal of sandboxing? What are the 3 components of sandboxing?distinguish trusted from untrusted code
limit(sandbox) what untrusted code can do
3 components: class loader
byte code verifier
security manager - 119What does the byte code verifier do?checks the byte code obtained by the class loader before it is allowed to execute
-all classes are checked the 1st time, they are loaded. except system classes
-simple checks:byte code format, valid instruction
complex checks: no stack overflow - 120What is the security manager?the real enforcer of sandboxing
the security manager protects potentially dangerous operations inside the JVM
they do not allow any dangerous operations - a security policy must be provided in a policy file to change this - 121What are threads? what can they be used to hide? how do multi-threaded servers work?lightweight unit of concurrency operating in a single address space
threads can be used to hide latency in D.S
multi threaded servers:
-assign threads to incoming invocations
support the concurrent processing of requests
-different thread assignment policies possible - 122What/How does Replication work/do? advantages, issues? What is Brewer's CAP thereomany given service may also be mapped to multiple servers (replication)
advantages: -higher performance -greater availability - scalability
issues: requires support to maintain consistency of replicas
Brewer CAP - consistency, availability partition tolerance - 123What is the proxy pattern and smart proxies?proxy pattern: - a proxy resides in local address space and pretends to be the target (potentially remote) object
-in this, the proxy can take steps to mask out location, access protocol, etc (ie implementing basic distribution transparency)
Smart proxy: -extends this concept, and allow arbitrary processing to be carried out (e.g. caching) with various sub-systems
-effectively extend the range of transparencies that can be supported - 124What is indirect communication? What is the intermediary?Communicating between entities in a D.S through an intermediary with no direct coupling between the sender and receiver(s)
intermediary -> groups, event-based abstractions (e.g. pub-sub), message queries, shared memory abstraction - 125Compare Stateless vs Stateful servers?Stateless: don't keep per client and can change their own state without informating the client
-simplifies recovery after crashes/load balancing
Stateful:maintain state on each of their client
-make crashes recovery more complex
-can lead to performance optimisation - 126What are the paradigms that are indirect communication seeks to uncouple 2 things?space uncoupling in which the sender does not need to know or know the identity of the receiver(s) and vice versa
time uncoupling in which the sender and receiver can have independent lifetimes (dont need to exist at same time) - 127Group communication is an example of indirect communication but what is it? what's it use in D.S and a key example?based on the comncept of a group abstraction, with operations provided to join and leave the group
messages sent to a group rather than any individual process and messages are then delivered to each member of the group
often enhanced by guarantees in terms of message ordering and reliability
Uses in D.S: -important in supporting fault-tolerance,e.g. supporting replication
-also used heavily in dissemination of events, e.g. financial system
Example:JGroups - 128How do you publish-subscribe an event? What are the uses of PubSub in D.Spublishers publish an event: publish(e)
subscribers express interest in a set of events specified by a filter f: subscribe(f)
events are delivered asynchhronously: notify(e)
publish optionally advertise what they will produce: advertise(f)
the system acts as a broker to deliver events to the right subscribers
Uses in D.S:
-financial info systems and related news feed applications
feature heavily in systems supporting cooperative working
increasingly used in ubiquitous computing/monitoring - 129What are the 5 security vulnerabilities in D.S?Eavesdropping - listening for e.g. passwords
Masquerading - pretending to be someone else
Replaying - replaying same request twice
Repudiation - entity pretending it did not perform an action
Tampering - editing request e.g. amount paid into account - 130What is the policy file?Describe what is to be enforced
-code of law
-organised as a sequence of grant statements
-anything that is not allowed is forbidden - 131What are the goals of cryptography?Obscurty(confusion): cipher is distant from plaintext
diffusion: order is not maintained in cipher
fast: cheap to compute without compromising strength
infeasible to break
open methods based on secrets -> methods will be compromised - 132What are the two styles of Cryptosystems?symmetric cryptosystems -> one key, for encrypt and decrypt
asymmetric cryptosystems -> a key for encryption, a key for decryption - one kept private and the other is made public - 133What are the 4 types pub-sub models?Channel based
Topic based
Content based
type based - 134Describe channel based and Topic based pubsubChannel based:
-publishers publish event to named channel, subscribers subscribe to those named channels and receive all the events sent to that channel
-primitive scheme as doesn't use filtering
Topic based:
-each notification is expressed in terms of a number of fields with one field denoting the topic and subscription in terms of the topic of interest
-can introduce hierarchy of topics - 135Describe content and type pubsub.content based:
-generalisation of topic based allowing the expression of subscription over a range of fields in an event notification
-filter is a query defined in terms of compositions of constraints over the value of event attributes
-significantly more expressive but with significant new challenges introduced in terms of implementation
Type based:
-intrinsically linked with (typed) object-based approaches
-subscription defined in terms of this (signature/methods/attributes), with matching defined in terms of types or subtypes of the given filter
-can be integrated elegantly into programming languages and can also check type correctness of subscription - 136What are the ways implementing a Distributed Content-based PubSub system?Flooding - sends all published to all possible recipients - can be supported by underlying multicast service - simple but msg overload
Filtering - filters propogated back through broker network with the intuition that notifications are only forwarded through the broker network if there is a path
Advertisement - overhead of fltering (sending to all publishers) can be reduced by advertisement
Rendezvous - each broker s allocated a part of event space which they are responsible for - can lead to highly scalable systems - 137Message Queues are an indirect communication based on distributed queues. How do they work?messsages are sent to a queue
processes can then access messages in the queue by either receiving a msg (blocking), polling for messages (non-msging) or being notified when msg arrive
Messages are persistent and msg delivery is reliable
Fundamentally a point to point system (not multiparty) - 138Tuple space is an indirect communication paradigm. How does it work?processes can write tuples to the tuple space
processes can read a tuple from tuple space which also leaves a copy in the tuple space
alternatively, thye can take the tuple which removes it from the space
both the read and take operation are based on pattern matching (associative access) - 139What is group communication and why is it used? What are the advantages?enables the multi-casting of a message to a group of processes as a single action - no need to to list destination
why
-support the effective discrimination of data, service discovery, pub/sub
-support for replication, fault tolerance and scalability
Adv: bandwidth
-server load: server only send one copy the msg
-network load: network has fewer packets to transfer - 140what are the types of group communications?open group (anyone can join)
closed group (closed membership)
peer: all members are equal members send msg to group
client server
hierarchical - 141What are the different reliability guarantees? (group coms)best effort: unreliable multicast
-no guarantees -msg sent to all members but all may not receive it
reliable multicast: protection against faulty network
-reasonable effort are made to ensure delivery in spite of message loss
-no guarantee if the sender crashes during multicast
atomic multicast: protection against faulty participants
-all members receive msg or none do
-main issue tolerate the sender crash - 142What is hierarchical feedback control? What is atomic multicast?each local coordinators forwards the message to its children and later handles retransmission request
atomic multicast
-stronger multicast mechanism: everyone gets msg or nobody (who's surviving) does? - 143Is atomicity all we need for messaging? What are the different types of ordering?No, need ordering
Ordering:
Unordered multicast: msgs can be delivered in a different order to different members
Global time ordering: all msgs arrive in exact order sent
FIFO ordering: msg sent from the same processes are delivered in the same order they are sent
Causal ordering: order only matters if happened before relationship exists
Total ordering: ensures all receivers receive all msgs in the same order bt doesn't pay attention in order of multicast sending (it looks at receiving order) - 144What happens when a new member joins in a group communication?the new member needs to import the state of the group
to do this it must ask an existing member of the group to ask for a state transfer -state transfer instantenous
a message is stable if every group member has received it - 145What is JGroups? What is its key features?a Java system for communicating with a group of machines
a toolkit for reliable multicast communication - 146JGroups is a one to many (multicast) reliable protocol. What does it reliability include?lossless transmission of a message to all recipients
ordering of messages e.g. FIFO
Atomicity - 147what are the types of faults in the fault hierarchy, listed simplest to most complex?crash
omissions
timing
byzantine - 148What is a failure, error and fault? What is total system state?Failure: non compliance of functional specifications
Error: Transition of internal state into invalid state
Fault: Hypothesised cause of an error
Not all faults and errors result in failures in failures (i.e. doesn't reach service interface) however all failures and errors are caused by faults
Total system state - computation, communication, stored information, interconnections, physical conditions - 149What is availability and reliability? What is quality of service?Availability - readiness for correct service (i.e. service up and running when requested)
reliability - continuity of correct service (service runs without experiencing failure)
QoS - notion of failure varies
-latency, bandwidth, security, availability etc
-impose (and restrict) fault and failure assumptions
objective: fulfill QoS in presence if faults (at lowest cost) - 150What are dependability attributes and list them?ability to avoid service failures that are more frequent and more severe than is acceptable
Availability, reliability, safety, confidentiality, Integrity, maintainability - 151What are the means to achieve Dependability?Fault prevention - fault occurrences/introduction of faults
fault tolerance - avoid service failures in presence of faults
fault removal - reduces number and severity of faults
fault forecasting - estimate fault occurrence and consequences - 152What is graceful degradation and its goal?ideally internal failures/faults should be masked (so users cant see)
Goal: minimise impact of failures to system users - 153Name 3 fault tolerance mechanisms? Why do we replicate?Replication, n-version design, check pointing, recovery blocks
Replication:
performance (e.g. heavy loaded servers)
to achieve consensus (error detection)
backward error recovery (restore to earlier state) - 154Whats the difference between messages and RPC?RPC is tightly coupled - failure of one program has a direct impact on another
Messages are loosely coupled - asynchronous interaction possible - 155What are the 2 message consumption methods in JMS? what are the method for each?Blocking (synchronous, pull mode)
-messageConsumer.receive()
Non-blocking (asynchronous, push mode)
- MessageListener.onMessage - 156What are the 2 main modes of communication in JMS and their mapping (e.g. 1-1)Message queuing (1-1)
Publish subscribe (1-M) - 157How do message queues work? (JMS)messages are sent to queue object on the server
msg consumers pull the msg from the queue
one msg can be received by one client
several clients can use same queue (writing/reading) concurrently - 158The Java API for JMS only provides interfaces to program the clients of a messaging system. the creation of queues and topics is implementation dependant. Why is that?goal: same client code can be used with different server implementations
- 159What is the typical process of setting a JMS client up? What is a connection objectprocess: -create connection -one or more sessions - a number of msg producers and consumers
A connection object:
-encapsulates an open connection with a JMS provider
-its creation is where client authentication takes place
-its created from a connection factory - 160What are the styles of Exchange Protocol?R: no needs to be returned/no confirmation required - client fires and forgets. no blocking
RR: Request Reply -if no reply, request repeated
RRA: Server needs to know client got reply
Información
- Descripción
- Computer Science Fichas sobre 311 - Distributed System, creado por Tijan Weir el 30/04/2018.
- Creado por
- Tijan Weir · abr 2018
- Actualizado
- 2 may 2018
- Visitas
- 5
- Valoración