or power outage occurred, the browser would not get
a chance to send such a message. However, the fact
that the client’s browser was included as a participant
in the transaction management would mean that, after
a specified time-out period, the transaction would roll
back so it would appear as if the client never started
the task.
Allowing the client’s web browser to participate in
the management of a transaction has the roll-on effect
of also involving the users themselves. Interactions
between the client and the web browser are inherently
unreliable and unpredictable and these problems need
to be addressed within the system design. Tradition-
ally, components in a component-based system are
able to rely on the middleware to provide a level of
guaranteed message deliverly. On the web, there is
no such guarantee and, as such, additional measures
need to be put in place to ensure end-to-end stability.
Additionally, if future support is built into the
browser, it will be possible to allow a client to leave a
task before completion and later rejoin the transaction
from the point where they left. This would be espe-
cially useful for the unexpected client disconnections
as, when the network link was re-established or sys-
tem rebooted, the client’s browser could restart and
rejoin the transaction. While it would be possible to
perform a similar action for simple tasks using tech-
nologies such as cookies (Kristol, 2001), the server
would see this as a new connection rather than the
continuation of an old workflow.
While transactions existing over multiple HTTP
request/responses are not a new concept, the defini-
tion of a component to manage these transactions at
the client side allows for greater end-to-end stability
of the system. Various other implementations that use
technologies such as Java Applets to heartbeat back
to the web application rely on these applets being able
to execute a “dying breath” function call to inform the
web application that the browser has closed.
4 THE TRANSACTION LAYER
Figure 1 shows a new system design that supports
browser-based transactional support. To involve the
web browser in a transaction there must exist a chan-
nel between the browser and application which can
be used for management of the transaction. Initially,
when the web application creates a new transaction
that involves the web browser, it must notify the web
browser of the transaction ID. The standard way for
a web application to provide such meta-information
to the browser is through the use of a HTTP header
name/value pair. As such, a new HTTP header named
“WebTransactionID” has been defined. This transac-
tion ID value is additional to any session ID value
that the application may already share with the web
browser. This allows multiple transactions to be pro-
cessed within a single user session. When the web
browser receives this header it passes the value to
a browser component responsible for transactional
management within the web browser environment.
This object is called the Web Browser Transaction
Manager (WBTM).
The WBTM is a component within the web
browser environment, similar to components that
manage tasks such as HTML rendering and cookie
storage. The WBTM’s role is to manage the tasks
performed by the web browser while within a transac-
tion. Its primary responsibility is to report back to the
web application if the transaction needs to be rolled
back. To report this, an out-of-band (OOB) connec-
tion is established between the web browser and the
web application upon creation of a new transaction.
The OOB connection is used by the browser to exe-
cute a web service to request a roll back of the trans-
action. All information passed between the WBTM
and the web application is tagged with the WebTrans-
actionID provided during the initial HTTP response.
This channel is used if the user decides to close the
web browser window while the transaction is still ac-
tive. A heartbeat occurs over this connection to al-
low the web application to time-out a disconnected
web browser. This communication has to occur out-
of-band as there is no guarantee that there will be
a HTTP request/response pair between the browser
and web application at regular enough intervals to
not introduce additional delays in the web application
knowing the state of the various transactions it is man-
aging.
The final commit of a successful transaction oc-
curs within the web server at which the transaction
originated. Once the web application has declared the
transaction complete, the final HTTP response is used
to inform the WBTM that the transaction is complete.
The WBTM then disconnects the OOB connection if
no other transactions exist for that web application.
If multiple transactions are being performed, for ex-
ample, in separate web browser tabs, then the OOB
channel stays open until all transactions have either
been completed or rolled back. Only a single OOB
channel is required per web application for each web
browser instance.
When an OOB channel closure occurs the web ap-
plication has the choice to either roll back the trans-
action or keep it alive for a pre-determined time pe-
riod. Keeping the transaction alive would allow the
user to rejoin the transaction by having the WBTM
WEB BROWSER TRANSACTIONALITY
95