Summary: One of the developments I have presided over
KTV
Taking the song system as an example, describe how to perform architecture design, perform system load balancing and failover, using database dynamic search loading technology, achieve high stability and reliability under low cost, comparison market The existing system describes the advantages of this system. The system is described in design, and the problem is selected in the design and the difficulties and solutions encountered. Under the efforts of system development, testing, installation staff, ultimately make the system successfully promote it, and is subject to stability, ease of use Users praise. Finally, I summarize my experience in development, involving some of the software, management, and recommendations for software developers.
With the popularity of the computer, the VOD and KTV systems have developed rapidly. Entertainment venues, hotels, communities have also gradually adopted VOD and KTV systems. Market surveys have found that KTV catheate systems (karaoke songs) and VOD on demand systems (movies are dominated) have a good market prospect. There are many KTV software in the market. After investigation, there is discovered that there is currently the following problems: high cost, market competition requirements, and cost as possible; the system reliability is not high, the client is too high dependence The software is easy to use, slower; software stability is not high, it is easy to crash and other phenomena; some of the software is unreasonable, such as complex the most commonly used elimination sound operation, should be automatically implemented. Invited by the company, I presided over the development of the KTV catheler system (based on hardware decompression play) and VOD on demand system (based on software decompression play). Among them, I am responsible for the overall analysis, design, and main coding work of the project, and coordinate the work of interface designers, hardware testers and software testers.
So far, the KTV catheler system has been successfully promoted and is praised by the user with stability and ease of use.
First briefly introduce the layout of the KTV system: The server side uses multiple servers, as a disk-free start, database and program source server, using failover technology, any server invalid, can ensure that the system will continue to run.
The client uses a diskless workstation using the display as the song interface, the TV is used as the program output interface, and the user operates using the remote control or mouse.
The system requires a relatively high reliability under low cost, and I use the following scenario on the basis of comparing the system in the current market:
1. System design:
1) Use a diskless workstation. The server is WIN200 Server, using the RAID hard disk array, the client adopts a free disk Win98. Benefits: Each client saves a hard disk, it is also more considerable in total; the client Win98 system will not be destroyed. Every time you restart the machine is intact, you can bear malicious operation (such as intentional restart, etc.); Uniform control by the server side.
2) Use the Client / Server structure. The client runs the song system, connects to the server-side database, and reads the program from the server. In fact, the design of the non-disk workstation has basically determined the use of this C / S structure, mainly in the selection of the database, you can use the local database, or use the network database. After more consideration, the network database is used.
3) Use the software to carry out load balance. Win2000 Advanced Server itself provides load balancing and failover strategy, but it is not completely suitable for our needs, as well as hardware costs (engineering costs are often hardware and software, now there are thousands to tens of thousands of costs The difference has to be considered) and requires the system installer to have a high level of technical level. For the above consideration, combine the software itself, use the software to balance the load. The title of the song system is very high, for example, when the DVD is on DVD, this client can guarantee the 1M / sec data stream, and the pause, delay, and so on during the playback process. The server side stores 100,000 songs (when the other party will pay more attention to the total number of songs), due to the large amount of data, the distributed is stored in multiple servers, and the user survey has found that the user's song preference is basically satisfied Distribution, 80% of the on-demand is concentrated on 2000 songs, in order to balance the server's load, to implement redundant storage for commonly used songs (such as the A-machine and B machine stores this song), so songs can be divided into two categories: unique Sexual songs (there is only one file on a machine) and a redundant song (there is this song on more than one server). For unique songs, no load balancing, just simple reading data (of course, the highest load limit can also be performed, such as the highest of the A server allows only 30 connections, and if the number is rejected, the client skips this song, steering Next); For redundant songs, the on-demand software is loaded balanced, first querying the server with a smaller server, and then connects this server to read the program. 4) Failure control. It also uses the software own failure control for the same reason (applicability, cost and installer technology level). The actual investigation found that the main failure is the failure of hardware. Hardware failure is mainly for hard disk damage and network damage. Although the server uses a RAID hard disk array, since a large number of data reads work (1 first 4 minutes DVD average 130m, 130M / first × 15 × 15 × 15 × 30 = 877g / day), The hard disk is easily damaged. When the machine fails, the shutdown service is required. In order not to affect the normal on-demand of the client, the software can automatically discover the failure server, the song on the failure server, the repetitive song is also automatically rejected, only from the normal server Play. If the system's database service is just in the failed server, the software will automatically select a valid server based on the pre-configured server, all processes are transparent to users, and users can continue playing songs in the case of basic unaffected. The failure control of network damage is similar to the hard disk damage. For each client, you can continue to run as long as you can connect one of the servers.
Load balancing and failure control is a relatively large advantage of other systems in the current market, achieving relatively high reliability.
2. Database Design:
1) The selection of the database. Considering the technical level of the installer and refer to the existing system in the market, consider using the Access database, Access is easy to use, and the installer can master faster and meet the basic needs of the start. But later, after investigation, the Access database cannot achieve additional functions (such as unified management, etc.), and Access has problems in security and stability, deciding to discard Access, using the SQL Server database. In order to use the SQL Server database, I have spent a lot of tongue, to convince the relevant personnel of the project, training the installer, explain the benefits of SQL Server (because they like Access's easyibility, directly copying the passing use). Finally, the system uses SQL Server as a database. 2) Use of the database. The database is installed on the server side, and the client is set to the database of the server in advance. Dynamic search loading technology is used on the database connection. For example, there are three servers A, B, and C, all configured the database service, set priority: a (main database)> B> C. The client searches for whether the A b C server can be connected, such as a use, return it immediately, otherwise check whether B and C are available. Due to the optimization, under normal conditions (A available), the connection time is within 0.5 seconds; in the absence of fault (A is not available, the B c at least one can be used), and is connected within 2 seconds. During the software operation, if the currently connected database is invalid, the software can automatically connect the next available database to ensure that the system can maximize operation. SQL Server provides automatic backup feature, and when needed in the future, you can perform synchronous hot backup of the database (I use synchronous hot standby technology in another steel company). Due to the above technique, the system can continue to work in a more harsh condition (such as server failure), and maximize the uninterruptible system of the system. Compared to most systems, servers or network failures at the current market, the client has a significant advantage of the client's normal operation.
3. Problems and deficiencies.
1) The biggest problem of the project is not on the software, but on the hardware. Despite the failover strategy, hardware failure is still terrible (I want to be the same for each system). Start the installer when using RAID hard disk arrays (they are more familiar with this), a hard disk failure in the array is unused, and the other server load is significantly over the system using only 2 servers. Therefore, I have rushed to "fire fire" at 1:00 in half night. Later I asked to use RAID 5, arrays can continue to work in a hard disk failure, improve system reliability.
2) The amount of track data is large, organized, and difficult to manage. Nearly a song, the light is to spend more than a month (24 hours a day), and it is more difficult to organize. To this end, I have compiled a lot of small programs, specializing automatically.
3) The KTV catheler system is based on hardware decompression, using the Shenlong DVD decompression card. The decompression card can only play MPEG-1 and MPEG-2, which cannot be played now, such as MPEG-4 formats. However, this has been improved in the VOD system, and the VOD system uses software decompression, which can play video files currently popular in most formats, and support shared playback and streaming media playback, which is more flexible on the system architecture. At present, the VOD system has been developed and is entering the market promotion phase. Summarize the experience of software design and development in these years, regardless of which type system (entertainment VOD on demand system, industrial steel enterprise management system, commercial e-commerce system), system analysis, design, management is very important . The market is competitive, the investor requires to reduce costs; users need to change, software should ban changes; different user hierarchies, the ease of use of software is inevitable; hardware failure is inevitable, software must have the greatest reliability. To meet the above needs, light on programming masters or work hard is to solve problems, require system analysis, design, and management capability to lead a team to develop satisfactory products. At present, I am learning management, consulting, marketing, economy, mathematical modeling, etc., listening to some big company managers (such as UTSTARCOM President, ZTE, Pupramond Road, etc., although they look these and computers Software has no direct relationship, but I think it first must be managed, there is a market, there is software, there is software, but also to understand the economy, know how to do business, in order to make the software to play the value to form a benign circulation of software development. A software developer can not only know how software development, only know how technology, to learn high-hofed, improve its overall quality, there are three elements in modern enterprises: management, market, technology. In order to manage, learn from the market, you can make products that are truly in line with market economy.