Lecture-2 - Architecture of Distributed Systems
Lecture-2 - Architecture of Distributed Systems
Primitive Description
BEGIN_TRANSACTION Mark the start of a transaction
END_TRANSACTION Terminate the transaction and try to commit
ABORT_TRANSACTION Kill the transaction and restore the old values
READ Read data from a file, a table, or otherwise
WRITE Write data to a file, a table, or otherwise
Transaction Processing System
• Exact list of primitives depends on what kinds of objects are being
used in the transaction.
e.g. mail system - may be primitives to send, receive, and forward
mail.
e.g. accounting system - may be different.
• Ordinary statements, procedure calls, etc., are allowed inside a
transaction.
• Remote procedure calls (RPCs) procedure calls to remote servers,
are often also encapsulated in a transaction, leading to what is
known as a transactional RPC.
• if the system has certain invariants that must always hold, if they
held before the transaction, they will hold afterward too
• no failure after the commit can undo the results or cause them to
be lost
e.g.
• a transaction starts several sub transactions in parallel, and one of
these commits, making its results visible to the parent transaction.
• after further computation, the parent aborts, restoring the entire
system to the state it had before the top-level transaction started
• the results of the sub transaction that committed must
nevertheless be undone.
Problem of Sub Transactions
Solution: