Bank of Communications Hong Kong Branch implements the development of Linux front-end system
IT.sohu.com 2004-08-15 17:28
Author: Yang Chuan Wei Cai Junjie dream car editor: Internet Week
In 2004, it was called the beginning of the promotion of Linux applications. Historical huge cross-section, many Linux application projects such as stars, began to faintly appear under huge sky. Many of them are only a meteor, cross the horizon, and the passing is too late. But back charter, and how many small events seem to be fine, but there is a causal machine that opens historical giants.
At the beginning of 2004, Bank of Communications China Hong Kong Branch and Gaoyang Technology Co., Ltd. decided to jointly develop Linux front-end systems, which took 8 months. This is the first time in the domestic banking industry to use the Linux platform in key business applications. For a long time, everyone has been doubts about whether Linux applies to dealing with key enterprise applications, and there are few a prior cases abroad. Linux is in a development bottleneck, only open "application" this deadlock, Linux will be like the water of the rush, vast, spread. Therefore, this project has a good experimental and demonstration effect. Combining the experience of developing Linux front-end systems, we will explore some common issues and solutions facing Linux application development from two different perspectives from architecture design and technical means. This kind of feelings and experience that I hope to record, will not be annihilated in the long history of dust, but contribute a little light to the later people, illuminate them to continue.
"Customizable" front-end VS "programming" front end
Banks are the earliest industry in informationization, and traditional handbook books have long been replaced by the computer. Entering any bank outlets, first reflecting eye blind, is a row of computers and busy staff before the computer. These deployments are called bank outlets in front-end systems in each business outlet or department, and it is used as a counter system.
The function of the front-end system is extremely complicated, including both the display and control of input and output, including peripheral drive, data check, communication, and code translation, etc., it is also necessary to implement, such as cash box management, transaction rushing, and note. , Report printing, message notification, and review, authorization and other business functions.
In addition to the above functions, the Linux front system is partitioned as a "customizable" front-end system, which is not widely used by domestic banks. "Program front end".
The so-called program front end refers to each transaction needs to write a front-end program. With the increase in bank business, the disadvantage of this front-end system is revealed - the programmer has to spend a lot of time to write a large number of front-end procedures, and once business changes or new features, It is also necessary to re-modify the debugger, which affects the stability and flexibility of the entire bank computer system.
"Customizable" front-end system refers to the user does not need to write a program, and the custom tool for the front-end system is used to set the input screen and output format directly on the computer screen, and the process is defined, and the front end portion of a transaction is completed. The advantages of this front-end system are obvious - flexible, easy to expand, convenient for maintenance.
In the late 1990s, gradually, the company began to develop this product-based front-end system, which is more famous for Gao Yang's IFS, Blue Sky's OFP, and South Korea's Efinax and US S1 Teller and other systems. Of course, these systems are running on the Windows or UNIX platform, and there is no precedent on Linux.
Old system: Cross Jesus
Enterprise application development, the first question encountered is how to implement compatibility with the old system. The Bible records that when Jesus is killed, the cross on the back carries all sins and suffering of the past. Similarly, the old system is also a heavy cross for any new application project. Development enterprise application software is not like a high-rise building, nor is it the latest most beautiful picture on white #, but is transformed like an old city: to push a small piece in a large number of old town, restart the new building, but at the same time Adapt to the original planning layout, and consider the arrangement of the road, the connection of the underground pipeline. It's like the highest realm in architecture, it is not only novel and unique, but also to unity around the environment. The bank front system is only a huge bank's IT network, which must be combined with the background business processing systems of the data center to complete the process of banking business. Therefore, replacing the front-end system as one of the dominoes, while ensuring that other bones can't fall.
Comparing traditional and insurance practices are transplantation and transformation. That is to keep the original program architecture unchanged, add new features or modify the original processing logic on this basis. However, this method is not feasible for an application system that needs to migrate to the Linux platform, mainly because of the difference between the platform. LINUX needs to handle graphical interfaces, Linux needs to handle graphical interfaces; Linux is completely different from the system of Unix, which is running on Windows or OS / 2. . Therefore, the development of the Linux front end system can only be found in another stove, start. But how can the change limit only in the system without affecting the correct connection of other business systems and the stability of the entire IT architecture?
Method One is to use a rapid prototype method. First develop a prototype system that meets the interface requirements, focusing on the interface module, the system is only required to implement the framework. On this prototype system, it is constantly tested and adjusted, allowing it to achieve all interface functions of the original system, which can be seamless with other old systems. After pre-resolving the interface problem, the external impact is completely shielded, and the future design can focus on the internal structure of the system.
Method II is to use auxiliary tool to perform a lot of automatic testing and verification. For example, the business system of Hong Kong's intersection has a total of 34 sub-applications, more than 2,000 transactions, if handmade and test each transaction and function point, workload will be very large. And it is almost aligned, it is unable to perform accurate comparison to determine the correctness of the system operation. Through a set of debugging tools and automatic test tools we develop, you can automatically complete the input data, analog transaction processes, and verifying results, etc.
Technology mode: turn left or right turn right?
The second problem facing Linux application development is usually the choice of technical model. Standing in the intersection of technology, the road extends in both directions. A road is a browser mode (Browser / Server), and the other is the traditional C / S (Client / Server) client mode. The browser mode is now popular and standard architecture, but the C / S mode is also available. Its advantage, each has a thousand autumn, turn left left or right? In fact, the so-called water is not common, there is no regular, everything depends on the specific business needs and characteristics, and different applications need different routes. The characteristics of the bank front system determine the way C / S is more suitable.
The first is that the front-end system has high requirements for processing efficiency. The browser mode takes the HTTP protocol and uses Java, the efficiency is definitely more than the C / S architecture implemented by the C , and the C / S structure can make full use of the client's processing power, and the data is handled in the Client layer, without all submit to the server. End, this can reduce the load and function of Server, so that the Server end has good scalability, may not be limited to the limitations of the geographical and administrative architecture, and deploy any layer of the total branch to the outlet, the communication module can be based on actual needs. Flexible configuration. Second, the process of C / S mode is more convenient and powerful than the browser. The browser is very weak, and it is inconvenient to operate, and the front-end system will frequently use the printer, password keyboard. At the same time, the C / S mode can be used to achieve more flexible processing, and only the exit is increased, the front end system can make the front-end system easier to expand.
Of course, a great advantage of browser mode is that the Client end does not have to be maintained. But as long as there is a complete automated version maintenance tool, this issue can also be solved in C / S mode.
Building blocks and post office
Another big problem that applies development must also be solved is how the system structure is used, which is how to divide the system level and how to organize the program module. For a huge application system consisting of hundreds of programs, if the design is not good, it will be like a spider web, intricate, entangled, bring a larger hidden danger to the system's stability.
With the popularity of object-oriented design methods, the categories of packages and inheritance characteristics can be easily established, which can easily establish a clear and simple boundary between each module, and adopt an uniform standard external interface. However, to achieve this loose combination of loosely coupled, there must be a hub responsible for transmitting messages between modules, which is to achieve a similar "post office". On the Windows platform, you can use Windows message mechanisms directly. However, Linux itself does not provide a unified asynchronous message scheduling mechanism, which must be implemented by the application. Therefore, it is necessary to establish a scheduler (Dispatcher) and message queue in the application layer. It features a abstract "post office" feature, which forwards the message to the corresponding module according to the message type and message code passed by each module. .
Designed with this component not only makes the system flexible, can be assembled product characteristics, but also facilitates packet design and programming.
Similarly, those related features and special needs related to specific services should also be distinguished from ordinary processing, put them into the independent program module, hung through the dynamic library to the system, thereby ensuring the core stability and the entire system Scalability.
Double blade Linux
After solving several basic problems in the design phase, you need to use Linux interface and environment development applications.
Linux is a double-edged sword.
"Open source" is the sharp sharp blade of Linux. "Open Source" allows Linux to know and understand, develop application software on Linux, make full use of the features and advantages of the operating system, avoiding various software traps, making application software not only efficient, but also in stability and security Many aspects can be further improved.
Similarly, due to the very flexible configuration characteristics of Linux, the Linux operating system and the application software can be packaged together to make a unified version upgrade, manage, and maintenance. This avoids difficulties in maintenance due to the separation and mismatch of the operating system and application software.
Also, Linux has the most widely hardware support. With this feature, the Linux front-end system implements three client modes that can simultaneously support character terminals, ordinary PC, and NC.
However, Linux's blade also hurts itself. Linux rooted in a deep hacker cultural soil, the hackers in the open source community are accustomed to the single combat, and I like to start coding from the bottom level, but the enterprise-level application software requires large-scale synergy, and is trying to use existing Function libraries and class libraries to quickly build applications. Windows can occupy more than 99% of desktop system markets, VB, Delphi's rapid development tools cannot be unable. For the decade, Linux has not received a lot of rapid promotion and popularity, but the reason is the lack of development, debugging, testing, and managing integrated IDE (integrated development environment) tools like VB, Delphi. Therefore, the development of Linux applications must abandon the development method of habits, try to choose to use simple and easy to use, and achieve development tools for collaborative work. In 2003, Borland launched Linux-based IDE tool software Kylix. Using interface and class libraries with Delphi and C Builder are basically compatible. Kylix adheres to other products of Borland, simple, convenient, and fast, and provides powerful library support. According to our experience, using Kylix development applications is more than twice as much as possible than other programming methods, and the quality of the project can also be greatly improved.