Distributed Systems & Networks Flashcards

(167 cards)

1
Q

What 5 layers are in the Open Systems Interconnection model highest to lowest?

A

Application
Transport
Internet/Network
Link
Physical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are data frames?

A

A structured way of packaging & sending data between devices
Contain a header, payload, and trailer contained in a packet

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is framing?

A

The transmission of frames over physical media

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are FLAG bytes and Escape bytes?

A

A FLAG byte value marks the start and end of a frame
If data contains a byte sequence that could be misinterpreted as a FLAG byte sequence, use an Escape byte to signal different treatment
If data contains a byte sequence that could be misinterpreted as an Escape byte sequence, use another escape byte

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is flow control?

A

Regulates flow of data
Receiver sends messages to sender saying if more data can be sent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the 3 link layer models?

A

Connectionless, no acknowledgements
Connectionless, acknowledged
Connection-oriented services, acknowledged

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an ARQ?

A

Automatic Repeat reQuest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What 3 ways can link layers handle ACKs?

A

Stop-and-wait ARQ: send frame(s), wait for ACK, send next frame(s)
Go-back-N ARQ: frames labelled with sequence numbers, send frames, if ACK missed retransmit from that frame
Selective-repeat ARQ: same as GBN ARQ but only retransmit lost frames

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What 2 ways are errors handled in the link layer?

A

Parity bit: used to check if number of 1’s is even or odd
Cyclic redundancy check: checksum (based on data) appended to data, checksum re-calculated by receiver, compared with sender’s checksum

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What 3 ways is link layer media contention handled?

A

Frequency channels
CSMA/CD (carrier sense multiple access w/ collision detection), for ethernet networks: listens whilst sending on a channel; if collision detected, stops and retransmits
CSMA/CA (CSMA w/ collision avoidance), for wireless networks: instead of listening, waits for frame ACK

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is CSMA?

A

Carrier Sense Multiple Access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the 3 functions of the Internet layer?

A

Internetworks: hiding routing from transport layer
Transmits packets: packetises data stream into datagrams (small, distinct units) and fragments them
Receives packets: reassembles fragments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does each router do in store-and-forward packet switching?

A

Stores the packet, checks & processes it, forwards it to the next hop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is fragmentation?

A

When a Protocol Data Unit (PDU), which has a header and data, is split into smaller packets, which have the header and a fraction of the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When does fragmentation occur?

A

When Protocol Data Units (PDUs) are larger than the Maximum Transmission Unit (MTU)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the address sizes of IPv4 and IPv6?

A

32-bit and 128-bit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are the header sizes of IPv4 and IPv6?

A

IPv4: variable, at least 20 bytes
IPv6: fixed, 40 bytes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How are IPv6 addresses shortened?

A

Leading 0s in blocks are omitted
0 blocks (:0000:) are replaced by ::

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

When is IP fragmentation performed in IPv4 and IPv6?

A

IPv4: can be at any routing hop, re-assembled at receiving host
IPv6: at sending host

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What IPv4 address portions are there?

A

Network portion: first 16 bits e.g. 192.168.123.45 –> 192.168 network portion
Host portion: last 16 bits e.g. 192.168.123.45 –> 123.45 host portion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Why can’t all addresses in a subnet be used?

A

First address is reserved
Last address is broadcast address
Another address is required for the router (first or last usable address)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

IPv4 subnet notation

A

For 152.78.70.0/23
The subnet /23 leaves 2^(32-23) = 512 addresses to work with
Leaves address range 152.78.70.1 to 152.78.70.254

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

IPv6 server portion notation

A

Server portion can be from 64 bits to 127 (leaves 2 usable addresses): /64 to /127

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is NAT (Network Address and Port Translation) and CGNAT (Carrier-Grade NAT)?

A

NAT: manages IP address allocation. for IPv4 networks using private addresses but need Internet access
CGNAT: extension of NAT that handles the running out of IP addresses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What are the 4 benefits of IPv6?
Removes need for NAT More plug-and-play than IPv4 Streamlined header Fragmentation only occurs at sender
26
What is routing in the Internet layer?
A function for moving packets between different subnets
27
What is prefix aggregation?
e.g. 192.168.10.0/24 and 192.168.11.0/24 aggregated to 192.168.10.0/23
28
What problems might a default router's routing table have?
Table could very large and be subject to frequent changes
29
What is an autonomous sytem (Internet)?
A group of networks with a unified routing policy
30
What gateway protocols are used in autonomous systems?
Exterior gateway protocols for exchanging routing information between AS's Interior gateway protocols for exchanging routing information within an AS
31
What are the 2 types of interior gateway protocols?
Distance vector: exchanges "best route" information to neighbouring routers Link state: exchange messages describing connected neighbours to all routers in site. Better convergence and loop avoidance
32
What do routers do in the Routing Information Protocol
Lets them share information with other routers about the "best route" by sending whole routing table periodically to connected routers
33
What 2 limitations does the Routing Information Protocol have?
Only updates every 30 seconds Updates not acknowledged
34
What is link cost and link state packets?
Link cost: cost between routers determined by bandwidth and/or delay Link state packets: A list of known routers and their link cost
35
How is the shortest path between routers found?
Using Dijkstra's algorithm (from starting node, expand nodes by considering cheapest neighbour and update costs)
36
What are the 4 steps of Border Gateway Protocol?
[ASN - Autonomous System Number] 1) Configuration: specify neighbour's IP address and ASN 2) Peering session: routers exchange entire routing tables, followed by incremental updates 3) Route advertisement: routers advertise routes they know of to their neighbours 4) Route selection: neighbours choose whether to use that route based on own knowledge of ASNs. Will reject if own ASN is on path as would loop
37
What are the 3 downsides of Border Gateway Protocol?
Relies on trust Slow Routers have limited routing table sizes
38
What is **ICMP** (Internet Control Message Protocol)?
Used in IPv4 networks for information & error messages Used in IPv6 networks for router advertisement & neighbour discovery
39
What is **ARP** (Address Resolution Protocol)?
Used in local networks to map IP addresses to MAC addresses 1) Broadcasts a message containing sender's MAC address and IP address 2) Host with target IP address responds with MAC address
40
What is **DHCP** (Dynamic Host Configuration Protocol)?
A protocol that automatically assigns IP addresses to devices on a network Client | Server Discover --> <-- Offer Request --> <-- ACK
41
What is **NDP**?
Neighbourhood Discovery Protocol
42
What is **SLAAC** (StateLess Address AutoConfiguration)?
Authomatically assign IPv6 addresses to devices without need for central server
43
UDP vs TCP (4 attributes)
UDP: faster, less reliable, connectionless (send-and-forget), no flow control TCP: slower, more reliable, connection-oriented, has flow control
44
UDP vs TCP headers
TCP headers are more complex but guarantee data delivery and order of data
45
What 2 ways can TCP facilitate multiple packet transmission without waiting for individual ACKs?
Sliding window protocol (flow control): 1) Sender slides forward a window for multiple unACK packets to be sent 2) Window is slid back 3) Once ACKs received, window slides forward again Congestion control: If congestion detected, TCP reduces transmission and vice versa Transmission rate is doubled until thresh met, then gradually increases until timeouts start occuring
46
What is an octet?
octet == byte == 8 bits
47
What are switches, ports, and hosts?
Switch: forwards packets between devices on same LAN Port: a connection point on a switch where hosts can connect Host: devices connected to a network
48
How do ethernet switches improve network performance?
Switches learn the MAC addresses of hosts on their ports and build a MAC address table This improves efficiency as data is only forwarded to intended recipients
49
What are the 4 cast message types?
Unicast: one sender to one receiver Broadcast: one sender to all potential receivers Multicast: one sender to any interested receivers Anycast: one sender to nearest instance of receiver
50
What do IP routers do?
They forward IP packets between LANs but do not forward Ethernet broadcasts They advertise the reachability of their IP address range
51
What is subnet comparison?
A way of knowing if an address is local or not Even if destination is local but LAN is complex, sender may use default router
52
What is **SMTP** (Simple Mail Transfer Protocol)?
Handles transfer of email messages but not receiving or storing
53
What does **QUIC** (Quick UDP Internet Connections) do?
Improves performance of web applications
54
What is **RTSP** (Real-Time Streaming Protocol) and **RTP** (Real-Time Transport Protocol)?
RTSP: for controlling delivery of streaming media content over the Internet RTP: the actual transmission audio/video data over IP networks
55
What is **SMB** (Server Message Block)?
Provides shared access to files over a LAN or the Internet (via HTTP)
56
What is **NFS** (Network File System)?
For accessing files over a network (via HTTP) as if they were local
57
What is **NTP** (Network Time Protocol)?
For synchronising the time of devices on a network
58
What is **LDAP** (Lightweight Directory Access Protocol)?
For accessing directory services over an IP network
59
What is **P2P** (Peer-to-Peer)?
Where devices communicate directly with each other without the need for a central server
60
What is **HTTP** (Hypertext Transfer Protocol)?
1) TCP connect to server 2) Send request (GET, HEAD, POST, PUT, DELETE) 3) Receive response message with data
61
What is **CoAP** (Constrained Application Protocol)?
Like HTTP but for simpler devices and on UDP More modern and lightweight than MQTT
62
What is **MQTT** (Message Queuing Telemetry Transport)?
Like HTTP but with smaller packets and less overhead Messages are published to a broker entity and clients subscribe to data streams
63
How can CoAP-based devices and HTTP web services communicate?
By using CoAP-to-HTTP gateways Proxy gateway stores cached values to speed up subsequent access
64
What is **DNS** (Domain Name System)?
Translates hostnames (example.com) into IP addresses
65
What is DNS domain delegation?
TLD (top level domain) registrars control domain names like .uk They can delegate names like .ac.uk to JISC They in turn can delegate names like soton.ac.uk to the University and so on This can be viewed as a hierarchy
66
What is a DNS zone?
A continous chunk of name space with an associated set of name servers Subzones can be delegated
67
What is iterative server mode and recursive server mode?
ISM: where server responds to queries with referral to another server RSM: where server responds from local cache or resolves queries before responding
68
What is mDNS?
Multicast DNS Performs DNS capabilities within small local networks without need for centralised DNS server
69
What are stateful firewalls?
Firewalls that can inspect TCP/IP headers and keep track of connections
70
What are application layer firewalls?
Firewalls at application layer gateways that ensure packets that look like HTTP are actually HTTP
71
What is **NIDS** (Network Intrusion Detection System)?
Monitors network looking for malicious activity Uses signature/anomaly-based detection
72
What is **NAC** (Network Access Control)?
Uses an authentication protocol to authenticate clients on a network Switch port is blocked until client authenticates
73
What is a **VPN** (Virtual Private Network) and its 2 types?
Simulates a direct connection between devices Site-to-site VPN: connects two networks Remote-access VPN: individual clients connect to VPN server
74
What are the 3 types of DNS exploitation?
DNS amplification - spoof source IP address and send lots of small DNS requests with larget responses to overwhelm destination DNS cache poisoning - supply bogus response to caching resolver Malicious network operator - included dodgy entries in their DNS server
75
What is Cristian's algorithm and its 3 steps?
A simple algorithm to synchronise time with a time server 1) Client process requests time from Clock Server 2) Clock Server responds with clock server time 3) Client receives response and calculates synchronised client clock time: = Tserver + (Tsent + Treceived)/2
76
What are the 6 steps of the Berkeley algorithm?
1) Individual node chosen as co-ordinator node 2) Co-ordinator requests time from each node 3) Co-ordinator uses Cristian's algorithm to fetch time from each node 4) Co-ordinator calculates average time difference 5) Co-ordinator adds average time difference to its current clock 6) Co-ordinator broadcasts current time over the network
77
What are the 4 steps of **NTP** (Network Time Protocol)?
Time synchronisation over the Internet 1) Clients sends T0, server receives T1 and sends T2, client adds T3 2) Round-trip delay, d = (T3-T0) - (T2-T1) so server time = T2+d/2 3) Clock skew θ = servertime - T3 = (T1-T0+T2-T3)/2 4) Client slowly adjusts its clock (slewing) or resets it (stepping)
78
What are logical clocks?
A tool to understand the order events across different computers/nodes happen No relationship with physical time
79
What are the 4 requirements for Distributed Mutual Exclusion?
No deadlock: 2+ sites shouldn't endlessly wait for messages No starvation: every site that wants to execute a critical section should get an opportunity but shouldn't wait indefinitely Fairness: execute request based on the order they are made Fault tolerance
80
What are the 2 safety properties of DME?
Only one process can remain in a critical section at any time Freedom from deadlock provided by using some algorithm to decide which process takes action
81
What is the liveness property of DME?
Every process trying to enter a critical section must eventually succeed (avoid livelock or starvation) Livelock: when two or more processes continuously change their state in response to each other without making any actual progress Starvation: when a process is perpetually denied access to a critical section despite ready & eligible
82
What is the fairness property of DME?
Access to critical section should happen in a fair order using happens-before ordering
83
What are the 3 ways to enhance performance of DME?
Minimise no. messages sent to each critical section's entry/exit operation Minimise client delay when entering/exiting critical section Minimise synchronisation delay (time between process exiting and next entering)
84
What are the 4 steps in a DME token based algorithm?
1) Unique token shared among all sites 2) If site possesses token, it can enter critical section 3) Use sequence numbers to order requests 4) Sequence numbers used to identify old & current requests
85
What is the centralised token algorithm (DME) and its process?
A token-based algorithm 1) Critical section has a queue and a token 2) A process requests a token, is granted it, and is added to the queue 3) Subsequent token requests from other processes are queued 4) First process releases token and token is granted to next in queue
86
What are the properties of the centralised token algorithm (DME) (safety, liveness, fairness, performance)?
Safety: grant only sent after release received Liveness: all requests are queued Fairness: processes enter critical section in order of queue Performance: entry delay due to message round trip
87
What is the ring token algorithm (DME) and its process?
A token based algorithm 1) Processes are considered in a ring and contain a (potentially empty) queue of items that want access to the critical section 2) In turn, processes access critical section with the older item in their queue and release the token to the next process
88
What are the properties of the ring token algorithm (DME) (safety, liveness, fairness, performance)?
Safety: only one process can hold the token so only one process can enter at a time Liveness: every process eventually gets access Fairness: not fair - order based on token location within ring Performance: 0-N message delay when entering
89
What are the properties of Raymond's tree-based algorithm (DME) (safety, liveness, fairness, performance)?
Safety: only one process can hold token Liveness: can cause starvation if greedy strategy used Fairness: everyone's allowed to hold the token Performance: 0-N message delay when entering and 1 message delay when exiting
90
What are the properties of the Ricart-Agrawala algorithm (DME) (safety, liveness, fairness, performance)?
Safety: process in critical section doesn't reply until it exists Liveness: timestamps ensure each request eventually gets replies Fairness: timestamps and clocks ensure fair ordering Performance: large entry 2(N-1) and exit delay, 0 to N-1
91
What are the properties of Maekawa's algorithm (DME) (safety, liveness, fairness, performance)?
Safety: processes can only vote for one process at a time so only one process can gain enough votes to enter critical section Liveness: without happens-before ordering, easy to deadlock if 2+ processes request at the same time Fairness: can be made fair by using Vector clocks to determine request order Performance: entry & exit delay
92
What are the 4 factors to consider when conducting a leader election?
Communication type: synchronous or asynchronous Process identifiers: processes are anonymous or eponymous Network topology: ring / acyclic graph / complete graph Network size
93
How do processes compare identifiers in ring leader elections?
A process receives an election message: * If identifier is greater than own, it forwards message * If identifier is less than own, mark self as participant, substitute in own identifier, and forward message. If already a participant, do nothing * If identifier is own, declare self leader, mark as non-participant, and send elected message to neighbour * Processes receive elected message and mark themselves as non-participants and forward message
94
What is the best and worst case performance of ring leader election?
Best case: if election initiator has highest identifier, 2N messages Worst case, if anti-clockwise neighbour has highest identifier, 3N-1 messages
95
What is bully election used for?
When the existing coordinator fails
96
How is a leader determined in bully election?
1) A process detects that the current coordinator has failed 2) It sends an election message to processes with higher IDs 3) The non-failed processes with higher IDs send an answer 4) These processes do the same until the highest alive process declared victor and becomes coordinator
97
What is the best and worst case performance of bully election?
Best case: failure detected by process with second highest ID, N-2 messages Worst case: failure detected by process with lowest ID, O(N^2)
98
What are the 3 purposes of distributed systems?
To parellelise computation To share resources To have redundancy (fault tolerance)
99
What are the 3 V's of BigData?
Volume - quantity of data Variety - diversity of data Velocity - speed data is generated & processed
100
What is the cloud?
A network of remote servers that users/IoT devices send data to to store, manage, and process
101
What does fog computing do?
Extends cloud computing to the edge of the network Bring computational resources closer to end-users
102
What are the 7 challenges of distributed systems?
Heterogeneity Openness - the ability to add more resources and integrate additional services Scalability Failure handling - failure detection, masking, toleration, and recovery Concurrency Transparency Quality of service - e.g. the ability to meet deadlines
103
What is heterogeneity?
A reference to the presence of diverse elements or components within a system (networks, hardware, OS, programming languages)
104
What is middleware?
A software that provides abstraction and masks heterogeneity
105
What are the 4 challenges of scalability?
Controlling cost Controlling performance loss Preventing software resources depletion Avoiding bottleneck
106
What are the 3 distributed system models?
Physical Models Architectural Models Fundamental Models
107
What are physical models
Computers and interconnecting networks
108
What are architectural elements in architectural models?
Computational and communication tasks Describe the relationships & interactions within a system
109
What are the 2 perspectives of viewing communicating entities?
System-Oriented Perspective: lower level - what is running Problem-Oriented Perspective: higher level - can I abstract what is running
110
What are the 3 communication paradigms (how entities communicate)?
Inter-process communication: message passing & sockets Remote invocation: based on two-way exchange (request-reply protocols) with sender-receiver coupling Indirect communication: sender & receiver are decoupled
111
What are the 2 types of remote invocation?
RPC (Remote Procedure Call) - client requests execution of function on remote server and receives the result RMI (Remote Method Invocation) - object-oriented RPC; invoked objects can invoke other objects
112
What are the 2 types of data distribution?
Replication: good fault tolerance and load balancing but data consistency difficult Partitioning: good data consistency but limited fault tolerance
113
What are architectural patterns in architectural models?
How architectural elements are organised & combined
114
What are the 2 key organisational architectural patterns?
Layering: logical organisation Tiering: physical organisation
115
What is layering (architectural pattern)?
Where services/components are organised vertically into service layers Each layer provides abstractions and hides details of lower layers
116
What is tiering (architectural pattern)?
Where services/components are are deployed on separate servers
117
What are fundamental models?
Simplified representations of complex systems aimed at understanding their underlying principles and behaviors
118
What are the 3 ways to measure the performance of communication channels?
Latency: start of transmission to start of reception (s) Bandwidth: amount of info transmitted at a given time (bit/s) Jitter: variation in time to deliver series of messages (ms)
119
What are the 3 ways a communication channel can fail?
Channel omission failure: when messages aren't delivered to intended recipient due to channel omitting the message Arbitrary failure: nodes may behave arbitrarily Timing failure: relevant in synchronous systems
120
What are the 4 ways nodes may behave arbitrarily in communication channel failures?
Send arbitrary messages at arbitrary times Wrongfully omit or delay actions Incorrect actions Malcious behaviour from compromised nodes
121
What are the 2 ways to deal with communication channel failures?
Masking: replicate processes and retransmit messages Conversion: use checksum to detect corrupted messages & discard them
122
What are the 3 drawbacks of multicast?
Message may not arrive ordered at recipients Omission failures if message fails to reach recipient Doesn't tolerate process failure
123
What are the 4 multicast orderings?
FIFO multicast Causal multicast Total order muliticast FIFO-total order multicast
124
What is FIFO multicast?
Messages sent by the same node must be delivered in the order they were sent
125
What is causal multicast?
If a message causally precedes another, it is guaranteed to be delivered in that order
126
What is total-order multicast?
If m1 is delivered before m2 on one node, m1 must be delivered before m2 on all nodes
127
What is Eager Reliable Broadcast?
Mitigates the possibility of broadcasted messages getting dropped by the network Whenever a node receives a message, it rebroadcasts it to every other node
128
What are the 3 multicast strategies?
Basic multicast Reliable multicast Ordered multicast
129
What is basic multicast?
A sender transmits data to multiple recipients simultaneously If multicaster doesn't crash, a process will deliver the message Uses B-multicast & B-deliver
130
What is B-multicast and B-deliver?
g=group, m=message, p=process 1) A node in an application calls B-multicast(g,m) 2) Send m to each process p in g using send(p,m) 3) p receives(m) and B-deliver(m) is called at p
131
What is reliable multicast?
A multicast that tolerates process crashes Assumes closed group and guarantees integrity, agreement, and validity
132
What is the process of R-multicast?
Sender multicasts m to all p in g and, on first time receiving m, receivers multicasts m to g and delivers m to p Inefficient: O(N^2) B-multicasts for every R-multicast
133
In the Byzantine Generals problem, how many generals are needed in total to tolerate f malicious generals?
3f+1
134
What are the 3 steps in choosing a consensus in consensus algorithms?
1) Send a proposed value via total-order multicast 2) Wait until N values received 3) Agree on decision mechanism (majority, highest/lowest value, msg order)
135
How is consensus reached in synchronous systems with crash failures?
Each process maintains a set of values known to it after each round and multicasts any new values recorded in the previous round If F processes crash, we need F+2 processes and F+1 rounds
136
What 2 ways can consensus be reached in asynchronous systems?
Replicating data Distributed transactions
137
What is CAP Theorem?
The idea that consistency, availability, and partition tolerance are desired properties for a replicated data store but only two can be attained C: every read receives the most recent write or error A: every request receives a non-error response P: the system continues to operate despite messages getting dropped/delayed
138
What are AP systems?
Systems with availability & partition tolerance Suitable for systems where availability is critical and eventual consistency is acceptable
139
What are CP systems?
Systems with consistency and partition tolerance Suitable for systems where consistency is critical, even at the cost of availability
140
What are CA systems?
Systems with consistency and availability Suitable for distributed systems with reliable networks where partitions are unlikely
141
Strong vs weak consistency models
Strong: prioritise consistency over availability; global order of updates Weak: prioritise availability over consistency; no global order of updates; different replicas may have different views of data
142
Passive vs active replication strategies
Passive: one replica serves as primary, while others are backups; client solely interacts with primary Active: clients communicate with a group of replicas
143
What are the 5 consistency models strongest to weakest?
Strict consistency Linearisability Sequential consistency Causal consistency Eventual consistency
144
What is strict consistency?
A write to any variable by a replica is immediately available to all other replicas
145
What is linearisability?
Reads and writes are executed as if they are in a single linear order, despite being distributed Every process must have a perfectly synchronised clock Total-order multicast is used
146
What is sequential consistency?
Operations of all processes appear in a total order that respects the program order of each individual process Reads return local copy, writes trigger a total-order multicast; replicas update local copy and return ACK
147
What is causal consistency?
Writes that are causally related are seen by all processes in the same order, but concurrent writes may be seen in different orders
148
What is eventual consistency?
Eventually, all replicas will converge to the same value, but no guarantees are made about the order in which updates are seen Reads may not see the most recent writes
149
Operation-based vs state-based **CRDT** (Conflict-free Replicated Data Type)
OB: when writing, broadcast the operation; when receiving, apply broadcasted operation SB: when writing, broadcast full state; when receiving, merge broadcasted states (e.g. max merge of (<8,3,10>,<7,6,11>)=<8,6,11>
150
What are quorum-based protocols?
An approach for implementing consistency across a number of replicas Clients read from a read quorum and write to a write quorum; these two quorums intersect to ensure consistency After writes to the quorum, replicas propagate changes to other replicas
151
What is remote invocation?
A program running on one computer can execute code on another computer over a network
152
What is marshalling?
The process of converting a data structure/object from memory representation to a format suitable to transmission over a network
153
What does an **IDL** (Interface Definition Language) do?
Describes an interface by defining structure, types, procedures, functions, and methods
154
Web server vs web service
Web server: what browsers interact with over Internet via HTTP Web service: an interface that clients can access over the Internet
155
Why do web services have loose coupling?
To minimise dependencies between different web services So changing one web service doesn't require the update of other services
156
What is SOAP (Simple Object Access Protocol)?
For exchanging structured information in the implementation of web services Creates a strong coupling between clients and web services Uses XML-based messaging
157
What is **REST** (REpresentational State Transfer)?
A simpler, looser-coupled alternative to SOAP Focuses on resources rather than operations allowed on them Uses HTTP methods Stateless
158
Stateful vs stateless design
Stateful: each request is aware of previous interactions Stateless: treats requests as independent interactions
159
What does atomic mean?
That all operations within a transaction must be successfully completed or none must complete
160
What are the ACID properties of transactions?
Atomicity: transaction must be all or nothing Consistency: transaction takes system from one consistent state to another Isolation: no interference from other transaction Durability: transaction effects are saved in permanent storage
161
What does it mean if a system is serializable?
The final state of a system is the same as if transactions were executed serially
162
What is the Lost Update Problem?
When 2+ transactions attempt to update data concurrently and 1+ of these are lost/overwritten leading to inconsistencies
163
What is the Inconsistent Retrievals Problem?
Where concurrent transactions read data that is in an inconsistent state due to ongoing updates by other transactions
164
**When** is Optimistic Concurrency Control used?
When... * conflicts are infrequent * cost of locking is high * low contention & high read-to-write ratios
165
What is a dirty read?
When a transaction reads data that has been modified by another transaction and not yet committed
166
How are cascading aborts prevented?
Transactions are only permitted to read objects that have been written by transactions that have committed
167
What are premature writes (3)?
1) A transaction successfully completes a write operation 2) It encounters an issue/conflict and aborts 3) The object is now in an inconsistent state