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
andtpadvertisex
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:
- First, let's use the
tpadvertise
function. It takes a single argument with a service name to advertise. We will use the code of thetpadvertise.py
Tuxedo server included in the following code. It will advertise...