chapter 2 Flashcards
What is Transaction processing application?
Collection of transaction programs that provides functions to automate a given business activity. It typically interacts with an online user (online TP, OLTP)
What is a Transaction program?
Executes number of steps/operations to implement a business function (access shared data, may communicate with other programs/components). Ex.: Order processing on the internet
ACID transactions:
Atomicity (all or nothing)
Consistency (complete TA results in consistent DB State.
Isolation (concurrent TA do no influence each other)
Durability (DB changes of a successfully completed TA are guaranteed to survive. System crash must not cause loss of changes)
Distributed transactions may involve multiple resource managers and it requires global (multi-phase) commit protocol to guarantee atomicity of global transaction. This global commit protocol is handled by a coordinator and involves multiple agents. What are the requirements for the commit protocol?
Minimal effort, minimal response delay, robustness against failures
what are the expected failures in a distributed transaction?
Partial failure (connection loss, etc..), transaction failures, system failure (crash), hardware failure)
Describe the two phase commit used in distributed transactions, in the coordinator view:
two phase commit is observed by two different perspectives. The coordinator and the agent view. In the coordinator view, when a transaction ends, it writes in the log „begin“ and it sends PREPARE for all agents. Then two cases can happen:
1 - The coordinator receives READY from all agents. Then the coordinator write in the log „commit“ and send a Commit to all agents, when all ACK messages are received, the coordinator writes „end“ in the log and terminates.
2 - The coordinator receives from one or more agent FAILED or a TIMEOUT occurs. In this case the coordinator write in the log „abort“ and sends to all agents „ABORT“ message. When all ACK messages are received it writes the log „end“ and terminates.
Describe the two phase commit used in distributed transactions, in the agent view:
In the agent view, when a TA finishes, it goes to wait mode. By this time Two situations can occur:
1 - if the agent receives an ABORT message or a TIMOUT occurs, the agent write in the log „aborted“ and aborts the TA. In the case of a TIMEOUT, if a PREPARE message arrives after that, it send FAILED to the coordinator.
2 - If the agent receives a „PREPARED“ message, it writes in log „prepared, sent a READY to the coordinator, and goes to PREPARED MODE. Then, in the prepared mode, if it receives from coordinator a COMMIT message, it writes in log COMMITED and sends ACK to coordinator. If receives abort it writes in log ABORTED and sends ACK to coordinator.
What are the 3 layers of an information system?
Presentation layer, application logic layer, resource management layer
TOP-Down information system design. What are the steps?
1- define access channels and client platforms
2 - define presentation formats and protocols
3 - define functionality (application logic) necessary to deliver the content and formats
4 - Define the data sources and data organization needed
Top-down approach. Mention the Pro and Con:
Pro: focus on high level goals. Addresses both functional and non functional requirements.
con: can only be applied if IS is developed from scratch
Bottom-up information system design approach. What are the steps?
1- define access channels and client platforms
2 - examine existing resources and their funcionality (RM layer)
3- wrap existing resources, integrate them into consistent interface (AL Layer)
4 - adapt output of AL for client (P layer)
Design focuses on integration/reuse of existing (legacy) systems/applications
Pro and con from Bottom-up design?
Not an advantage, but a necessity
explain 1-Tier Architecture
Monolithic system
All layers combined in a single tier
Threated as black box
Advantages: Optimizes performance by merging the layers as necessary. Cliet development, deployment, maintanance is not an issue.
Disadvantages: difficult and expensive to maintain.
explain 2-tier architecture
Presentation layer moved to pc (exploit processing power of pc)
typically relaized as client/server system
Thin client/fat server vs. fat client/thin server
Pro: emphasis on services provided by server, requested/consumed by client
Con: scalability is often limited. Client is often turned into an integration engine interacting with multiple types of servers
3-tier architecture
Clear separation between the 3 layers
addresses scalability
Disadvantages: increased communication