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

Reviewing the need for Python

As I am writing this book, Python is the third most popular language according to the TIOBE Programming Community index. Given current trends, it may surpass Java and secure second place by the time this book is published. The only other language more popular than Python and Java is C.

So why should you choose Python instead of C or C++, which is supported natively by Tuxedo? Well, Python is simply a more productive tool for writing application logic. Unlike C, Python comes with "batteries included" and contains tools and libraries for many tasks. If the libraries included are not enough, Python has standard tools to download and install open source libraries for the missing functionality.

Python is a dynamic language and has some problems because of its dynamic nature, but, at the same time, it makes Python code easier to test by using mocks for database access and Tuxedo service calls. The same mocking enables you to migrate code away from Tuxedo if you choose to do so. It serves as an abstraction layer on top of Tuxedo, isolating your code from some of Tuxedo's APIs.

Even if the application is written in C or COBOL, using Python is beneficial for testing and quality assurance. It can be used for building a quick prototype before implementing it in C. There are plenty of good reasons to give it a try.

Tuxedo already comes with Python support, but sadly, the SCA standard did not gain popularity and is considered dead. Nothing prevents you from using SCA, but that is another API to learn in addition to XATMI and it exposes fewer features than Tuxedo provides. We will use something that does not hide the powerful XATMI and Tuxedo's improvements on top of it.

There are several open source libraries for developing Tuxedo applications using Python. This book will use Python's tuxedo module for all examples, but many examples can be implemented with slightly outdated tuxmodule or tux_oracle modules as well. And since those are open source modules, you can always add missing functionality yourself.