5 - Middleware Flashcards
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)
- Common Object Request Broker Architecture (CORBA)
- Distributed Component Object Model (DCOM)
- Remote Method Invocation (RMI)
- Also: Web Services (extension of middleware concept)
Abstractions of middleware
- Remote Procedure Call
- Distributed Objects
- Message Queues
- Web Services
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?
- RPC allows functions to be called from other address spaces (frequently on another computer on a shared network)
- Usually, the called functions and the calling program are not executed on the same computer
- The general idea of a procedure call fits the request response pattern
-> The client makes a request to some external application, sleeps, and finds the result after
control is returned to the procedure
Client Stub
- Can be called via regular procedure call
2. Marshals (verpacken) arguments and sends request message to server
Server stub
- Receives request message and unmarshals (entpacken)
arguments - Calls server procedure
- Marshals results and sends response message to client
Marshalling: How is problem of serialization of Arguments and return values of procedures solved?
- RPC defines application layer protocol above transport layer
- Format and sequence of messages (requests,
response, binding, etc.) - Mapping to transport protocol(s)
- Format and sequence of messages (requests,
- Additionally, specifies encoding of language types (XDR, XML, ..) to message payload
-> 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:
- Client specifies address, program, and version number of server
- Portmapper returns port of server process
- Server stub dispatches request message to correct method implementation
What are the three types of Middleware?
- Message-Oriented Middleware
- Transaction-Oriented Middleware
- Object-Oriented 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?
- Messages are exchanged peer to peer (mostly in XML format)
- Asynchronous Message Passing
or - Message queue as an intermediary (Message Queuing)
Massage passing (Asynchronous)
- Client does not wait for response
- refers to transient communication between two processes that are active at the same time