CN110633095A - System and method for code management - Google Patents

System and method for code management Download PDF

Info

Publication number
CN110633095A
CN110633095A CN201811495188.6A CN201811495188A CN110633095A CN 110633095 A CN110633095 A CN 110633095A CN 201811495188 A CN201811495188 A CN 201811495188A CN 110633095 A CN110633095 A CN 110633095A
Authority
CN
China
Prior art keywords
server
code
network
software
svn
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811495188.6A
Other languages
Chinese (zh)
Other versions
CN110633095B (en
Inventor
唐沂
王�华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Perfect World Beijing Software Technology Development Co Ltd
Original Assignee
Perfect World Beijing Software Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Perfect World Beijing Software Technology Development Co Ltd filed Critical Perfect World Beijing Software Technology Development Co Ltd
Priority to CN201811495188.6A priority Critical patent/CN110633095B/en
Publication of CN110633095A publication Critical patent/CN110633095A/en
Application granted granted Critical
Publication of CN110633095B publication Critical patent/CN110633095B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a system and a method for code management. A system for software development, comprising: a first code server managing the first code in the first network and installed with a first SVN server software; a second code server managing second code in a second network and having second SVN server-side software installed, wherein the first code is a copy of the second code, wherein the system is capable of synchronizing changes to the second code in the second code server to the first code in the first code server through a synchronization mechanism between the first SVN server-side software and the second SVN server-side software.

Description

System and method for code management
Technical Field
The present invention relates to computer technology, and more particularly, to a system and method for code management.
Background
In the software development process, the security of the source code needs to be ensured so as to avoid leakage.
In this application, the terms "code" and "source code" are used interchangeably unless specifically stated otherwise. In the present application, unless otherwise specifically stated, "program" refers to an executable program compiled from source code.
Referring to fig. 1, for example, in early PC end-game development, a server code and a client code are both managed in the same network (usually an intranet), and the code security is ensured by means of physical isolation of the network. Research personnel start a server program and a client program on a PC (personal computer) of the same network to realize function test. As is generally understood by those skilled in the art, virtual or simulated software, hardware, or a combination of software and hardware is typically used in "functional testing" to simulate the actual equipment used by the actual user of the finally developed system when it is actually put into operation (typically the client device requires such simulation). The concept corresponding to "functional testing" is "real machine testing", in which the actual device (referred to as "real machine device" in this application) used by the actual user of the finally developed system when actually put into operation, such as a mobile phone connected to a commercial communication network and used by a game player in a mobile game system, is used.
However, for a program of a mobile terminal (for example, a mobile phone game), a client program is finally run in the mobile terminal of a user, and a development platform used by a developer is a PC, so the mobile phone game needs to perform a real machine test in addition to a functional test, the functional test can run the client program on the PC by using a simulator, and the real machine test has to install the client program on a real mobile phone to run. Therefore, the intra-and extranet synchronous development case must be considered, thereby deriving the following two code management modes.
Figure 2 shows a code management scheme involving two networks. The management of the code in the development process is mainly performed in the first network (for example, an intranet) (for example, the code of the client program and the code of the server program are managed simultaneously). For example, in an application for a cell phone, the server code and the client code may be managed in an intranet. When the function test is carried out, a server program and a client program generated from a source code are operated on a PC (personal computer) of the intranet; and when the real machine test is carried out, copying the generated server program and the client program to an external network, and installing the client program to the real machine for running. This mode does not copy the source code to the foreign network and therefore is highly secure; however, the real machine cannot be connected to carry out source code level debugging under the condition that no client codes exist in the external network, and the problem of the client cannot be eliminated when the client is in trouble.
FIG. 3 illustrates another code management schema found in a mobile game development environment. In fig. 3, server code is managed in the intranet, and client code is managed in the extranet. When the function test or the real machine test is carried out, the program of the internal network manufacturing server is copied to the external network and is matched with the client program manufactured in the external network for testing. The mode ensures the security of the server code, the external network has complete client code and can be connected with a real machine to carry out source code level debugging, but the server program needs to be re-manufactured and copied to the external network after the server code is modified every time, and a great amount of server code modification (possibly necessary modification of the server code and possibly modification matched with the modification of the client code) generally exists in the functional test stage, and a great amount of development time is wasted when the server program is copied once every time of modification.
Disclosure of Invention
According to one aspect of the invention, a system for software development may comprise: a first code server managing the first code in the first network and installed with a first SVN server software; a second code server managing second code in a second network and having second SVN server-side software installed, wherein the first code is a copy of the second code, wherein the system is capable of synchronizing changes to the second code in the second code server to the first code in the first code server through a synchronization mechanism between the first SVN server-side software and the second SVN server-side software.
The system also comprises a firewall server positioned between the first network and the second network, wherein the firewall server comprises a first network card and a second network card, the first network card is connected with the first network, and the second network card is connected with the second network.
The first code server is configured to open a first port to the firewall server, the firewall server is configured to open a second port to the second code server, and the firewall server is configured to turn on a forwarding function.
The first SVN server software and the second SVN server software are configured to have the same software running environment; and the second SVN server software is configured to initiate an auto-sync function.
The system further comprises: a third code server managing third code in a first network, wherein the first code is capable of generating a first program on the first code server and the third code is capable of generating a second program on the third code server, the first and second programs being functionally coordinated with each other.
The system further comprises: a program execution server capable of executing a program in a second network, wherein the system is capable of copying the third code from the third code server to the second network and generating the second program from the copied code for execution at the program execution server.
The system further comprises: a live device in a second network, wherein the system is capable of generating the first program from the second code on the second code server for execution on the live device, and the first program executed on the live device functionally interacts with the second program executed on the program execution server.
According to one aspect of the invention, a method for software development may include: setting a first code server which manages a first code and is provided with first SVN server software in a first network; setting a second code server managing a second code and installed with a second SVN server software in a second network, wherein the first code is a copy of the second code, and synchronizing changes of the second code in the second code server to the first code in the first code server through a synchronization mechanism between the first SVN server software and the second SVN server software.
The method further comprises the following steps: and setting a firewall server, wherein the firewall server comprises a first network card and a second network card, the first network card is connected with the first network, and the second network card is connected with the second network.
The method further comprises the following steps: setting the first code server to open a first port to the firewall server; setting the firewall server to open a second port to the second code server; and opening a forwarding function on the firewall server.
The method further comprises the following steps: configuring the first SVN server software and the second SVN server software to have the same software running environment; and starting an automatic synchronization function on the second SVN server software.
Drawings
Fig. 1 is a code management schema of an originating end-game according to the prior art.
FIG. 2 is a code management model for developing a mobile game according to the prior art.
FIG. 3 is another code management mode for developing a mobile game according to the prior art.
FIG. 4 is a code management schema for developing mobile terminal applications according to one embodiment of the present invention.
FIG. 5 is a component of a code management system using an SVN synchronization mechanism according to one embodiment of the present invention.
Detailed Description
The content of the invention will now be discussed with reference to a number of exemplary embodiments. It is to be understood that these examples are discussed only to enable those of ordinary skill in the art to better understand and thus implement the teachings of the present invention, and are not meant to imply any limitations on the scope of the invention.
As used herein, the term "include" and its variants are to be read as open-ended terms meaning "including, but not limited to. The term "based on" is to be read as "based, at least in part, on". The terms "one embodiment" and "an embodiment" are to be read as "at least one embodiment". The term "another embodiment" is to be read as "at least one other embodiment".
The present invention is applicable to a software development system involving two networks. The two networks are preferably physically separated, but may communicate exclusively through communication links specifically configured according to embodiments of the present invention. In a preferred embodiment, the first of the two networks is more secure (e.g., intranet) and the second network is more open (e.g., extranet). The invention is suitable for the development of a software system, which comprises two basic modules which are matched with each other in function on the system architecture, wherein the two basic modules which are matched with each other in function are, for example, a server module and a client module (for example, a hand-trip system comprises a server program and a client program), a base station module and a mobile terminal module, or a sending terminal module and a receiving terminal module, which are generally understood in the art; for such software systems, these two basic modules are referred to as a first side and a second side, respectively.
Embodiments of the present invention utilize SVN (subversion). SVN is a common file management tool that is typically used for version management of files (including but not limited to programs/code), wherein the SVN file management tool includes a first SVN server software and a second SVN server software.
FIG. 4 illustrates an embodiment of a code management system of the present invention. The first network of the code management system is an intranet in which a developer's PC, a server-side code server, and a first client-side code server are set. The server code is managed in the intranet through a server code server, and the client code is managed through a first client code server. For example, in a mobile game system, a client code on a first client code server may generate a client program during a function test, and a server code managed by a server code server in an intranet may generate a server program. The first SVN server software is installed in the first client code server. Further, the second network of the code management system is an external network in which a client terminal emulator capable of running a client program, a second client code server, and a server program running server capable of running a server program are provided. The client code is managed in the extranet by a second client code server. And second SVN server software is installed in the second client code server.
The server code server and the first client code server in the intranet are connected to the developer PC, and the second client code server and the server program running server in the extranet are connected to the client real machine. The server code server in the intranet can generate a server program from the managed server code and can copy the generated server program to the server program running server in the extranet when necessary.
A copy of client code that is read-only to a developer is stored on a first client code server in the intranet. The code management system of the present invention allows for synchronizing changes in client code on a second client code server in the extranet to client code in a first client code server in the intranet that is a copy of the client code on the second client code server through the synchronization mechanism of the present invention that is built based on the SVN. The details of the SVN synchronization mechanism are described in more detail below.
According to embodiments of the present invention, a developer may modify client code on a second client code server in the extranet. The SVN synchronization mechanism is constructed by the related arrangement of the first SVN server software installed on the first client code server and the second SVN server software installed on the second client code server, so that when a developer modifies the client codes on the second client code server, the client codes on the first client code server which are copies of the client codes are also modified synchronously.
When performing a functional test in the code management system in fig. 4, a server code in the intranet and a client code in a first client code server in the intranet may be used as test objects; when the real machine test is required to be carried out on the external network, a server program can be manufactured on the internal network and copied to a server program running server in the external network, and the server program is matched with a client code in the external network to carry out the test.
Fig. 5 illustrates an embodiment of an SVN synchronization mechanism that implements the present invention. This embodiment includes a firewall server located between the intranet and the extranet. As an embodiment of the present invention, in order to construct the SVN synchronization mechanism of the present invention, the system shown in fig. 5 needs to be configured as follows:
(1) the second client code server is located in the external network, the IP address of the second client code server is 10.10.1.1, the second SVN server software is operated, and the second SVN server software monitors a designated port (for example, 3690 port).
(2) The first client code server is located in the intranet, the IP address 10.20.1.1 of the first client code server runs the first SVN server software, and the first SVN server software listens to a designated port (e.g., 3690 port).
(3) The firewall server is provided with a double network card. The network card I is connected with an external network, and the IP address of the network card I is 10.10.1.2; the network card II is connected with the intranet, and the IP address of the network card II is 10.20.1.2.
In order to construct the SVN synchronization mechanism of the present invention, the following settings can be performed on the firewall server between the internal network and the external network:
setting the first client code server to open a port for the firewall server, e.g., opening 3690 port of the first client code server to the firewall server by:
iptables-I INPUT-s 10.20.1.2-p tcp--dport 3690-j ACCEPT
setting the firewall server to open a port for the second client code server, such as 4690 port of the firewall server to the second client code server by:
iptables-I INPUT-s 10.10.1.1-p tcp--dport 4690-j ACCEPT
the firewall server starts a data forwarding function, for example, edit/etc/sysctl.conf files, and changes net.ipv4.ip _ forward to 0 to net.ipv4.ip _ forward to 1
The port 3690 opened by the first client code server for the firewall server and the port 4690 opened by the firewall server for the second client code server enable the forwarding function of data from the second client code server to the first client code server. For example, the data may be forwarded by: iptables-tnat-A PREROUTING-d 10.10.1.2-p tcp-dport 4690-j DNAT-to-destination 10.20.1.1:3690
iptables-t nat-A POSTROUTING-d 10.20.1.1-p tcp--dport 3690-j SNAT 10.10.1.2
After the firewall server is set, to construct the SVN synchronization mechanism of the present invention, the first SVN server software and the second SVN server software may be set as follows:
the account syncup 1 is established and used on the second SVN server software, and an account syncup 2 for synchronization is established and used on the first SVN server software.
As a preparation, the settings of the first SVN server software corresponding to the first client code server are modified. Creating an svnroot/hooks/pre-revprop-change file, writing the following two lines of codes:
#!/bin/sh
exit 0
initializing the software runtime environment of the second SVN server software installed on the second client code server and forwarding the configuration file of the software runtime environment to the first SVN server software installed on the first client code server such that the first and second SVN server software have the same software runtime environment. For example, the initialization operation may be implemented by the following code: svnsyncinit svn://10.10.1.2:4690/svnroot svn://10.10.1.1/svnroot
And starting an automatic synchronization function on the second SVN server software, so that when the code on the second SVN server software changes, the code copy on the first SVN server software can automatically change correspondingly. The automatic synchronization function is realized, for example, by the following code:
#!/bin/sh
REPOS="$1"
REV="$2"
svnsync sync--non-interactive svn://10.10.1.2:4690/svnroot
--username syncuser--password password
in situations with low security requirements, the firewall server may not be used, but the first and second SVN server software may be allowed to communicate directly to achieve code synchronization.
The SVN synchronization mechanism provided by the embodiment of the invention has the synchronization speed of millisecond level, and the copy of the outer network client code and the inner network client code can be considered to be consistent in real time, so that the test result is not influenced. The SVN synchronization mechanism runs in a background in a fully automatic manner, and developers do not perceive this at all, so that the development efficiency is not affected, and even the development efficiency can be greatly improved (for example, the development efficiency is improved by at least 20%). The mode integrates the advantages of two common modes in the prior art, and not only can conveniently perform function test in an intranet, but also can perform source code level test of a real machine in an extranet on the basis of ensuring the safety of a server code. Furthermore, this model is particularly applicable to a development environment where each developer of a large development team develops both client code and server code (i.e., the developer develops in a "full-time model").
In addition, the embodiment disclosed by the invention is not only suitable for developing mobile games, but also suitable for developing HTML5 games and various application programs on various mobile terminals.
The method and system of the embodiments of the present invention can be implemented as pure software (e.g., a software program written in Java language), as pure hardware (e.g., a dedicated ASIC chip or FPGA chip) as needed, or as a system combining software and hardware (e.g., a firmware system storing fixed code).
Another aspect of the invention is a computer-readable medium having computer-readable instructions stored thereon that, when executed, perform a method of embodiments of the invention.
While various embodiments of the present invention have been described above, the above description is intended to be illustrative, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The scope of the claimed subject matter is limited only by the attached claims.

Claims (11)

1. A system for software development, comprising:
a first code server managing the first code in the first network and installed with a first SVN server software;
a second code server that manages a second code in a second network and that has a second SVN server software installed, wherein the first code is a copy of the second code,
wherein the system is capable of synchronizing changes to the second code in the second code server to the first code in the first code server through a synchronization mechanism between the first SVN server-side software and a second SVN server-side software.
2. The system of claim 1, further comprising a firewall server located between the first network and the second network, the firewall server comprising a first network card and a second network card, the first network card connected to the first network and the second network card connected to the second network.
3. The system of claim 2, wherein the first code server is configured to open a first port to the firewall server, the firewall server is configured to open a second port to the second code server, and the firewall server is configured to turn on a forwarding function.
4. The system of claim 1, wherein,
the first SVN server software and the second SVN server software are configured to have the same software running environment; and is
The second SVN server software is configured to initiate an auto-sync function.
5. The system of claim 1, further comprising: a third code server for managing the third code in the first network,
wherein the first code is capable of generating a first program on the first code server and the third code is capable of generating a second program on the third code server, the first and second programs being functionally coordinated with each other.
6. The system of claim 5, further comprising: a program execution server capable of executing a program in a second network, wherein the system is capable of copying the third code from the third code server to the second network and generating the second program from the copied code for execution at the program execution server.
7. The system of claim 6, further comprising: the live devices in the second network,
wherein the system is capable of generating the first program from the second code on the second code server to run on the live device, and the first program running on the live device functionally interworks with the second program running on the program execution server.
8. A method for software development, comprising:
setting a first code server which manages a first code and is provided with first SVN server software in a first network;
setting a second code server in a second network, managing a second code and installed with a second SVN server software, wherein the first code is a copy of the second code,
synchronizing changes to the second code in the second code server to the first code in the first code server through a synchronization mechanism between the first SVN server-side software and a second SVN server-side software.
9. The method of claim 8, wherein the method further comprises:
and setting a firewall server, wherein the firewall server comprises a first network card and a second network card, the first network card is connected with the first network, and the second network card is connected with the second network.
10. The method of claim 9, further comprising:
setting the first code server to open a first port to the firewall server;
setting the firewall server to open a second port to the second code server; and
and setting the firewall server to start a forwarding function.
11. The method of claim 8, further comprising:
configuring the first SVN server software and the second SVN server software to have the same software running environment; and
and setting the second SVN server software to start an automatic synchronization function.
CN201811495188.6A 2018-12-07 2018-12-07 System and method for software development Active CN110633095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811495188.6A CN110633095B (en) 2018-12-07 2018-12-07 System and method for software development

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811495188.6A CN110633095B (en) 2018-12-07 2018-12-07 System and method for software development

Publications (2)

Publication Number Publication Date
CN110633095A true CN110633095A (en) 2019-12-31
CN110633095B CN110633095B (en) 2023-07-14

Family

ID=68968829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811495188.6A Active CN110633095B (en) 2018-12-07 2018-12-07 System and method for software development

Country Status (1)

Country Link
CN (1) CN110633095B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140047413A1 (en) * 2012-08-09 2014-02-13 Modit, Inc. Developing, Modifying, and Using Applications
CN103729195A (en) * 2014-01-15 2014-04-16 北京奇虎科技有限公司 Control method and system for software version
CN105739960A (en) * 2014-12-11 2016-07-06 上海尚景信息技术有限公司 Software development environment framework capable of being continuously integrated
CN106201857A (en) * 2015-05-05 2016-12-07 阿里巴巴集团控股有限公司 The choosing method of test case and device
CN106502746A (en) * 2016-11-02 2017-03-15 网易(杭州)网络有限公司 The packaging method and device of application program
CN106775623A (en) * 2016-11-17 2017-05-31 网易(杭州)网络有限公司 Plan the processing method and processing device of allocation list

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140047413A1 (en) * 2012-08-09 2014-02-13 Modit, Inc. Developing, Modifying, and Using Applications
CN103729195A (en) * 2014-01-15 2014-04-16 北京奇虎科技有限公司 Control method and system for software version
CN105739960A (en) * 2014-12-11 2016-07-06 上海尚景信息技术有限公司 Software development environment framework capable of being continuously integrated
CN106201857A (en) * 2015-05-05 2016-12-07 阿里巴巴集团控股有限公司 The choosing method of test case and device
CN106502746A (en) * 2016-11-02 2017-03-15 网易(杭州)网络有限公司 The packaging method and device of application program
CN106775623A (en) * 2016-11-17 2017-05-31 网易(杭州)网络有限公司 Plan the processing method and processing device of allocation list

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
胡志宙: "Shorewall防火墙软件在经管类实验室的应用", 《实验室研究与探索》 *
黄炜耀: "基于Subversion的代码分析工具KLine", 《网络安全技术与应用》 *

Also Published As

Publication number Publication date
CN110633095B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
CN108647028B (en) Application information processing method and device
CN110024362A (en) Bluetooth test system and method
CN110781085B (en) Game automatic testing method, device, terminal and computer storage medium
WO2016029792A1 (en) Hardware device debugging method, device and system
CN113489603B (en) Interactive background flow generation method and system in network target range
CN102955698A (en) Processing method and device based on multi-terminal software development
CN116681013B (en) Simulation verification method, platform, device, equipment and medium of network chip
CN105095087A (en) Permission operation based software test system and method
US20020138821A1 (en) Method and apparatus for seamless porting of object code between operating system environments
CN110633095A (en) System and method for code management
JP6603746B2 (en) Method and computing system for automatically generating embedded software on a virtualized system
CN114925516B (en) Automatic modeling and simulating method and device
CN111400166A (en) Real-time communication service testing method, device and system and electronic equipment
Jääskeläinen et al. Model-based testing service on the web
CN114924772A (en) Updating method and equipment of algorithm package
CN109947407B (en) Data acquisition method and device
CN109408194B (en) System and method for simulating execution of file
CN111082984A (en) Method and device for simulating login of network equipment to carry out command line interaction
WO2019021898A1 (en) Development support device
Baker et al. Early UML model testing using TTCN-3 and the UML testing profile
CN116610516B (en) Internet of things programming operation and maintenance base system and method based on equipment digital twin
Wincierz A Tool Chain for Test-driven Development of Reference Net Software Components in the Context of CAPA Agents.
CN112882720B (en) Compiling method and device
JP6644203B2 (en) State reproduction system, state reproduction program, security inspection system and security inspection program
CN113805899B (en) Automatic software deployment method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant