Implementation of WAP Gateway Management Module

zhaozj2021-02-16  80

Wireless Application Protocol (WAP) is an open global standard for communication between digital mobile terminals and Internet. It consists of a series of protocols that can be used for Internet access, including send emails, access to homepages on WAP websites. At present, there have been manufacturers in foreign countries to develop WAP gateways. Since there is no corresponding standard for WAP gateway management in the WAP standard, this part of the job is still presented and improved. In the implementation of the Self-developed WAP gateway, in addition to implementing the WAP protocols, it also designs and implements a WAP gateway management module, and provides an interface for future features.

feature design

---- Only definition of each protocol layer service needs to be completed in the WAP specification definition, but how to run management in the gateway, and provide system management offers a friendly user management interface. The problem. Through summarizing the previous network management R & D work and analysis of WAP gateway working mode, we will propose the following network management function:

The start log file for WAP gateway service; obtains the running log file of the WAP protocol stack; modify the relevant parameter configuration of the WAP gateway protocol stack; perform corresponding billing management in accordance with the recorded log of the user, and enter the database in the background .

---- In order to achieve the above functions, we divide the entire management module into the following:

---- Management Service Module This module serves as an interface between the user management interface and the managed object, which is the main function to communicate with each layer of the WAP protocol stack through different communication methods and the user management interface. The module is a timing polling to each layer protocol entity to obtain its operating status information. If a serious error is encountered, the system will be restarted so that the service of the WAP gateway can be repaired. At the same time, forward the message to the user management interface module, and the user is used to monitor through the management interface. Another main function is to access the log file according to the request of the user interface module, and provide the log file to the user interface module in a friendly interface, which is written by each layer protocol entity in real time, can be used for system Operation status analysis and billing management, etc. The module can also display the running configuration file of the gateway in the user interface to the administrator according to the user's request, and the administrator can modify the configuration file through the interface and take effect at the next startup.

---- User Management Interface Module Its main function is based on the state of the WAP gateway and the management service module is working. The module is also responsible for providing users with error logs and transaction log file information and configuration files, and can modify the configuration file.

Implement structure

---- According to the function design, we identified the WAP gateway management module implementation structure as shown below.

---- In the WAP Gateway Management Module, management services are the main part. The gateway management service is communicating between the TCP Socket between the user management interface module.

---- The primary part of management services is to poll the various layers of services of the WAP gateway, see if each layer protocol service in the current gateway is running normally. In order to reduce the additional burden of the services in the WAP protocol stack, and make full use of the original communication function between the WAP protocol stacks, the management service transmits polling packets on the WAP Socket Stack through the TCP Socket. . The design of the packet is in accordance with two principles. The first is that the packet must be as short as possible to reduce the overhead of transmitted in the network; the second is to meet the original protocols between the protocol stacks. Therefore, we use a portion of the part that is not used in the agreement, uses a integer value as a polling message content, the process of polling is transmitted by the management service to the hosting network layer, which will be loaded with this message From the bottom to the top to each layer protocol entity, the protocol entities of each level receive the packet, and the packet is sent to the upper service. When the polling packet reaches the top layer, it will be retracted from the top-down, and finally the carrier The network layer is also given to the management service, and the polling packet does not need to be handled, thereby alleviating the burden. Because polling packets need to pass through the protocol stack, if this process can be completed within the specified time, then the management service can consider the various layers of the WAP protocol stack, otherwise, at least one layer of service will occur. Failure, management services restart all levels of services. ---- The second part of the management service is to start the service of the WAP gateway through a certain control method. If a layer of protocol service in the gateway fails for some reason, the WAP gateway does not work properly. If this layer is restarted, then the state is not consistent between the statement of the protocol services. In order to prevent this situation, when the management service finds that a layer of protocol service fails, all protocol stack services are always stopped, give up all the requests that have not been processed, and then all the WAP protocol stacks according to the order from the bottom up. The service is restarted.

---- Another important part of management services is to access logs and profiles. Management services read and write these two files in words. Log files (including error logs and transaction logs) are written by each layer of service, and the management service is only read and forwarded to the management interface. The configuration file is accessed and modified by the administrator through the management interface and inserted into the file.

Key technology

---- We use the C language to implement the management service module in the management module on the AIX operating system platform, which implements software simultaneously with other layer protocols. Considering that the gateway administrator may perform off-site management, the run platform may change, and we take advantage of Java technology in cross-platform advantages, we use Java technology to complete the development of the user management interface, and use Java in the development. Technology Swing1.2 latest standard, the user interface is beautiful and has good openness and compatibility.

----1. Socket programming technology

---- TCP Socket programming technology is used in the implementation of the management service module and the management interface module. The management service module needs to establish two TCP sockets, one is to communicate with the socket client as the Socket server and the management interface, complete the interaction with the management interface user; the other is to communicate with the Socket service that is started with the Socket client. Complete the status polling of the WAP protocol stack.

---- The management service module TCP socket is implemented in C language, and the management interface is a Socket customer implemented by Java. Since the TCP socket implemented by standard C and Java language under UNIX is standard, there is good interoperability between them.

----2. C and Java language circulation technology

---- After the management service module and the management interface module are established, the communication mode between them must be established. The C language is slightly different. The C language is to place a string into the corresponding file handle corresponding to the socket, while the Java language can generate the corresponding pipeline on the basis of Socket, and all communications are completely in the pipe flow. In progress. ---- Urgent need to solve in the communication of the management service and the management interface is the case where the C language and the Java language regarding the data length definition is inconsistent. For C language, the same data type is in different operating systems. Definitions are different, while the Java language is the same for all the word length definitions, according to this characteristics and referring to the AIX operating system, the management server implemented in C language uses byte streams, users implemented in Java language The interface is performed by reading and writing bytes, not only for the protocol head, but also a string such as the protocol, including the log and configuration file, and first converted into byte mode in the user interface.

---- 3. UNIX shell programming technology

---- The startup function of the WAP protocol stack service is to be implemented by calling a shell program in the main process. When starting, in the manner running in the latter, the various layers of services in the WAP protocol stack are started by the next step by layer by the independent process. When the gateway service is stopped, the shell program is first called, and the service process of all protocol stacks related to the WAP gateway is parsed according to the name of the name, and the corresponding process number is obtained, and all the gateway processes will be stopped by terminating the command.

---- 4. Process synchronization technology

---- We keep the order relationship between the WAP protocol stacks between the WAP protocol stacks by sleeping between the start-up shell programs each command. In addition, in order to synchronize the polling operation of the management service and the cooperation of the gateway, we use a logo file to implement synchronous operations. That is, when the shell program starts to delete a logo file, all the protocol stack services are completely started to make this flag file, determine if the flag file exists in the main process, if there is, continue to execute the action of the main process, otherwise wait.

---- 5. Java programming implementation of customer interface

---- Taking into account the Java language has a good platform independence, and Swing technology can beautify the user interface, so the client uses an object-oriented Java programming, achieving 3 main objects. Where wapgateway_manager_gui is the main file of the client user interface, which includes most of the management interface, such as sending a request to the management service, a feedback message for receiving management services, and the like. Its attributes include interfaces required by the interface and the Socket needed to manage service communication, while also include protocol definitions between management services. The method is divided into three classes, namely methods of processing and displaying user interface objects, and methods of user action and requesting connection event processing, and actual processing protocol action.

---- Now supports a number of visual development tools for Java languages, such as IBM Visualage for Java, Borland Jbuiler, Microsoft Visual J , etc. The latest versions of their latest versions began to support Java2 standards, including JavaBeans, Swing, etc. In development, we used IBM Visualage for Java tools. It provides full visual development environment and dynamic debugging technology to increase the development efficiency of the customer interface, and also designed aesthetically user interface. Based on Java-based applications have a slow running speed. Since our management is not high in the real-time requirements of program operation, the impact is not large, and we will use code optimization technology to increase the running speed of the program.

---- 6. Management interface and management service communication protocol

---- All messages that communicate between user management interfaces and management services are a set of custom protocols, which can be divided into two categories according to the processing of protocols, and one is to confirm, such as start-stop services. When the completion of the management service sends a result information to the user management interface; the other is not required to confirm. For example, the exit protocol of the user management interface is not required to confirm if the management interface is confirmed. If you are divided according to the structure of the protocol packet, some agreements only include protocol heads, such as start-stopping; Some, in addition to the protocol content except the protocol, the current state protocol, the current state of the protocol, must have a current state after the protocol header Content. ---- 7. Status polling of management services

---- The key to the management service polling is how to correctly determine whether there is service failure in the WAP protocol stack, that is, the polling process cannot be done. We usually believe that if the transmission of the polling message cannot receive returns within the specified time, the service failed. In the implementation, we have completed the above requirements in a simple approach. The transmission thread transmits a polling message in a fixed time interval to transmit a polling message, and determine the time interval of the transmission message after each time the polling message is transmitted, if the time interval exceeds the specified threshold. Then, it is considered that the protocol stack service failed, and the service needs to be restarted, otherwise the polling message will continue to be sent. The job required to receive the polling thread is to set the time when the last received polling message is set to the current time when receiving a returned polling message.

---- Through our efforts, the WAP gateway management module has completed some of the most basic functions that are urgently needed, but there are still many more and more improvements. In the future, we are ready to improve in all aspects:

---- (1) Increase user management databases in management services, to store account information of WAP gateway administrators, requiring users to log in to users using management interfaces via the user database.

---- (2) Reconstruction of existing custom protocols, gradually transition to manage, strengthen interoperability and openness with other gateway products.

---- (3) According to the actual user's requirements (such as the telecommunications department), improve the transaction records requested by the user, and simultaneously migrate to the server's backbone large database, which is easy to perform billing management.

---- (4) Increase the use of security protocols in the management interface, making more convenient user management interface installation kits, easy to promote and communicate.

---- We have reason to believe that with the development of WAP technology and its extensive deeper, the technology and products of the supporting WAP gateway management platform will also be greater.

转载请注明原文地址:https://www.9cbs.com/read-12469.html

New Post(0)