A simple example of recursion is a manufacturing company that makes a ball point pen.
The ball point pen in made up of four components:
The refill, (which itself has components, called a sub-assembly),
- A plastic tube in which the ink resides,
- the ink,
- the metal tip at the bottom of the tube in which the ball resides,
- the ball.
the cylinder in which the refill resides,
a top cap that plugs the top of the cylinder.
a bottom cap that protects the refill tip and sports a clip for holding the pen in a shirt pocket.
A hierarchy picture of this:
Finished good, Pen
refill cylinder top cap bottom cap
tube ink metal tip ball
In order to find the low-level cost to the company of manufacturing the pen, we need to find the cost of each component and add those costs together.
For the non-Tymeac environment, this is a nightmare. The simple process to get the cost of the refill must now "save its storage, pointers, etc" and execute another process to compute the inner costs. It is tedious, time consuming and the chaining of storage areas has lead to more storage violations and exceptions then are countable. (Also, for every other application where recursion is necessary, the programmers must develop a custom solution.)
For the Tymeac environment, this is a piece of cake. One sets up:
- eight Tymeac Queues -- one for each of the four top-level get-Cost processes and one for each of the four sub-assembly, (refill), get-Cost processes,
- two Tymeac Functions -- one for the list of top-level Queues necessary to complete the request and one for the list of the sub-assembly, (refill), Queues necessary to complete the request.
The client uses a call for the top-level Tymeac Function to process the request.
The top-level process to get the cost of the refill simply uses a call for the sub-assembly Tymeac Function to process the inner request.
The saving/restoring, coordinating, timing, scheduling, monitoring, and managing are handled by Tymeac.
The system architect can concentrate on solving business problems.