CHAPTER 5 Flashcards
What is the application server middleware?
Programming model abstractions that allow the developer to focus on application logic, i.e., ignore infrastructure as much as possible
What are the tasks of the application server middleware?
Distributed computing infrastructure (RPC/RMI); Transactional capabilities (transactional rpc/rmi, programming abstractions, distr. trans. management); scalable and efficient application processing; unified access to heterogeneous information sources; security services; reliability and high availability.
What are the types of application server middleware?
- Object broker (e.g. CORBA)
- TP Monitor,
- Object transaction monitor (TP monitor + object broker)
- Component transaction monitor (TP monitor + Distributed objects + server-side component model)
Describe TP Monitor:
One of the oldest form of middleware. It has the capabilities of (T)RPC and additional capabilities, such as: process management, high number of connected clients (10ˆ2 - 10ˆ4), concurrent execution of functions, access shared data, flexible load balancing, administrative functions.
Describe Standard Object Broker (CORBA)?
It’s an object-oriented, universal middleware platform(based on RMI concept). It has a object request broker responsible for managing stubs (client-side) and mapping RMI to object adapter (server side). The object adapter generates object references, maps RMI to server objects, activates/deactivates/registers server objects.
EJB and CORBA
Enterprise JavaBeans(EJBs) has interoperability with CORBA: Invocation (RMI/IIOP). services.
How is deployment is EJB?
EJB is portable and server-independent. Mapping of bean attributes to DB structures. It is specified using source code annotations (specified at development time) or an XML deployment descriptor (customization at deployment time)
During deployment glue-code based on component properties are generated, it makes the classes and interfaces known, and it sets environment/context variables.
transaction composability problems.
you cannot create a compose transaction made of two other existent transactions, because the others transactions would start their own, separate transactions and commit independently.
What are the possible solutions to the transaction composability problem?
1-> system ignores start and commit. If abort occurs, there are 3 options: permit abort (complete trasaction needs to abort), disallow abort (threat as program error), ignore abort (the calling program needs to handle the problem).
2 - separate request processing code from transaction demarcation code (or introduce wrapper procedures).
3 - support extended explicit demarcation
4 - Implicit demarcation based on transaction attributes
5 - nested transaction programming model
which are the Transaction demarcation approaches?
Explicit demarcation
Implicit demarcation
Combination of both approaches in distributed IS
Explain implicit demarcation:
In implicit demarcation a method invocation may result in starting a new transaction. The top-level method may call other methods, but execute in the same transaction if attribute is „required, mandatory, or supported“. The transaction commits if top-level method and all submethods terminate without error but it aborts if the top-level method or any method throws an exception
explain Nested transactions
It has top-level transactions with subtransactions nested inside them.
The top-level transaction (TA) is created when program is not executing within a TA already and issues a start command. Sub-TA: is created when program is already running within a (parent) TA and issues a start command. If subtransaction abort, then all operations of the subtransaction are undone and the parent is only notified.
Name the transaction processing standards:
X/Open DTP; CORBA object Transaction service; JTA and JTS
How does it work distributed transaction support for JDBC?
It requires interaction with a transaction manager (X/Open DTP, java transaction service - JTS). It has demarcation of transaction boundaries. DataSource interface helps to make distributed transaction processing transaprent to the application
Shared states in TP System:
Components of a TP system may need to share state information, such as information about transaction, users, activities, and the components (TA-managers that need to participate in commit proc.
explain Sessions in TP systems
Sessions are commonly used in TP for database session, session involving client/server process. It is a lasting connection between two system components (e.g., processes) to share state. It avoids resending/reprocessing information in every message
explain Stateless servers
Stateless servers can be used to avoid problems as: session ties the client to a particular server process; session is lost if server process fails; retaining shared state for a large number of clients costs a lot of memory for the server. However, sometimes stateful applications are required.Ex.: User request involves multiple transactions; server needs to use previous request to customize the current one; user accumulates data in multiple steps (e.g., shopping cart)
Name the types of objects in EJB:
Session object; entity object (persistent, transactional business object); message-driven object
Enterprise Bean consists of (ejb-jar file):
class implementing business logic ; bean business interface, defining methods(e.g., cart); deployment descriptor/meta-data
Name advantages and disadvantages of multithreaded processes for TP:
Advantages: save memory; context switching is cheap; helps reduce the number of processes
Disadvantages: Little/no memory protection between threads; imposes requirements of multithreading support for resource managers client support
What is a server class?
It’s a set of single-threaded processes, all runing the same program. It emulates a pool of threads. It’s a popular approach in classes TP-monitors
Name the advantages and disadvantages of server classes:
advantages: It’s a good alternative, if multithreaded operation sstem processes are not available. It doesnt need to trap synchronous I/O calls, it has no potential scheduling conflicts, failure of individual process doesn;t bring down the complete server class, each process can use single-threaded services
Disadvantages: one process per thread (expensive), additional scheduling for load balancing required.
one solution to solve transaction composability problems is to make the system ignore start and commit. In this case, what can happen if an abort occurs?
If abort occurs, there are 3 options: permit abort (complete transaction needs to abort), disallow abort (threat as program error), ignore abort (the calling program needs to handle the problem).