Lesson 2: Middleware Flashcards
Why would we choose middleware? Give 4 arguments
- It’s mostly invisible
- It provides a standard way of doing things
- It ties together parts of complex systems
- It lets you focus on the core task
State the requirements for remote invocation, client-side
- creating sockets
- converting arguments to bit stream
- interpreting received bit stream
- fault tolerance measures
- multi-threading
- closing sockets
State the requirements for remote invocation, server-side
- creating sockets
- interpreting received bit stream
- converting return values, exception to bit stream
- fault tolerance measures
- multi- threading
- closing sockets
Why do we need middleware?
There is no OS architecture for a multicomputer hardware architecture
(multiple computers, no direct memory access). Middleware enables communication between the nodes in this multicomputer architecture.
Describe method invocation for local objects regarding: object, object reference and interface
Object: consists of a set of data and a set of methods.
Objects reference: an identifier via which objects can be accessed.
Interface: signatures of methods, no implementation
Describe method invocation for remote objects regarding: object, object reference and interface
Remote objects: objects that can receive remote invocation.
Remote object reference:
An identifier that can be used globally throughout a distributed system to refer to a particular unique remote object
Remote interface:
Every remote object has a remote interface that specifies which of its methods can be invoked remotely.
What is the purpose of a remote object reference?
To create unique IDs for objects in a distributed system.
Uniqueness over time, uniqueness over space.
What is contained in a remote object reference?
Host, process, object and object type.
Give differences between local and remote invocations.
Local:
- use object reference
- any public method
- invocation: exactly once
Remote:
- use remote object reference
- limited access, remote interface
- invocation: unknown
What are the middleware layers?
- RPCs and RMIs
- Request Reply protocol
- External Data Representation
Give some fault tolerance techniques
Retry-request message
Duplicate request filtering
Retransmission of results:
-> re-execute call or
-> history table of results, retransmit reply
What is marshalling?
Marshalling is the term used to transform an object in memory to a bitstream.
You can use an external standard (external data representation) or you can use a standard and send this standard along.
What is a proxy and what is it responsible for?
A proxy is responsible for making RMI transparent to clients by behaving like a local object to the invoker. It implements the methods in the interface of the remote object that it represents but instead of executing an an invocation, the proxy forwards it to a remote object.
What is a skeleton and what is it responsible for?
A skeleton is the reverse of a proxy at the server-side. It is responsible for making RMI transparent to servers by behaving like a local invoker to the object.
How does the middleware provide transparency?
It makes the invocation syntax similar to the local invocation.
It hides the underlying complexity by using the same invocation syntax. The use of a remote interface will reflect when an object is remote.