Going back to the example of a printer spooler from chapter one, we can see
that the operations in this service are in fact made up of several
sub-operations, and that some of these operations should be implemented as
transactions.
-
Add ;SPM_quot;file;SPM_quot; to printer queue - succeeds returns q# or fails
This must transfer a local file to a remote spool area, and place a new entry
in the queue. Several failures are possible (the file transfer fails due to
network failure, the spool area is full, the queue itself is full, etc).
-
Remove q# from queue - succeeds, returns ok, or q# not in queue
This must check that the q# is not currently printing, and that
the remover is the owner of the queue entry.
-
List queue
This should read the queue as it stands and not keep listing new entries if
they are added half way through the ListQueue operation.
We can see that the first two operations write things in the queue (and spool
area), while the third merely reads it.