Units 5 & 6 Flashcards

(60 cards)

1
Q

Software archtiectures

A

concerned with the structure of a system

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

Fault tolerance

A

the ability of a system to respond gracefully to an unexpected hardware or software failure

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

Client-server style architecture

A

server - service provider role - waits for arrival of requests

client - issues requests to the server + awaits responses

server process is normally placed on a different host than the client process

server typically manages large amounts of data + files

many clients can connect to one server

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

Load balancing

A

avoiding situations where one component has to do all the work, while other components remain idle

enables the available resources to be better utilised

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

Multiple servers acting together

A

variation of client server style - 2 ways:

  1. data partitioning
    • resources are distributed among the servers
    • each server is responsible for its own section
    • servers interact with each other to provide replies to
      requests
  2. data replication
    • each server holds an identical copy of the data
    • better performance + availability + improved fault
      tolerance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Proxy servers

A

a server that acts as an intermediary between clients and other servers

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

Peer-to-peer style

A

an architecture in which computer resources + services are directly exchanged between computer systems without the need for distinct clients and servers

computers communicate among themselves + can act both as clients and as servers

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

Which factors measure the performance of a distributed system’s software architecture ?

A

throughput

responsiveness

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

What are the weaknesses of the client-server style?

A

central role of the server forms a bottleneck + thus limits the performance of the system

this central role also forms a single point of failure - if the server goes down the whole system goes down

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

What is load balancing?

A

a strategy to improve the performance of a distributed system such that the workload is shared among many processes

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

Two-tier model

A

the clients, taken together, form one tier - the client tier

the database sever forms another tier - the database tier

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

Layer

A

a layer of software in which implementation details are hidden but functionality of the layer can be invoked through a well defined interface

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

OSI model

A

defines a modular approach to networking, with each layer responsible for some discrete aspect of the networking process

  1. Application layer
  2. Presentation layer
  3. Session layer
  4. Transport layer
  5. Network layer
  6. Data link layer
  7. Physical layer

each layer able to communicate with layer directly above or below

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

Software component

A

an independent software unit that can be combined with other components to create a software system

each component has an interface

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

Interface

A

an abstraction that a component or some other entity provides of itself to the outside

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

What are thin + thick clients?

A

Thin clients do not carry much processing and leave this to the server

Think clients carry out more processing

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

Java Platform Enterprise edition (Java EE)

A

EIS tier - holds application data + stores it permanently in some kind of database

business tier - contains the software relating to the business logic

web tier - required in those cases where the clients are web clients, role is to make business logic accessible for we applications

client tier - presentation or user interface of the application as a whole

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

Asynchronous message passing

A

sending + receiving processes to not have to be at their synchronisation points at the same time

possible that one process is ahead of the other

if receiving process is ahead of the sending process it will have to wait

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

synchronous message passing

A

both processes are required to be at the point of sending + receiving at the same time

the message goes straight from the sending process to the receiving process

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

Addressing

A

needed so processes in a distributed system can identify each other in order to communicate

addressing is a standard naming process

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

IP address

A

a symbolic address of a computer

for communication to be possible the IP address has to be translated + the actual computer located - done via Domain Name Service (DNS)

port is also needed - map incoming data to a particular process running on a computer

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

What form of communication requires a buffer?

A

asynchronous communication

if a message arrives before the recipient is ready to receive it the message must be stored somewhere - i.e. buffered until the recipient can read it

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

Marshalling

A

the process of taking a collection of data items + assembling them into a form suitable for transmission in a message

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

Unmarshalling

A

the process of disassembling a message on arrival in order to produce the equivalent collection of data items at the destination

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Socket
to communicate client + server processes in Java can use a socket it provides various streams on which messages can be transferred associated with a port + IP address client + server are connected by 'plugging together' their respective sockets each sock has an input stream + an output stream
26
ServerSocket
objects of this class are used by the server to listen for connection requests from clients then establishes a socket connection with each client associated with a port where it can listen for a request using the method accept
27
Socket (class)
object of this class is used to establish a connection between client + server processes its constructors (more than 1) associate a new socket with a specified host (IP address) + host port client + server must each construct a socket methods: getInputStream + getOutputStream
28
Using pseudocode, give an outline design of the code for a server which can communicate with several clients not just one
listen for clients on ServerSocket while(true) { create a socket for the newly arrived client create thread to handle communication with the client start the thread }
29
Remote Procedure Call (RPC)
aim to make communication distribution transparent i.e. hide the complexities of a distributed system (procedure call = method call)
30
Procedure call (i.e. method call)
'normal' - procedure is called at a certain point in the program + this causes the code associated with the process to be executed remote location - procedure has to be executed by a process not on local machine Steps: 1. set up 2 way communication (sockets + streams) 2. package message that specifies procedure call (name of process + any arguments) (processes at bot ends must know how to pack + unpack) 3. send message containing request to remote process (calling process now waits) 4. on receiving request the remote process: - unpacks message - executes procedure - packages any return value - sends result back 5. calling process receives results, unpacks + call in now complete
31
Middleware
aims to mask heterogeneity of underlying platforms in a distributed system (networks, hardware, operating system)
32
Messaging system paradigm
messages do not go straight from sender to receiver - go through intermediary object sender deposits message with the messaging system + it looks after the message from that point onwards job of delivering message to appropriate receiver is that of the messaging system - forwards message to the queue associated with the appropriate receiver - will hold until receiver is ready to receive it
33
Publish/subscribe messaging model
each message associated with a topic or event an object that generates certain events will publish the event + other processes are allowed to observe applications interested in the event may subscribe to messages for that event when the awaited event occurs, the process publishes a message announcing the event or topic - known as the notification middleware messaging system distributes the message to all subscribers for that event
34
Multicast
sender can send info to a group of destinations simultaneously
35
Unicast
sender + receiver are in a one-to-one relationship sender sends message to each individual recipient
36
Database
an organised collection of data used when dealing with large amounts of data that need to be stored independent of any running program
37
Persistent storage
data that is held in volatile memory will disappear when the device is switched off persistent data outlives the execution of the software program that created it
38
Transaction
a sequence of atomic actions where we want the whole sequence to be performed in its entirety or not performed at all
39
Failure atomicity
if a transaction fails, it is as if nothing had happened
40
ACID properties
desirable properties of a transaction Atomicity all operations in transaction performed or not at all Consistency transforms the system from one consistent state to another Isolation cannot reveal any part of its state until committed Durability once transaction committed the system must guarantee the result were persist even if there are subsequent failures
41
Transaction states (5 states)
Active - initial state - while executing remains in this state - transaction.start() Partially Committed - state after final operation has been executed Committed - state are successfully completed transaction - transaction.commit() Failed - state when discovery made that normal execution cannot proceed Aborted - state when transaction has been rolled back + its effects are undone - transaction.rollback()
42
Transaction Processing System (TP System) aka TP monitor
manage the correct + efficient execution of transactions located between clients + the database
43
Components of TP monitor | Transaction Processing System
Transaction manager - provides interface - validates requests - passes operations to scheduler Scheduler - makes sure all the operations are executed in the right order Recovery manager - deals with recoveries from crashes Cache manager - organises objects in main memory + interfaces to persistent memory
44
Schedule
a sequence of operations that specifies the order in which operations of concurrent transactions are executed
45
Serial scheduler
transactions executed in a strict serial order | non-serial - operations interleaved
46
Precedence graphs
used to test whether a given schedule shows a serialisable execution of the transaction - must show no cycles read + write operations that relate to different data objects do not affect each other conflicting operations - only conflict if one is a write on same object by different transactions (2 reads ok)
47
Pessimistic algorithms (transactions)
assume that there are likely to be conflicts + they take measures to avoid them
48
Optimistic algorithms (transactions)
assume conflicts are likely to be rare + can therefore be dealt with after the event
49
Two-phase locking (2PL)
aim of the 2PL algorithm is to ensure the schedules for transactions are such that effects of transactions on shared data are serially equivalent 2 phases: acquire - transaction gradually acquires locks it requires as + when it needs them release - transaction unlocks the locks by: 1. strict 2PL - releases all locks on commit or 2. non-strict - transaction can let go of locks gradually after it has finished with them
50
Write lock
transaction can only acquire a write lock for an object if no other transaction currently holds a write or read lock for that object
51
Read lock
transaction can only acquire a read lock for an object if no other transaction currently holds a write lock for that object
52
Time-stamp ordering
assigning a unique time-stamp to each transaction enforces that pairs of conflicting operations can only be executed in the order of the time-stamps prevents cycles
53
Advantages + disadvantages of time-stamp ordering
efficient + fewer deadlocks few overheads can suffer from high levels of aborts more restrictive than 2PL
54
Optimistic currency control
goal to avoid overheads + problems associated with locking mechanisms based on likelihood that 2 clients want to access the same data is minimal Phases: 1. Working phase - transaction works with a copy of the most recently committed version of the object 2. Validation phase - closeTransaction issued a check for conflicts is carried out - if succeeds the transaction can commit - if fails, this or another transaction will need to be aborted 3. Update phase - if validated the tentative objects that the transaction has worked on will be made permanent
55
What is a shared lock?
useful when non-conflicting operations are using the same object increases concurrency
56
What is a simple alternative to deadlock detention?
Timeouts
57
What are cascading aborts?
occur when one transaction has to abort which leads to other transactions having to abort bad for performance as much work may need to be repeated
58
Crash resilience
system is able to continue processing by making use of recovery techniques aka fault transparency create illusion that a failure never happened
59
Approaches for supporting rollback
logging - for each update a record is kept (transaction ID, before image, after image, whether committed or aborted - when system restarts after a crash the log is analysed + partially complete transactions are undone shadowing - makes use of duplicate disk pages in stable storage - one page used to make updates + one page (shadow page) is left untouched - when transaction is committed the new page replaces the old page
60
Rational databases
data is conceptually organised in the form of a table requests for information from db are made in the form of queries ( e.g. SQL)