next up previous
Next: Known uses Up: BATCHING: A Design Pattern Previous: Consequences


Related patterns

Both Program and ControlStructure rely on instances of the INTERPRETER pattern [5]. Indeed, the interpreter of a Program is behind its run method.

Program, ControlStructure, and Commands make up an instance of the COMPOSITE pattern [5]. Composite programs, such as Sequence and Conditional, are aggregates of Assignments, ServerCalls, and other primitive commands. If an instruction set for a BATCHING language is to be compiled, Program might include a method to compile itself into a low-level instruction set. Moreover, Programs should be (de)serialized when transmitted to the server. Once in the server, they can be verified for correctness. All these tasks can be implemented following the VISITOR pattern [5].

A server call issued within a Program might fail or trigger an exception. If that is the case, the whole Program can be aborted and program state transmitted back to the client--so that the client could fix the cause of the error and resume Program execution. The MEMENTO pattern [5] can encapsulate the program state while in an ``aborted'' state. As said before, such program state can be used to resume the execution of a failed program (e.g. after handling an exception.)

MEMENTOs can also be helpful for (de)serializing the program during transmission to the server.

As a program can lead to an endless client request, single threaded or a-request-at-a-time servers can get into trouble. To accommodate this kind of server so that BATCHING could be used, the ACTIVEOBJECT [8] and the RENDEZVOUS [7] patterns can be used.

COMPOSITEMESSAGES can be used to transfer the Program from the client to the server. The COMPOSITEMESSAGES pattern [14] applies when different components must exchange messages to perform a given task. It allows grouping several messages together in an structured fashion (it does with messages what BATCHING does with server entry-points). In that way, extra latency due to message delivery can be avoided, and components decoupled from the transmission medium. The main difference is that BATCHING is targeted at the invocation of concrete server-provided services, not at packaging data structures to be exchanged.

Last but not least, COMPOSEDCOMMAND [16] is similar to BATCHING in that it bundles several operations into a single one. However, BATCHING is more generic in spirit.


next up previous
Next: Known uses Up: BATCHING: A Design Pattern Previous: Consequences
Francisco J Ballesteros
1999-09-22