Term
What are some challenges of accessing shared objects over distributed systems? |
|
Definition
- Heterogenity
- Openness
- Security
- Scalability
- Failure Handling
- Concurrency
- Transparency
- Quality of Service
|
|
|
Term
What are the principles of transactions? |
|
Definition
- Atomic - either all are completed or neither are
- Need to be able to 'roll back' to the initial state if transaction fails
- Objects managed on server must remain in a consistent state when accessed by multpiple transactions and in presence of server crashes
|
|
|
Term
Give an example of an atomic method |
|
Definition
public synchronized void deposit (int amount)
throws RemoteException {
...
} |
|
|
Term
How does java atomic methods work? |
|
Definition
- They must have the tag 'synchronized'
- If one thread invokes a synchronized method on an object the object is locked, and another thread invoking one of its synchronized methods is blocked until the lock is released
|
|
|
Term
|
Definition
Survives anything short of a disaster (e.g. mirrored disks)
Useful for applications requiring a high degree of fault tolerance |
|
|
Term
What are the characteristics of a private workspace stable storage implementation? |
|
Definition
- Each current transaction has its own private workspace (Expensive, need to copy a lot)
- File reads do not need a private copy
- File writes only need to maintain a new index and modified blocks
- abort: simply delete private workspace
- commit: move private indices and shadow blocks to parent's workspace (atomically)
|
|
|
Term
What are the characteristics of a 'Write-Ahead logging' stable storage implementation? |
|
Definition
- Modify files in place (but first write record to a write-ahead log in stable storage giving full details)
- If transaction succeeds and commits, write commit record to log
- If it aborts, use log to roll back to previous state
|
|
|
Term
What does ACID consist for? |
|
Definition
- Atomicity
- Consistency
- Isolation
- Durability
|
|
|
Term
What does Atomicity in ACID stand for? |
|
Definition
A transaction either completes or it has no effect at all - even when server crashes |
|
|
Term
What does Consistency in ACID stand for? |
|
Definition
A transaction takes the system from one consistent state to another consistent state
(All values of respective variables must be the same - consistent) |
|
|
Term
What does Isolation in ACID stand for? |
|
Definition
Each transaction must be performed without interference from other transactions (intermediate effects are not visible to others) |
|
|
Term
What does Durability in ACID stand for? |
|
Definition
After a transaction has completed successfully, all its effects are saved in permanent storage |
|
|
Term
What are the fundamentals of the Two-Phase commit? |
|
Definition
- Achieves atomic commits in distributed systems
- Highly resilient even in the presence of multiple crashes
- Once process acts as coordinator - the other processes as subordinates
|
|
|
Term
What does a two phase commit consist of? |
|
Definition
[image]
- Coordinator Writes 'prepare' in log
- Coordinator sends 'prepare' message
- Subordinate(s) receives 'prepare message'
- Subordinate(s) write 'ready in log
- Subordinate(s) send 'ready message
- All replies are collected by Coordinator
- Coordinator writes 'Commit' in log
- Coordinator sends 'Commit' message
- Subordinate(s) receives 'Commit message'
- Subordinate(s) writes 'Commit' message in log
- Subordinate(s) commit
- Subordinate(s) send 'Finished' message
|
|
|