chapter 2 Flashcards

1
Q

What is Transaction processing application?

A

Collection of transaction programs that provides functions to automate a given business activity. It typically interacts with an online user (online TP, OLTP)

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

What is a Transaction program?

A

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

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

ACID transactions:

A

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)

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

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?

A

Minimal effort, minimal response delay, robustness against failures

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

what are the expected failures in a distributed transaction?

A

Partial failure (connection loss, etc..), transaction failures, system failure (crash), hardware failure)

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

Describe the two phase commit used in distributed transactions, in the coordinator view:

A

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.

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

Describe the two phase commit used in distributed transactions, in the agent view:

A

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.

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

What are the 3 layers of an information system?

A

Presentation layer, application logic layer, resource management layer

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

TOP-Down information system design. What are the steps?

A

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

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

Top-down approach. Mention the Pro and Con:

A

Pro: focus on high level goals. Addresses both functional and non functional requirements.
con: can only be applied if IS is developed from scratch

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

Bottom-up information system design approach. What are the steps?

A

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

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

Pro and con from Bottom-up design?

A

Not an advantage, but a necessity

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

explain 1-Tier Architecture

A

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.

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

explain 2-tier architecture

A

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

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

3-tier architecture

A

Clear separation between the 3 layers
addresses scalability
Disadvantages: increased communication

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

N-tier architecture

A

Resource layer may include N tiers

Presentation layer may be realized in separate tiers

17
Q

what are the 4 types of unit of distribution?

A
  • Transaction as the unit of distribution
  • Application program as the unit of distribution
  • db operation as the unit of distribution
  • distribution controlled by middleware/dbms
18
Q

explain Transaction as the unit of distribution

A

Transaction routing. Only local transaction processing. No cooperation among nodes/dbs
Pros: Simple solution, easy to supports, works in heterogeneous environments
Cons: Inflexible, limited scope. Transactions restricted to single node (no distributed transactions)

19
Q

explain Aplication program as the unit of distribution

A

Invocation of remote program components through RPC/RMI mechanismss
Each program accesses local DB only
Distributed transaction processing
Pros: Locality of processing (low communication overhead)
Supports application reuse, heterogeneous data sources
Cons: Inflexibility regarding data access operations, potential programing model complexity, db access operation cannot reach across multiple nodes

20
Q

explain db operation as the unit of distribution

A

Programmer aware of multiple data sources
distributed transaction processing (similar to previous alternative)
Pros: High flexibility for data access
Cons: potentially increased communication overhead, programming model complexity

21
Q

explain Distribution controlled by DBMS/Middleware

A

single logical db and db-schema for application programmer
distribution transaction processing
db-operation may span across multiple data sources
Pros: high flexibility for data access
simple, powerful programming model
cons: potentially increased communication overhead, schema integration required.

22
Q

explain Synchronous communication (blocking calls)

A

Thread of execution at the requestor side must wait until response comes back.
Advantage: easier to understand for the programmer
Disadvantage:calling thread must wait, even if a response is not needed for further processing steps

23
Q

explain Asynchronous Communication (Non-blocking calls)

A

thread of execution at requestor side is not blocked

messages queues