Tuxedo configuration note

Source: Internet
Author: User

 

First Contact. I finally added a simple service from yesterday afternoon.

Let's take a brief look at the principles of Tuxedo:

The heart of the tuxedo system is the Bulletin Board (BB). This is a shared memory segment that contains the state of a tuxedo domain.

It seems that IPC is really a very important knowledge. The famous distributed systems such as tuxedo use nothing more than IPC technology.

 

1. Service is the core concept of tuxedo. Each Service corresponds to a function in C. Services are blocked.

When two requests arrive successively, the requests must be processed after the first arrival. To solve the queuing problem, you can start multiple instances of a program (the number of started processes is specified in *. UBB). Tuxedo will automatically find idle processes. This is the so-called load balancing ).

2. A program (server) is a collection of services. A program can have multiple services. Use the-s option during compilation to export these services for tmboot recognition.

2. A program can run multiple process instances. There are several programs/processes on the same host, and one process can provide several services. These services can be called to each other through function call (tpcall (), regardless of whether the process is internal or between processes.

3. Process type: A host can have three processes: admin process, BBL process, Gateway processes, and server processes ), used to synchronize information between hosts.
4. The concept of long/short connections, blocking/non-blocking of tuxedo.
Tpconnect () is a persistent connection. It can be a blocking mode (Request/response communication ). It can also be a non-blocking mode (conversational communication ).
Tpcall () is a blocking short connection.

Program Development:
Tuxedo uses the dispatch mechanism: during compilation, the servicing between SERVICE_NAME and service_instance is provided. The client can specify the service-name to apply to the management process to call the relevant service. (Connect or call ). The management process sends the dispatch request to the specified service (process) based on SERVICE_NAME ).
The management process and SERVICE_NAME exchange data through the data structure tpsvcinfo:

Struct tpsvcinfo {
# Define xatmi_service_name_length 32
Char name [xatmi_service_name_length]; // service name invoked
Long flags; // describes Service Attributes
Char * data; // pointer to data
Long Len; // request Data Length
Int CD; // connection Descriptor
Long appkey; // Application Authentication client key
Clientid cltid; // Client Identifier for originating Client
};

Later, date and Len specify the address and length of the client data input buffer. CD is the socket handle. It can be seen that both call and connect Use SOCKET internally.

Complete process of adding a service:

1. Write and compile the program. Use-s to specify the service name during compilation

2. Place the program in the specified directory.

3. Add a service in. UBB. You can specify the maximum number, minimum number, and group of processes.

4. Compile the bulletin board config file (ubbconfig file) and compile it into a binary file using the tmloadcf command, called the tuxconfig file. The file name is set in the environment variable:

$ ENV | grep tuxconfig
Tuxconfig =/hbtest/bin/Bill. Tux

5. Compile the workstation configuration file (domain configure file for publishing services and registering routes) and compile it into a binary file using the dmloadcf command.

6. Run the tmboot-s serviename command to start the service.

Abbreviations:
Atmi: Application-to-transaction Monitor Interface
Related information:

Tuxedo (software) on Wikipedia)

Simplified to learning programs for compiling BEA Tuxedo sessions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.