www.it-ebooks.info
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Development of Tuxedo – Various APIs<br />
The C language interface for the previously mentioned interfaces makes use of the<br />
full range of C language features—pointer, allocation of buffer, C data structure,<br />
and so on. The COBOL interfaces provide similar semantics and functional<strong>it</strong>y as<br />
that of the C interfaces. The COBOL programmer will find <strong>it</strong> comfortable to use<br />
these semantics. In our book, we will only be describing all the ATMI interfaces for<br />
the C language.<br />
Developing a Tuxedo client<br />
A client is an application program that in<strong>it</strong>iates requests in the Tuxedo application.<br />
This can be built in different platforms (for example, in both terminal and graphical<br />
interfaces). A client has to join the application before <strong>it</strong> can make any request to a<br />
server/service and must leave the application before ex<strong>it</strong>ing.<br />
There are basically two types of clients:<br />
• Native client: This runs on the same platform as the Tuxedo domain,<br />
meaning <strong>it</strong> is attached locally<br />
• Workstation (WS) client: This runs on a different machine and joins over the<br />
network to a Tuxedo application running on a different machine<br />
The design, coding, and operation of these two types of clients are the same—the<br />
ATMI for both are identical. There are some differences in the way these clients are<br />
compiled using the buildclient command, which will be described later.<br />
Your client application uses tpin<strong>it</strong>() to attach to a Tuxedo application and<br />
tpterm() to detach from <strong>it</strong>. When a client joins an application, a username and client<br />
name can be passed to the tpin<strong>it</strong>() structure; these are string values of up to 30<br />
characters. The user and client name are used to identify a client program in several<br />
important ways:<br />
• Secur<strong>it</strong>y: This is used when the application secur<strong>it</strong>y is configured on a peruser-password<br />
basis; the client program must provide a password that<br />
matches the password for the user/client<br />
• Administration: The administrator can see who is connected to the<br />
application<br />
• Communication: E<strong>it</strong>her one or all the clients can be communicated to via<br />
their individual name using tpbrodcast()/tpnotify()<br />
[ 76 ]<br />
<strong>www</strong>.<strong>it</strong>-<strong>ebooks</strong>.<strong>info</strong>