multiple lower-layer transactions. To
abort the higher-layer transaction, the
system may need to issue compensated lower-level transactions that undo
the effect of the upper one.

Example 1. The trip to Europe. Now
let’s consider some side effects that
may result from a simple business trip
to Europe.

˲ I make a reservation for a Wednesday night at a hotel in Paris. This is part
of a set of reservations for airplanes,
cars, and hotels for my weeklong trip
to Europe.

˲ The reservation causes the occupancy of the hotel to cross a threshold
so more staff and food for the restaurant are needed.

˲ The hotel restaurant orders a new
shipment from the grocer for Tuesday.

˲ The grocer calls the shipping company for a delivery on Tuesday.

˲ The shipping company notices a
projected shortfall in its petrol fuel
supplies and orders more fuel for
Monday.

˲ Then I cancel my trip to Europe.

side effects in life outside of computers. Here are a few to contemplate:

˲ Messages into and out of a microservice are typically logged for monitoring purposes.

˲ Competition for any resource may
cause congestion and delay for other
competing work. This is very much like
the bad luck you experience as you try
to drive on the freeway just as the ball-game is getting out.

˲ Traffic into a microservice may
cause heap fragmentation, impacting the responsiveness of the next
request as the garbage in the heap
is collected.

˲ Writing to the disk may cause the
file system to get full. The next request
is impacted.

˲ I may reserve a seat on an airplane, causing the next request by
someone else to fail. It doesn’t matter
if I later cancel and don’t use the seat.
The other flyer still loses and won’t be
on that flight.

Each of these examples can be driv-en by work that is subsequently un-done or aborted at the higher layer ofabstraction. Logically, the work is un-done from the perspective of the higherlayer. Still, there are persistent changesvisible at the lower layers and TMI forthe upper layers to handle.

Transactions Are inthe Eye of the Beholder

The word transaction is used to describe some changes that are all or
nothing. ACID transactions1, 2 refer
to those that are atomic, consistent,
isolated, and durable. These attributes ensure a reliable sense of one
change at a time and are most commonly associated with databases
and database transactions. Transactions are a fascinating tool—and one
I’ve spent a large part of my 38-year
career working on.

It turns out transactions are frequently composed of other transactions at different layers of abstraction.
This is called an open-nested transaction. 4 In an open-nested transaction,
a higher-layer transaction consists of