Middleware
Middleware is a type of software used to manage and facilitate interactions between applications across computing platforms
What is Middleware used for?
Middleware enables the distribution of applications to multiple computers in the network
Middleware technologies (3)
Abstractions of middleware
Remote Procedure Calls (RPC)
A remote procedure call is the synchronous language level transfer of control between programs in disjoint address spaces whose primary communication medium is a narrow channel.
Ein Remote-Prozeduraufruf ist die synchrone Übertragung der Steuerung auf Sprachebene zwischen Programmen in disjunkten Adressräumen, deren primäres Kommunikationsmedium ein schmaler Kanal ist.
What are RPC used for?
Client Stub
2. Marshals (verpacken) arguments and sends request message to server
Server stub
Marshalling: How is problem of serialization of Arguments and return values of procedures solved?
-> Standard protocols and encodings are key for interoperability between different middleware systems
Binding: How is problem of specifying what server the client want to bind to solved?
Static Binding: Client statically bound to address of
server
+ Simple, No Overhead
- No load balancing, No failover (Ausfallversicherung)
Dynamic Binding: Client dynamically locates server before (first) call
+ enables load balancing, redundant servers provide failover
- Requires additional service, Overhead of lookup
Portmapping and dispatching: How is problem of dispatching requests to correct process and procedure solved?
Portmapping in RPC:
What are the three types of Middleware?
Message oriented middleware (MOM)
Message oriented middleware (MOM) is any middleware infrastructure that provides messaging capabilities . It provides a means to build distributed systems, where distributed processes communicate through messages exchanged via message queuing or message passing
How are messages exchanged?
Massage passing (Asynchronous)
- refers to transient communication between two processes that are active at the same time
Message Queuing
-The message queuing model requires an additional intermediary component, which is called the message queue (essentially a mailbox independent of the receiver)
Message Broker
What are two MOM software examples
Microsoft Message Queue
- Used for simple integration of Windows applications
WebSphere MQ
Transaction Oriented Middleware (TOM)
Transaction Oriented Middleware (TOM) is any middleware infrastructure that supports the execution of electronic transactions in a distributed setting
Two-Phase commit
Prepare Phase: A coordinator (usually the process that initiates the committing) obtains approval or denial to commit the data changes of all the processes involved
Commit Phase:
(When all participants agree) the coordinator decide to ‚Commit’. If the decision has been made, the coordinator informs the participants of the result in the second phase
What does ACID (transactions) stand for?
atomicity, consistency, isolation, and durability
Automicity
Each transaction is either fully executed or not at all (rollback if something fails)
Consistency
Transaction leaves database in a consistent state given it was consistent before the transaction
Isolation
Transactions cannot influence other transactions when
executed parallel