Book Image

Modernizing Oracle Tuxedo Applications with Python

By : Aivars Kalvans
Book Image

Modernizing Oracle Tuxedo Applications with Python

By: Aivars Kalvans

Overview of this book

Despite being developed in the 1980s, Oracle Tuxedo still runs a significant part of critical infrastructure and is not going away any time soon. Modernizing Oracle Tuxedo Applications with Python will help you get to grips with the most important Tuxedo concepts by writing Python code. The book starts with an introduction to Oracle Tuxedo and guides you in installing its latest version and Python bindings for Tuxedo on Linux. You'll then learn how to build your first server and client, configure Tuxedo, and start running an application. As you advance, you'll understand load balancing and work with the BBL server, which is at the heart of a Tuxedo application. This Tuxedo book will also cover Boolean expressions and different ways to export Tuxedo buffers for storage and transmission, before showing you how to implement servers and clients and use the management information base to change the configuration dynamically. Once you've learned how to configure Tuxedo for transactions and control them in application code, you'll discover how to use the store-and-forward functionality to reach destinations and use an Oracle database from a Tuxedo application. By the end of this Oracle Tuxedo book, you'll be able to perform common Tuxedo programming tasks with Python and integrate Tuxedo applications with other parts of modern infrastructure.
Table of Contents (18 chapters)
1
Section 1: The Basics
6
Section 2: The Good Bits
12
Section 3: Integrations

Understanding the advertising of services

By advertising services, servers expose resources that clients can consume. It registers the service name in the bulletin board and associates it with the server and server's request queue.

There are two ways to advertise services using Python (there are more in the C programming language):

  • The first way is by using the Tuxedo configuration and we already did it before by using the CLOPT parameter in the Tuxedo configuration file.
  • The second way is to do it programmatically by using the tpadvertise and tpadvertisex functions. The main benefit of this approach is that the program code can decide which services to advertise and what service name to use for it. Let's see how to try each of them:
  1. First, let's use the tpadvertise function. It takes a single argument with a service name to advertise. We will use the code of the tpadvertise.py Tuxedo server included in the following code. It will advertise...