Transaction Processing Monitors (Chapter 5. Transaction processing book)

"Transaction Processing Monitors" is chapter 5 as part of our transaction processing book reading journey. 

This chapter had been the hardest to chapter to read and understand. It went into implementation concerns in contrast to the previous chapters which discussed design principles and concepts. It turns out 1980s were a very different time, and it is very hard to relate to the systems and infrastructure at that time. The people in our reading group also were lost, and found this chapter very hard to engage with. 


1980s

1980s lab 09

Ok, we are back at the year 1990 when this book is being written. This is when the internet and the web were still obscure.  Client-server processing is the modern thing then, and had just started to replace for time-sharing for databases and transaction processing.

This chapter talks about transaction oriented processing. If I squint at it, I can see the concepts of SLAs and shared responsibility models between a cloud customer and provider in these description.

"Despite these additional responsibilities, the performance requirements of TP systems are similar to those of real-time systems. Even though no maximum response time for all requests of a certain type must be guaranteed, the usual requirement is that around 90% of all requests have a response time less than x seconds. This qualifies transaction processing systems as soft real-time systems."

"System does recovery. Because of the use of shared data, there must be formal guarantees of consistency that are automatically maintained. After a crash, all users must be informed about the current state of their environment, which functions were executed, which were not, and so on. The guiding principle here is determined by the ACID properties of transactions."


Transaction processing monitor (TP monitor)

This was the term we found very confusing. We were not able to see which concept in modern databases the TP monitor corresponds to. This seems to be a fuzzy term even at that time, as the book warns: "In a contest for the least well-defined software term, TP monitor would be a tough contender."


Do you notice the TP monitor box on the left. It interacts with the application programs: it dispatches them and gets notified when they are done. The application program invokes transactions, which is managed by a transaction model. This is a very confusing diagram, and it is hard to make anything of TP monitor since we are missing context about the workloads and software architectures of the time.


This is where I emailed Pat Helland, the apostate philosopher of database systems, and my dear friend, for help. I imagine he had a smile emerge on his lips, and he looked in to the distance out of his office window, and traveled down the memory lane. Below is what he wrote back. This was very helpful.

TLDR: A tp-monitor is an application execution environment for stylized applications focused on connecting humans to databases in an OLTP environment.

-----

Most computing in the 1960s & 1970s was memo-post batch work:

  • Load the state of the business from last nights mag tapes
  • Load the changes to "post" against last night's state of the system
  • Process the changes
  • Dump tonight's state on mag tapes.

In the 1960s, 1970s, & early 80s, a "transaction" had two broad meanings:

  • An interaction with a human
  • A type of computation to support that interaction with a human
    • Example 1) a "debit-credit" transaction (e.g., TPB-B) meant the work a teller at a bank did to deposit or withdraw
    • Example 2) an airline reservation transaction would book a flight through the Sabre system 

There were a number of application execution environments helping run "transactions" -- the code for work by humans against the computer.

  • CICS (Customer Information Control System) : This worked with different databases to store data -- notably IMS/DB
  • IMS : Both IMS/DB (a hierarchical database) and IMS/DC (a combination of an app execution environment and data communications to front-end terminals, this was later rebranded IMS/TM)
  • Tandem NonStop Pathway: A Tandem specific TM Monitor for block mode terminal interaction with the NonStop SQL database
    • Handled requests from block mode terminals
    • Processed a transaction per terminal interaction against the database
    • Designed for transparent fault tolerance with idempotent (transactional) processing of the work.
  • Lots more...

So, in summary, a tp-monitor is an application execution environment for stylized applications focused on connecting humans to databases in an OLTP environment. 

----


The application database duality

The application and the database were one at the beginning. 1970s, a "database" included apps and managing directly attached block mode terminals. Networking meant hooking up to your terminals. They were data management systems, that are more like workflow systems, where the data management parts are interleaved within the application logic. 

Then the database (as a concept) gradually got peeled out of the integrated whole as the abstractions like relational model and transactions started to emerge. But due to performance reasons, a new kind of coupling started. Stored procedures were commonly employed to execute application code/logic in the database. We saw the application reach into the database.

Since then we have seen the pendulum swing back and forth between these directions since then. This post provides a recent discussion of workflow-centric versus database-centric transactions concept. 

"As Ian Livingstone (who provided feedback on this piece) put it, “It’s the classic ‘Do you bring the application logic to the database, or the database to the application logic?’ playing out again ... this time brought on by breaking up the monolith.” Having had that dichotomy for decades, it’s clear both models will persist in the short term. It’s far less clear that’ll remain the case in the long run. "


Finally the transaction processing book mentions an interesting direction: "Some believe it would be best if the operating systems just swallowed the TP monitor, thus making transactions a basic system service. This issue is reconsidered in Chapter 6, after the similarities between operating systems and TP systems have become clear." 

I think today the DBOS project is trying to do research along this direction.


Comments

Popular posts from this blog

Learning about distributed systems: where to start?

Hints for Distributed Systems Design

Foundational distributed systems papers

Metastable failures in the wild

The demise of coding is greatly exaggerated

The end of a myth: Distributed transactions can scale

Scalable OLTP in the Cloud: What’s the BIG DEAL?

SIGMOD panel: Future of Database System Architectures

Why I blog

There is plenty of room at the bottom