LECTURE 20: Distributed Computing Broker and Middleware http://en.wikipedia.org/wiki/Problem_Frames_Approach Ivan Marsic Rutgers University
Topics Middleware Broker Design Pattern Java Remote Method Invocation (RMI)
Object Messaging via Middleware
Serialization / Marshalling From software objects to a sequence of bits for network transmission Computer A Computer B Client Middleware Middleware List Sorter List Network 010110011
Middleware Middleware is a collection of objects that offer a set of services related to object communication, so that extraneous functionality is offloaded to the middleware To reduce the number of object’s responsibilities In general, middleware is software used to make diverse applications work together smoothly
Middleware (a) (b) Object A Object B Middleware Object A Object B'
Broker Pattern (a) (b)
Broker Class Diagram (c)
Client-Server RMI/RPC
Java RMI Example
Practical Issues Do not design for patterns first Reaching any solution is the priority; solution optimization should be secondary Refactor the solution to patterns E.g., to reduce the complexity of the program’s conditional logic Uncritical use of patterns may yield worse solutions!