KR20060121074A - Hybrid peer to peer network intelligent distributed compiler system and method thereof, and computer readable recording medium on which a program therefor is recorded - Google Patents

Hybrid peer to peer network intelligent distributed compiler system and method thereof, and computer readable recording medium on which a program therefor is recorded Download PDF

Info

Publication number
KR20060121074A
KR20060121074A KR1020050049535A KR20050049535A KR20060121074A KR 20060121074 A KR20060121074 A KR 20060121074A KR 1020050049535 A KR1020050049535 A KR 1020050049535A KR 20050049535 A KR20050049535 A KR 20050049535A KR 20060121074 A KR20060121074 A KR 20060121074A
Authority
KR
South Korea
Prior art keywords
compilation
host
file
distributed
remote
Prior art date
Application number
KR1020050049535A
Other languages
Korean (ko)
Other versions
KR100738004B1 (en
Inventor
윤명의
Original Assignee
(주)주빅스테크놀러지
윤명의
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 (주)주빅스테크놀러지, 윤명의 filed Critical (주)주빅스테크놀러지
Priority to KR1020050049535A priority Critical patent/KR100738004B1/en
Publication of KR20060121074A publication Critical patent/KR20060121074A/en
Application granted granted Critical
Publication of KR100738004B1 publication Critical patent/KR100738004B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/45Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions
    • G06F8/451Code distribution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/37Compiler construction; Parser generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/45Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions
    • G06F8/457Communication

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

A hybrid P2P(Peer-to-Peer) network intelligent distributed compiler system and a method thereof, and a computer-readable recording medium storing a program thereof are provided to perform a compiling process in the shorted time with maximum efficiency by concurrently advancing the compiling process after intelligently allocating large compile work to multiple remote hosts and distributing source files in a P2P mode. A management server(104) manages an idle host connection information list by connecting to the remote hosts(101,103) through the network. A local host(102) generates a dependency map of compiled files according to a distributed compile working request of the user, generates a compile working set according to the dependency map, and allocates/transmits the compile working set in the P2P mode based on the idle host connection information list. Remote hosts perform compiling for the compile working set received from the local host and transmit a corresponding result to the local host. The local host allocates the compile working set to each idle host by making similar 'CWSB(U)(Compile Working Set Bunch Union).size' allocated to each idle host.

Description

하이브리드 P2P 네트워크 지능형 분산 컴파일러 시스템 및 그 방법과 상기 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체{Hybrid Peer To Peer Network Intelligent Distributed Compiler System and Method thereof, and Computer Readable Recording Medium on which a Program therefor is recorded}Hybrid Peer To Peer Network Intelligent Distributed Compiler System and Method about, and Computer Readable Recording Medium on which a Program therefor is recorded}

도 1은 본 발명에 따른 분산 컴파일러 시스템의 일실시예 네트워크 구성도,1 is a block diagram of an embodiment of a distributed compiler system according to the present invention;

도 2는 도 1의 로컬 호스트에서의 컴파일 작업 집합 분석 과정을 설명하는 일실시예 도면,FIG. 2 is a diagram for explaining a compilation working set analyzing process in a local host of FIG. 1;

도 3은 본 발명에 따른 하이브리드 P2P 네트워크 지능형 분산 컴파일 방법을 설명하는 일실시예 흐름도,3 is a flowchart illustrating a hybrid P2P network intelligent distributed compilation method according to the present invention;

도 4는 본 발명에 따른 하이브리드 P2P 네트워크 지능형 분산 컴파일 방법을 설명하는 다른 일실시예 흐름도이다.4 is another exemplary flowchart illustrating a hybrid P2P network intelligent distributed compilation method according to the present invention.

* 도면의 주요 부분에 대한 부호의 설명* Explanation of symbols for the main parts of the drawings

101, 103 : 리모트 호스트 102 : 로컬 호스트101, 103: remote host 102: local host

104 : 관리 서버104: management server

본 발명은 분산 컴파일 시스템에 관한 것으로, 상세하게는 네트워크 상에서 접근 가능한 유휴 리모트 호스트들에 지능적으로 컴파일 작업들을 할당하고 소스 파일들을 P2P(Peer To Peer) 방식으로 분배하여 컴파일 과정을 동시에 진행시키는 하이브리드 P2P 네트워크 지능형 분산 컴파일러 시스템 및 그 방법과 상기 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 관한 것이다.The present invention relates to a distributed compilation system, and more particularly, hybrid P2P which intelligently allocates compilation tasks to idle remote hosts accessible on a network and distributes source files in a peer to peer (P2P) manner to simultaneously perform a compilation process. A network intelligent distributed compiler system and a method thereof, and a computer-readable recording medium having recorded thereon a program for realizing the method.

소프트웨어의 크기가 점차 커지고 복잡해지고 있으며, 그에 따라 소프트웨어를 구성하는 구성물인 프로그램 소스 파일도 점차 비대해지고 있다. 따라서, 프로그램 소스 파일들을 컴파일하여 오브젝트 파일을 만들고 이후 링크 과정을 거쳐 바이너리를 생성하여 소프트웨어 제품으로 만들어 내는데 걸리는 시간이 점점 더 길어지고 있다. 이러한 시간지연은 소프트웨어 제품 개발에 있어서 큰 장애 요인이다.The size of the software is getting bigger and more complicated, and accordingly, the program source file, which is a component constituting the software, is also gradually enlarged. Therefore, the time taken to compile the program source files to create an object file, and then generate the binary through a link process to produce a software product is getting longer. This time lag is a major obstacle to software product development.

종래의 컴파일 방식은 각각의 로컬 호스트에, 제작된 소프트웨어가 운용될 플랫폼에서 동작하는 오브젝트를 만들어내는 네이티브(native) 혹은 크로스(cross) 컴파일러를 설치하고 소소 파일을 구성하여 컴파일을 진행하는 방식이다. 이러한 방식은 소스 파일의 양이 적을 경우 간단하고 빠르게 컴파일을 진행할 수 있지만, 로컬 호스트에서만 컴파일을 진행해야 하기 때문에 소스 파일의 양이 상당히 커질 경우 그에 비례하여 컴파일을 진행하는데 걸리는 시간이 길어지게 된다. 컴파일 과정은 기계적인 과정이므로 컴파일 과정을 수행하는 지식 근로자는 시간을 과도하게 낭비하게 되며, 또한 큰 비용이 소요되는 문제점이 있다.The conventional compilation method is to install a native or cross compiler that creates an object that runs on the platform on which the produced software is to be run on each local host, and composes a source file and compiles it. This method can compile quickly and simply when the amount of source files is small. However, since the compilation should be done only on the local host, the time required to compile is proportionately increased when the amount of source files becomes large. Since the compilation process is a mechanical process, the knowledge worker who performs the compilation process wastes excessive time, and there is a problem that a large cost is required.

전술한 방식에서 조금 진보된 방식으로는 소스 파일을 전처리하고, 전처리된 파일을 리모트 호스트에 분배하여 컴파일을 진행하는 방식이다. 이 방식은 간단한 소스 파일들을 처리하기에는 문제가 없으나, 복잡하고 양이 많은 소스 파일들을 컴파일하는데 문제가 있다. 전처리를 하는 과정이 로컬 호스트에서 이루어지므로 오버헤드가 상당히 크며, 전처리된 파일의 크기가 소스 파일의 수 배~수십 배로 커지게 되고, 리모트 호스트의 수에 비례하여 네트워크 입출력 데이터가 증가하여 컴파일에 걸리는 시간이 로컬 호스트에서만 컴파일하는 것보다 느려지는 문제점이 있다.In the above-described method, a more advanced method is to preprocess a source file and distribute the preprocessed file to a remote host for compilation. This approach is fine for handling simple source files, but it is a problem for compiling complex and intensive source files. Since the preprocessing process is done on the local host, the overhead is quite large, and the preprocessed file size is several times to several tens of the source files, and the network I / O data increases in proportion to the number of remote hosts. The problem is that the time is slower than compiling only on the local host.

본 발명은 상기 문제점을 해결하기 위하여 제안된 것으로, 대용량의 컴파일 작업을 다수의 호스트에 지능적으로 할당하고 소스 파일들을 P2P(Peer To Peer) 방식으로 분배하여 컴파일 과정을 동시에 진행시킴으로써, 최대의 효율로 최단 시간내에 컴파일 작업을 수행할 수 있는 하이브리드 P2P 네트워크 지능형 분산 컴파일러 시스템 및 그 방법과 상기 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공하는데 그 목적이 있다.The present invention has been proposed to solve the above problems, by intelligently allocating a large amount of compilation work to a plurality of hosts and by distributing the source files in a peer-to-peer (P2P) method at the same time, maximizing efficiency It is an object of the present invention to provide a hybrid P2P network intelligent distributed compiler system capable of performing a compilation operation in the shortest time, and a computer readable recording medium having recorded thereon a program for realizing the method.

본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있으며, 본 발명의 실시예에 의해 보다 분명하게 알게 될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.Other objects and advantages of the present invention can be understood by the following description, and will be more clearly understood by the embodiments of the present invention. Also, it will be readily appreciated that the objects and advantages of the present invention may be realized by the means and combinations thereof indicated in the claims.

상기 목적을 달성하기 위한 본 발명은, P2P(Peer TO Peer) 네트워크 지능형 분산 컴파일러 시스템으로서, 다수의 호스트와 네트워크 연결되어 유휴 호스트의 접속 정보 리스트를 관리하기 위한 관리 서버; 사용자의 분산 컴파일 작업 요청에 따라 컴파일 대상 파일들의 의존관계 맵을 생성하고 그에 따라 컴파일 작업 집합을 생성하며, 상기 유휴 호스트 접속 정보 리스트를 토대로 상기 컴파일 작업 집합을 할당하여 P2P 방식으로 전송하기 위한 로컬 호스트; 및 상기 로컬 호스트로부터 수신한 컴파일 작업 집합에 대해 컴파일을 수행하고 그에 따른 결과물을 상기 로컬 호스트로 전송하기 위한 적어도 하나 이상의 리모트 호스트를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided a peer to peer network intelligent distributed compiler system, comprising: a management server for network connection with a plurality of hosts to manage a connection information list of an idle host; A local host for generating a dependency map of files to be compiled according to a user's distributed compilation task request and generating a compilation task set accordingly, and allocating the compilation task set based on the idle host access information list and transmitting the P2P scheme. ; And at least one remote host for performing a compilation on the compilation work set received from the local host and transmitting a result thereof to the local host.

또한, 본 발명은, P2P 네트워크 지능형 분산 컴파일 방법으로서, 임의의 한 호스트(이하, '로컬 호스트'라 한다)가 사용자의 분산 컴파일 작업 요청에 따라 컴파일 대상 파일들의 의존관계 맵을 생성하고 그에 따라 컴파일 작업 집합을 생성하는 컴파일 작업 집합 분석단계; 관리 서버로부터 이용 가능한 호스트(이하, '리모트 호스트'라 한다)의 접속 정보 리스트를 수신하고, 수신된 접속 정보 리스트를 바탕으로 리모트 호스트들과 P2P 네트워크 연결을 설정하는 네트워크 설정단계; 각 호스트에 상기 컴파일 작업 집합을 할당하는 컴파일 작업 집합 할당단계; 할당된 컴파일 작업 집합을 P2P 방식으로 리모트 호스트에 전송하는 P2P 전송단계; 및 리모트 호스트로부터 컴파일 결과를 수신하는 컴파일 결과 수신단계를 포함하는 것을 특징으로 한다.In addition, the present invention is a P2P network intelligent distributed compilation method, in which any host (hereinafter referred to as a "local host") generates a dependency map of files to be compiled according to a user's request for distributed compilation, and compiles accordingly A compilation working set analyzing step of generating a working set; A network setting step of receiving a connection information list of a host (hereinafter referred to as a "remote host") available from a management server and establishing a P2P network connection with remote hosts based on the received connection information list; A compilation task set assignment step of allocating the compilation task set to each host; A P2P transmission step of transmitting the assigned compilation work set to the remote host in a P2P manner; And a compilation result receiving step of receiving a compilation result from a remote host.

또한, 본 발명은, 사용자의 분산 컴파일 작업 요청에 따라 컴파일 대상 파일들의 의존관계 맵을 생성하고 그에 따라 컴파일 작업 집합을 생성하는 컴파일 작업 집합 분석기능; 관리 서버로부터 이용 가능한 호스트의 접속 정보 리스트를 수신하고, 수신된 접속 정보 리스트를 바탕으로 리모트 호스트들과 P2P 네트워크 연결을 설정하는 네트워크 설정기능; 각 호스트에 상기 컴파일 작업 집합을 할당하는 컴파일 작업 집합 할당기능; 할당된 컴파일 작업 집합을 P2P 방식으로 호스트에 전송하는 P2P 전송기능; 및 호스트로부터 컴파일 결과를 수신하는 컴파일 결과 수신기능을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공한다.The present invention also provides a compilation task set analysis function for generating a dependency map of compilation files according to a user's distributed compilation task request and generating a compilation task set accordingly; A network setting function for receiving a connection information list of available hosts from a management server and establishing a P2P network connection with remote hosts based on the received connection information list; A compilation work set assignment function for allocating the compilation work set to each host; A P2P transmission function for transmitting the allocated compilation work set to the host in a P2P manner; And a computer readable recording medium having recorded thereon a program for realizing a compilation result receiving function for receiving a compilation result from a host.

상술한 목적, 특징 및 장점은 첨부된 도면과 관련한 다음의 상세한 설명을 통하여 보다 분명해 질 것이며, 그에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 또한, 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에 그 상세한 설명을 생략하기로 한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일실시예를 상세히 설명하기로 한다.The above objects, features and advantages will become more apparent from the following detailed description taken in conjunction with the accompanying drawings, whereby those skilled in the art may easily implement the technical idea of the present invention. There will be. In addition, in describing the present invention, when it is determined that the detailed description of the known technology related to the present invention may unnecessarily obscure the gist of the present invention, the detailed description thereof will be omitted. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명에 따른 분산 컴파일러 시스템의 일실시예 네트워크 구성도이다.1 is a block diagram illustrating an embodiment of a distributed compiler system in accordance with the present invention.

먼저, 각각의 호스트(101, 102, 103)에는 에이전트 소프트웨어가 설치된다. 그리고, 특정 호스트(104)에는 각각의 호스트에 설치된 에이전트들을 관리하고 조정하기 위한 관리 서버 소프트웨어가 설치된다. 각 에이전트들은 관리 서버와 네트워크 연결을 설정한다. First, agent software is installed on each of the hosts 101, 102, 103. In addition, specific host 104 is provided with management server software for managing and coordinating agents installed in each host. Each agent establishes a network connection with the management server.

네트워크 설정 후, 사용자가 임의의 호스트에서 분산 컴파일 작업 요청을 하면 그 임의의 호스트(102, 이하 "로컬 호스트"라 한다)는 컴파일 작업 집합 분석을 수행한다. 컴파일 작업 집합 분석 후, 로컬 호스트(102)는 컴파일 작업의 개수에 따라 관리 서버(104)에 적당한 대수의 호스트(이하 "리모트 호스트"라 한다)를 요청하고, 관리 서버(104)는 이용 가능한 리모트 호스트(101, 103)의 접속 정보 리스트를 로컬 호스트로 전송한다. 본 실시예에서는 이용 가능한 리모트 호스트로 두개의 호스트만을 도시하였으나, 이제 한정되지 않음은 자명하다.After the network setup, when a user makes a distributed compile request from any host, the arbitrary host 102 (hereinafter referred to as "local host") performs a compile work set analysis. After analyzing the compilation set, the local host 102 requests the appropriate number of hosts (hereinafter referred to as "remote hosts") from the management server 104 according to the number of compilation operations, and the management server 104 makes available remotes. The connection information list of the hosts 101 and 103 is transmitted to the local host. In the present embodiment, only two hosts are shown as available remote hosts, but the present invention is not limited thereto.

즉, 관리 서버(104)는 네트워크 상에 존재하는 각 호스트의 CPU 사용률, 메모리 사용률, 유휴 저장 장치 크기 등에 대한 정보를 갖고 있어, 그 정보를 이용하여 로컬 호스트(102)가 접속할 수 있는 최적의 유휴 호스트의 접속 정보 리스트를 만들어 로컬 호스트(102)에 전송한다.That is, the management server 104 has information on CPU usage, memory usage, idle storage size, etc. of each host existing on the network, and uses the information to optimally idle the local host 102. A list of host connection information is created and transmitted to the local host 102.

관리 서버(104)로부터 접속 정보 리스트를 수신한 로컬 호스트(102)는 상기 접속 정보 리스트를 바탕으로 리모트 호스트들(101, 103)과의 네트워크를 설정한다. 그리고, 로컬 호스트(102)는 정교한 분배 알고리즘에 따라 각 호스트(리모트 호스트, 로컬 호스트 포함)에 컴파일 작업 집합을 할당하고, 할당된 컴파일 작업 집합에 포함된 파일들을 P2P 방식으로 각 호스트(101, 103)에 전송한다. 이에 대한 상세한 설명은 후술한다.Upon receiving the connection information list from the management server 104, the local host 102 establishes a network with the remote hosts 101 and 103 based on the connection information list. In addition, the local host 102 allocates a compilation work set to each host (including a remote host and a local host) according to a sophisticated distribution algorithm, and hosts each of the hosts 101 and 103 in a P2P manner. To be sent). Detailed description thereof will be described later.

리모트 호스트(101, 103)는 P2P 방식으로 로컬 호스트(102)로부터 전송된 컴파일 작업 집합에 대해 컴파일을 수행하고 그에 따른 결과물을 로컬 호스트(102)로 전송한다. 동시에 로컬 호스트(102)도 할당된 컴파일 작업 집합에 대해 컴파일을 수행한다. 각 호스트(리모트 호스트, 로컬 호스트 포함)에서 컴파일 작업과 파일 송수신 작업은 중첩되어 일어나므로 컴파일 작업 집합에 포함된 파일 집합이 모두 준비되지 않은 초기 시간을 제외하고 파일 송수신 시간은 전체 분산 컴파일 시간에 큰 영향을 미치지 않는다. 모든 컴파일 작업이 완료되면 분산 컴파일 작업은 종료된다.The remote hosts 101 and 103 compile the compilation work set transmitted from the local host 102 in a P2P manner and transmit the result to the local host 102. At the same time, the local host 102 also compiles against the assigned compilation set. Compile and file send and receive operations are nested on each host (including remote hosts and local hosts), so the file send and receive time is large for the overall distributed compile time, except for the initial time when all of the file sets included in the compile set are not ready. Does not affect When all compilations are complete, the distributed compilation is finished.

도 2는 도 1의 로컬 호스트(102)에서의 컴파일 작업 집합 분석 과정을 설명하는 일실시예 도면이다.FIG. 2 is a diagram for describing a compilation working set analysis process in the local host 102 of FIG. 1.

소스 파일 내용을 분석하면 소스 파일이 정상적으로 컴파일되어 오브젝트 파일을 만들어내기 위해 필요한 리소스 파일(소스 파일, 텍스트 파일, 데이터 파일 등)들을 분석할 수 있고, 이러한 파일들은 서로 의존관계를 갖고 있다. 전체 소스 파일에 대해 의존관계를 분석하여 결과적으로 전체 파일의 의존관계 맵을 만든다.Analyzing the contents of the source file allows you to analyze the resource files (source files, text files, data files, etc.) needed to generate the object files by compiling the source files normally, and these files depend on each other. Dependency analysis on the entire source file results in a dependency map of the entire file.

컴파일 대상 소스 파일과 의존관계 연결 링크(Link)가 있는 모든 파일들의 묶음을 컴파일 작업 집합(Compile Working Set, 이하 'CWS'라 한다)이라 정의하고, CWS에 포함되는 파일들의 개수를 CWS.count라고 정의하며, CWS에 포함되는 파일들의 크기의 합을 CWS.size라고 정의한다. Define the bundle of all files that have compile target source file and dependency link as Compile Working Set (CWS), and the number of files included in CWS is called CWS.count. Define the sum of the files included in CWS as CWS.size.

로컬 호스트(102)는 모든 소스 파일을 갖고 있으므로 문제가 없으나, 리모트 호스트(101, 103)에서 컴파일이 정상적으로 수행되기 위해서는 CWS에 포함된 모든 파일이 리모트 호스트(101, 103)에 준비되어야 한다. 그러므로, 로컬 호스트(102)는 CWS 내의 모든 파일들을 리모트 호스트(101, 103)에 전송해야 한다.Since the local host 102 has all the source files, there is no problem, but in order for the compilation to be normally performed on the remote hosts 101 and 103, all files included in the CWS must be prepared in the remote hosts 101 and 103. Therefore, the local host 102 must send all files in the CWS to the remote host 101, 103.

컴파일 작업 집합을 분석하기 위해서는 컴파일 명령 행 옵션과 소스 파일들이 필요하다. 명령 행 옵션 중에서 리소스 파일 검색 패스 옵션(/I, -I 등), 사용자 정의 값 옵션(-D, /D 등), 소스 지정 옵션이 사용된다. 컴파일러는 리소스 파일 검색 패스 옵션을 이용하여 소스 파일의 위치를 찾아낸다. 사용자 정의 값 옵션은 소스 파일내에 정의되어 있는 심볼(symbol) 값을 대체하게 된다. 지정된 소스 파일에서 #include<expr> 구문과 패턴이 부합하는 부분들을 파싱해낸다. <expr> 구문은 상수 값일 수도 있고, 매크로 심볼일 수도 있다. 심볼일 경우 사용자 정의 값 옵션에 의해 주어진 값으로 변경된다. <expr> 구문은 결과적으로 리소스 파일 검색 패스 상에 존재하는 파일로 귀결된다. 위 파일들이 해당 소스 파일을 컴파일하는데 필요한 리소스 파일의 일부가 된다. 리소스 파일 또한 내부적으로 다른 리소스 파일을 필요로 할 수 있으므로 동일한 과정으로 모든 리소스 파일을 분석한다. 소스 파일을 컴파일 하는데 필요로 하는 모든 리소스 파일을 재귀적인 방식을 통해서 알아낸다.Compilation command line options and source files are required to analyze the compilation set. Among the command line options are resource file search path options (/ I, -I, etc.), user-defined value options (-D, / D, etc.) and source specification options. The compiler uses the resource file search path option to locate the source file. The user-defined value option replaces the symbol value defined in the source file. Parse the parts of the specified source file that match the #include <expr> syntax and pattern. The <expr> syntax can be a constant value or a macro symbol. For symbols, it is changed to the value given by the user-defined value option. The <expr> syntax results in a file existing on the resource file search path. These files are part of the resource file needed to compile the source file. Resource files may also need other resource files internally, so all resource files are analyzed in the same process. Recursively identify all resource files needed to compile the source file.

예를 들어, 로컬 호스트(102)에서 사용자의 요청에 의해 A.c(201), B.c(202), C.c(203), D.c(204) 파일에 대한 컴파일 요청이 되었고, 컴파일 작업 집합 분석 절차에 의해 도 2에 도시된 바와 같은 형태의 의존관계 구조가 분석되었다고 가정한다. 따라서, 의존관계 맵 데이터는 다음과 같다.For example, a request to compile files Ac 201, Bc 202, Cc 203, and Dc 204 was requested by the user at the local host 102. Assume that a dependency structure of the form shown in Figure 2 has been analyzed. Therefore, dependency map data is as follows.

A.c(201) : E.h(205), F.h(206), G.h(207)A.c (201): E.h (205), F.h (206), G.h (207)

B.c(202) : F.h(206), G.h(207)B.c (202): F.h (206), G.h (207)

C.c(203) : H.h(208)C. c (203): H. h (208)

D.c(204) :D.c (204):

E.h(205) : I.h(209)E.h (205): I.h (209)

F.h(206) : F.h (206):

G.h(207) : J.h(210)G.h (207): J.h (210)

H.h(208) :H.h (208):

I.h(209) : K.h(211)I.h (209): K.h (211)

J.h(210) : K.h(211)J.h (210): K.h (211)

K.h(211) :K.h (211):

의존관계 맵에 따라 A.c(201) 파일이 컴파일되어 A.o(212)를 생성하기 위해서는 E.h(205), F.h(206), G.h(207), I.h(209), J.h(210), K.h(211) 파일이 필요하며, 소스 파일과 리소스 파일을 모두 합친 A.c(201), E.h(205), F.h(206), G.h(207), I.h(209), J.h(210), K.h(211) 파일이 A.o를 만들기 위한 컴파일 작업 집합(CWS)이 된다. 또한, B.c(202) 파일이 컴파일되어 B.o(213)를 생성하기 위해서는 F.h(206), G.h(207), J.h(210), K.h(211) 파일이 필요하며, 소스 파일과 리소스 파일을 모두 합친 B.c(202), F.h(206), G.h(207), J.h(210), K.h(211) 파일이 B.o(213)를 만들기 위한 컴파일 작업 집합(CWS)이 된다. 또한, C.c(203) 파일이 컴파일되어 C.o(214)를 생성하기 위해서는 H.h(208) 파일이 필요하며, 소스 파일과 리소스 파일을 모두 합친 C.c(203), H.h(208) 파일이 C.o(214)를 만들기 위한 컴파일 작업 집합(CWS)이 된다. 또한, D.c(204) 파일이 컴파일되어 D.o(215)를 만들기 위한 컴파일 작업 집합(CWS)은 D.c(204)이다.The Ac 201 file is compiled according to the dependency map to generate the Ao 212. For example, Eh 205, Fh 206, Gh 207, Ih 209, Jh 210, Kh 211 A file is required, and the Ac (201), Eh (205), Fh (206), Gh (207), Ih (209), Jh (210), and Kh (211) files that combine both the source file and the resource file are Ao. It becomes a compilation working set (CWS) to create a. In addition, Fc 206, Gh 207, Jh 210, and Kh 211 files are required for the Bc 202 file to be compiled to generate Bo 213. The files Bc 202, Fh 206, Gh 207, Jh 210, and Kh 211 become a compilation working set (CWS) for making Bo 213. In addition, in order to compile the Cc 203 file and generate the Co 214, the Hh 208 file is required. The Cc 203 and Hh 208 files in which both the source file and the resource file are combined are the Co (214) files. It becomes a compilation working set (CWS) to create a. Also, the compilation set (CWS) for the D.c 204 file to be compiled to create the D.o 215 is D.c 204.

이하, 도 1의 로컬 호스트(102)에서의 컴파일 작업 집합 분배 알고리즘의 일실시예를 설명한다.Hereinafter, one embodiment of a compilation working set distribution algorithm in the local host 102 of FIG. 1 will be described.

로컬 호스트(102)의 사용자가 요청한 컴파일 작업이 N 개라고 가정하면, 로컬 호스트(102)에서 N개의 CWS가 만들어진다. 그리고, 로컬 호스트(102)가 관리 서버(104)로부터 M-1 개의 리모트 호스트 정보를 포함하는 접속 정보 리스트를 획득하였다고 가정하면, 총 M 개의 호스트(로컬 호스트 포함)에서 컴파일이 이루어진다. 따라서, N 개의 CWS를 M 개의 호스트에 적절하게 분배하는 알고리즘이 필요하다. 그러나, 분배 알고리즘이 과도하게 복잡하면 분배 과정이 지나치게 오래 걸려 분산 컴파일의 시간적인 장점이 줄어들기 때문에 간단하면서도 효과적인 알고리즘을 사용한다.Assuming that there are N compilations requested by the user of local host 102, N CWSs are created on local host 102. Further, assuming that the local host 102 obtains a connection information list including M-1 remote host information from the management server 104, compilation is performed on a total of M hosts (including local hosts). Therefore, there is a need for an algorithm that properly distributes N CWS to M hosts. However, excessively complex distribution algorithms use a simple and effective algorithm because the distribution process takes too long, reducing the time advantage of distributed compilation.

N 개의 CWS는 파일의 내용과, 크기, 개수에서 각각 차이가 있으므로 이러한 조건들을 토대로 최단시간 내에 모든 컴파일 작업이 완료되도록 분배 알고리즘을 적용한다. 또한, 각 호스트들은 성능 차이가 있으므로 우수한 성능을 가진 호스트 는 할당된 작업을 미리 끝마치게 된다. 할당된 작업을 모두 끝마친 호스트에는 전체 호스트에서 아직 처리되지 않은 CWS들이 재분배된다. CWS 재분배를 통해 분산 컴파일 작업이 모두 끝날 때까지 어느 하나의 호스트도 대기하지 않도록 한다.Since N CWSs differ in file contents, size, and number, based on these conditions, a distribution algorithm is applied to complete all compilations in the shortest time. In addition, each host has a difference in performance, so the host with the best performance finishes the allocated task in advance. Hosts that have finished all their work are redistributed with CWS that has not yet been processed by all hosts. CWS redistribution ensures that no single host is waiting for distributed compilation to finish.

개별 호스트가 할당 받은 전체 CWS를 컴파일 작업 집합 다발(Compile Working Set Bunch, 이하 "CWSB"라 한다)이라고 정의한다. M 개의 호스트에 CWS를 분배하면 M 개의 CWSB가 만들어진다. M 개의 호스트에 할당된 CWSB를 각각 CWSB-1, CWSB-2,....CWSB-M이라고 정의한다. 따라서, 임의의 K 번째 호스트에 할당된 CWSB는 CWSB-K 이다. 또한, CWSB 내의 CWS 파일들에 대해 합집합을 수행하여 획득된 파일 집합은 로컬 호스트(102)가 리모트 호스트로 전송해야 할 전체 파일 목록이고, 그 전체 파일 목록을 CWSB(U)(Compile Working Set Bunch Union)라고 정의한다. 이 때, CWSB(U).size를 CWSB(U)에 속한 파일들의 크기의 합이라고 정의하고, CWSB(U).count를 CWSB(U)에 속한 파일들의 개수라고 정의한다.The entire CWS allocated by an individual host is defined as a Compile Working Set Bunch (hereinafter referred to as "CWSB"). Distributing CWS to M hosts results in M CWSBs. CWSBs assigned to M hosts are defined as CWSB-1, CWSB-2, ... CWSB-M, respectively. Thus, the CWSB assigned to any K th host is CWSB-K. In addition, the file set obtained by performing union on the CWS files in the CWSB is a complete list of files that the local host 102 should transfer to the remote host, and the complete list of files is CWSB (U) (Compile Working Set Bunch Union). ). At this time, CWSB (U) .size is defined as the sum of the sizes of files belonging to CWSB (U), and CWSB (U) .count is defined as the number of files belonging to CWSB (U).

컴파일 작업 집합 파일 크기 동등화 알고리즘Compile working set file size equalization algorithm

M 개의 호스트에 각각 할당된 CWSB-K(U).size가 비슷한 크기가 되도록 N 개의 CWS를 할당하는 방법이다. 이진 구조로 이루어진 파일들을 컴파일할 때 바람직한 방법이다. 이진 구조로 이루어진 파일들(이미지, 데이터 파일 등)은 파일 크기에 따라 컴파일 시간이 비례하므로, CWSB(U).size가 비슷하도록 각 호스트에 N 개의 CWS를 할당한다.This is a method of allocating N CWSs such that CWSB-K (U) .size allocated to each of M hosts is about the same size. This is the preferred method for compiling binary structured files. Since binary files (images, data files, etc.) have compile time proportional to the file size, allocate N CWS to each host so that CWSB (U) .size is similar.

컴파일 작업 집합 파일 개수 정렬 알고리즘Compile Working Set File Count Sort Algorithm

CWS.count가 큰 CWS 간에 교집합을 하면 중복되는 파일이 존재할 가능성이 커진다. CWS 간에 중복되는 파일이 많아질수록 CWSB(U).count와 CWSB(U).size는 줄어들게 되므로 리모트 호스트에 전송해야 할 파일은 줄어든다. 따라서, 효과적인 네트워크 입출력이 가능해진다. N 개의 CWS들을 CWS.count를 기준으로 정렬하고, 정렬된 순서대로 순차적으로 M 개의 호스트에 할당한다.Intersection between CWS with large CWS.count increases the likelihood of duplicate files. The more files that are duplicated between CWS, the smaller CWSB (U) .count and CWSB (U) .size are, which means fewer files need to be transferred to the remote host. Thus, effective network input and output is possible. N CWSs are sorted based on CWS.count and assigned to M hosts in the sorted order.

컴파일 작업 집합 네트워크 입출력 최소화 알고리즘Compile Working Set Network I / O Minimization Algorithm

N 개의 CWS를 CWS.size를 기준으로 내림 차순 정렬하여 N/M(정수값) 개의 가장 파일 크기가 큰 CWS를 로컬 호스트에 할당하고, 나머지 CWS들을 나머지 M-1 개의 리모트 호스트에 상기 "컴파일 작업 집합 파일 개수 정렬 알고리즘"을 이용하여 할당한다. 로컬 호스트에 할당된 컴파일 작업은 파일 전송이 필요치 않으므로 전체적인 네트워크 입출력이 작아지게 된다.Sort N CWS in descending order by CWS.size to allocate the largest N / M (large) file size CWS to the local host, and assign the remaining CWS to the remaining M-1 remote hosts. Set file number sorting algorithm. Compilation tasks assigned to the local host do not require file transfers, resulting in smaller overall network I / O.

이하, 도 1의 로컬 호스트(102)에서 리모트 호스트(101, 103)로의 P2P 파일 전송 방법을 설명한다.Hereinafter, a P2P file transfer method from the local host 102 of FIG. 1 to the remote hosts 101 and 103 will be described.

리모트 호스트(101, 103)에서 컴파일이 진행되려면 리모트 호스트(101, 103)는 컴파일하려는 CWS 파일들을 모두 전송받아야 한다. 그러나, 로컬 호스트(102)가 모든 리모트 호스트(101, 103)에 CWS 파일들을 직접 전송하는 방식을 사용하면, 네트워크 입출력이 로컬 호스트(102)에 집중되어 로컬 호스트(102)가 병목 지점으로 작용하게 되고, 또한 리모트 호스트가 많아질수록 로컬 호스트(102)의 네트워크 입출력이 증가하여 결국 분산 컴파일에 걸리는 시간이 증가한다. In order for the remote host 101 and 103 to compile, the remote host 101 and 103 must receive all CWS files to be compiled. However, if the local host 102 uses the method of directly sending CWS files to all remote hosts 101 and 103, network input / output is concentrated on the local host 102, causing the local host 102 to act as a bottleneck. In addition, as the number of remote hosts increases, the network input / output of the local host 102 increases, and thus the time required for distributed compilation increases.

예를 들어, "가"는 로컬 호스트이고, "가" 로컬 호스트는 "나" 리모트 호스 트에 A, B, C 파일을 전송해야 하고 "다" 리모트 호스트에 A, B, C, D, E 파일을 전송해야 한다고 가정하면, 로컬 호스트에서 리모트 호스트에 직접 파일을 전송해야 하므로 "가" 호스트는 "나" 호스트에 A, B, C 파일을 전송하고 "다" 호스트에 A, B, C, D, E 파일을 전송해야 한다. "가" 호스트는 총 A, B, C, A, B, C, D, E 8개의 파일을 전송하는데, A, B, C 파일은 동일한 파일임에도 불구하고 중복해서 "나", "다" 호스트에 전송한다. 즉, 동일한 파일을 중복하여 전송하여 그만큼의 시간지연이 발생하고, 또한 로컬 호스트에서 네트워크 입출력 양이 증가하여 전체적인 분산 컴파일 성능이 저하될 수 있다.For example, "A" is a local host, "A" local host must transfer A, B, C files to "I" remote host and A, B, C, D, E to "A" remote host. Assuming you need to transfer a file, you need to transfer files directly from the local host to the remote host, so the "A" host transfers A, B, and C files to "I" and A, B, C, D and E files must be transferred. "A" host transfers a total of eight files A, B, C, A, B, C, D, and E. Although A, B, and C files are the same file, duplicate "I" and "many" hosts To transmit. In other words, the same file is repeatedly transmitted and thus time delay occurs, and the amount of network input / output is increased in the local host, thereby reducing the overall distributed compilation performance.

본 발명에서는 P2P를 이용한 파일 전송 방식을 이용하여 위 문제점을 해결한다.The present invention solves the above problem by using a file transfer method using P2P.

상술한 바와 같이, 로컬 호스트(102)가 N 개의 CWS에 대한 컴파일 작업 요청을 사용자로부터 수신하면, 로컬 호스트(102)는 관리 서버(104)로부터 네트워크 상에 이용 가능한 M-1 개의 리모트 호스트 접속 정보 리스트를 수신하여 리모트 호스트들과 P2P 네트워크 연결을 설정한다. 이후, 로컬 호스트(102)는 상술한 컴파일 작업 집합 분배 알고리즘을 이용하여 M 개의 호스트(로컬 호스트 포함)에 대해 N 개의 CWS를 할당하여 M 개의 CWSB를 만든다. As described above, when the local host 102 receives a compilation job request for N CWSs from the user, the local host 102 receives M-1 remote host connection information available on the network from the management server 104. Receive the list to establish a P2P network connection with remote hosts. Thereafter, the local host 102 generates M CWSBs by allocating N CWSs for M hosts (including local hosts) using the above-described compilation working set distribution algorithm.

이후, 로컬 호스트(102)는 각 호스트에 할당된 CWSB(U) 내의 파일 집합을 검사한다. 그리고, 로컬 호스트(102)는 전체 리모트 호스트로 전송할 CWSB(U) 내의 각 파일에 대해 그 파일을 전송받아야 하는 호스트를 매핑시켜 호스트 리스트를 작성한다. 로컬 호스트(102)는 하나의 리모트 호스트에 각각의 파일과 그 파일을 전 송받아야 하는 호스트 리스트를 함께 전송한다. 이를 수신한 리모트 호스트는 전송받은 파일을 저장하고 호스트 리스트에서 자신의 주소를 삭제하고 나머지 호스트 중의 하나의 호스트에 그 파일과 호스트 리스트를 다시 전송한다. 이러한 방식으로 모든 리모트 호스트에 파일을 전송한다.The local host 102 then checks the set of files in the CWSB (U) assigned to each host. The local host 102 creates a host list by mapping a host to which the file should be transmitted for each file in the CWSB (U) to be transmitted to all remote hosts. The local host 102 transmits each file and a list of hosts to which the file should be transmitted to one remote host. The remote host receiving the file stores the received file, deletes its address from the host list, and sends the file and the host list back to one of the remaining hosts. In this way, the file is sent to all remote hosts.

예를 들어, "가"는 로컬 호스트이고, "가" 로컬 호스트는 "나" 리모트 호스트에 A, B, C 파일을 전송해야 하고 "다" 리모트 호스트에 A, B, C, D, E 파일을 전송해야 한다고 가정하고, 본 발명에 따라 로컬 호스트가 P2P 방식으로 파일을 전송하는 방법을 설명하면 다음과 같다. For example, "A" is a local host, "A" local host must transfer A, B, C files to "I" remote host, and A, B, C, D, E files to "da" remote host. Suppose that it is necessary to transmit, and in accordance with the present invention describes a method for transmitting a file in a P2P method as follows.

로컬 호스트는 "나", "다" 리모트 호스트에 할당한 CWSB를 검사하여 A(나, 다), B(나, 다), C(나, 다), D(다), E(다) 호스트 리스트를 만든다. 로컬 호스트는 "나" 리모트 호스트에 A 파일과 "나, 다" 호스트 리스트를 같이 전송한다. A 파일과 "나, 다" 호스트 리스트를 수신한 "나" 리모트 호스트는 A 파일을 저장하고 "나, 다" 호스트 리스트에서 "나"를 삭제한다. The local host examines the CWSBs assigned to the "me" and "many" remote hosts, and checks the host A (or, many), B (or, many), C (or, many), D (or many), or E (many) hosts. Make a list. The local host sends the file "A" and the list of "and" hosts to the "I" remote host. Receiving the A file and the "me," host list, the "me" remote host saves the file A and deletes the "me" from the "me," host list.

그리고, "나" 리모트 호스트는 "다" 리모트 호스트에 A 파일과 "다" 호스트 리스트를 전송한다. A 파일과 "다" 호스트 리스트를 수신한 "다" 리모트 호스트는 A 파일을 저장하고 "다" 호스트 리스트에서 "다"를 삭제한다. "다" 호스트 리스트에서 "다"를 삭제하면 더이상 전달해야 할 호스트 리스트가 없으므로 "다" 리모트 호스트는 파일 전송을 종료한다. The "I" remote host then sends the file "A" and the "multi" host list to the "multi" remote host. Receiving the A file and the "many" host list, the "many" remote host saves the A file and deletes "many" from the "many" host list. If you delete "D" from the "D" host list, the "D" remote host terminates the file transfer because there is no more host list to pass.

이와 같은 방식으로 B, C, D, E 파일에 대해서도 P2P 전송을 하여 모든 호스트에 파일을 전송한다. 로컬 호스트 입장에서 로컬 호스트는 총 A, B, C, D, E 5개 의 파일만을 전송하고, 중복된 파일 전송도 일어나지 않는다. 로컬 호스트가 각각의 리모트 호스트에 파일을 직접 전송하는 방식에 비하여 효율이 우수하다. CWSB의 구성에 따라 이러한 효과는 파일 직접 전송 방식에 비해 몇 배가 될 수 있다.In this way, P2P transfer is also performed for B, C, D, and E files to transfer the files to all hosts. From the local host's point of view, the local host only transfers a total of five A, B, C, D, and E files, and no duplicate file transfers occur. It is more efficient than the local host sending files directly to each remote host. Depending on the configuration of the CWSB, this effect can be several times higher than the direct file transfer method.

한편, 소스 파일 전처리 방식과 비교하면 다음과 같은 이점이 있다. 소스 파일 전처리 방식을 본 발명에 따른 컴파일 작업 직합 분석으로 설명하면, 1개의 CWS를 컴파일하기 위해서 CWS내의 모든 파일을 전처리 과정을 통해 하나의 파일로 만들고, 이렇게 전처리된 파일을 리모트 호스트에 전송하며, 컴파일된 결과를 받아오게 된다. 따라서 동일한 파일을 개별 리모트 호스트에 중복해서 전송하게 된다. 특히, CWS.count가 클수록 전처리 방식의 파일 전송은 중복되고 네트워크 입출력에 컴파일 성능이 제한되어 일반 컴파일보다도 컴파일이 오래 걸린다. 본 발명에 따른 컴파일 작업 집합 분석과 P2P 파일 전송 방법을 이용하면 중복된 파일 전송이 생기지 않는다. 실제적인 검증을 통하여 전처리 방식과 본 발명에 따른 컴파일 방법에서 발생하는 네트워크 입출력 양을 비교하면 100배 정도의 차이를 나타낸다.On the other hand, compared with the source file preprocessing method has the following advantages. When the source file preprocessing method is described by the compilation task analysis according to the present invention, in order to compile one CWS, all files in the CWS are made into one file through the preprocessing process, and the preprocessed file is transmitted to the remote host. You will get a compiled result. Therefore, the same file is transferred to individual remote hosts in duplicate. In particular, the larger the CWS.count, the more the preprocessing file transfer is duplicated and the network I / O is limited to the compilation performance. By using the compilation work set analysis and the P2P file transfer method according to the present invention, duplicate file transfer does not occur. Comparing the amount of network I / O generated by the preprocessing method and the compilation method according to the present invention through actual verification, the difference is about 100 times.

이하, 도 1의 리모트 호스트(102)에서의 소스 파일 캐쉬 관리 방법을 설명한다.Hereinafter, a method of managing a source file cache at the remote host 102 of FIG. 1 will be described.

컴파일 과정은 반복된다. 따라서 분산 컴파일 과정도 반복된다. 매 과정마다 필요한 소스 파일들은 리모트 호스트(101, 103)에 준비되어야 한다. 그러나, 매 과정마다 동일한 소스 파일을 중복해서 전송하는 것은 네트워크 입출력 오버헤드를 크게 한다. 따라서, 본 발명에서는 소스 파일 캐쉬 관리 기술을 통해서 동일한 파 일을 중복해서 전송하는 것을 방지하고 변경된 소스 파일이나 부재한 파일만을 전송한다. The compilation process is repeated. Therefore, the distributed compilation process is repeated. Source files necessary for each process should be prepared in the remote host (101, 103). However, duplicate transmission of the same source file in every process adds to network input / output overhead. Therefore, in the present invention, the source file cache management technique prevents the same file from being transmitted repeatedly and transmits only the changed source file or the absent file.

먼저, 소스 파일을 전송하려는 로컬 호스트(102)는 전송하려는 소스 파일의 정보를 리모트 호스트(101, 103)에 전송한다. 이 정보를 전달받은 리모트 호스트(101, 103)는 호스트 내의 소스 파일 캐쉬 관리자에서 소스 파일을 검색하여 동일한 내용의 소스 파일이 있는지 검사한다. 로컬 호스트(102)로부터 전달받은 소스 파일 정보에 해당하는 소스 파일이 존재하지 않거나 내용이 다르면 리모트 호스트(101, 103)는 로컬 호스트(102)로 파일 전송을 요청한다. 파일 전송 요청을 전달받은 로컬 호스트(102)는 리모트 호스트(101, 103)에 실제로 파일을 전송한다. First, the local host 102 to transmit a source file transmits information of the source file to be transmitted to the remote hosts 101 and 103. The remote host (101, 103) receiving this information checks the source file from the source file cache manager in the host and checks whether there is a source file having the same content. If the source file corresponding to the source file information received from the local host 102 does not exist or the contents are different, the remote hosts 101 and 103 request a file transfer to the local host 102. The local host 102 that has received the file transfer request actually transmits the file to the remote host 101, 103.

동일한 소스 파일인지의 여부를 판단하는 정보로서 파일의 이름, 파일의 크기, 파일의 마지막 수정 시간, 파일 내용의 MD4 해쉬 값을 이용한다. 이러한 정보들이 모두 동일하면 동일한 소스 파일로 판단한다. MD4 해쉬 값을 구하는데 약간의 오버헤드가 발생하므로 필요에 따라 MD4 해쉬 값은 옵션사항으로 생략할 수 있다.The name of the file, the size of the file, the last modification time of the file, and the MD4 hash value of the file content are used as information for determining whether the file is the same source file. If all of this information is the same, it is determined as the same source file. There is some overhead in obtaining the MD4 hash value, so the MD4 hash value can be omitted as an option if necessary.

이하, 도 1의 관리 서버(104)에서의 오브젝트 파일 캐쉬 관리 방법을 설명한다.Hereinafter, the object file cache management method in the management server 104 of FIG. 1 will be described.

컴파일 과정의 입력 값은 컴파일 명령 행과 CWS이다. 컴파일 과정의 출력 값은 오브젝트 파일과 컴파일러 출력 메시지(컴파일러 에러/경고 등)이다. 컴파일러에 동일한 입력 값을 주면 동일한 출력 결과 값이 나온다. 따라서, 컴파일 입력 값과 출력 값 사이의 관계를 관리하면 입력 값이 주어졌을 때 출력 값을 예상할 수 있다. 또한, 입력 값에 대한 출력 값을 캐쉬 관리하면 실제로 컴파일을 하지 않더라도 컴파일을 요청한 사용자에게 컴파일 결과로 캐쉬된 오브젝트 파일과 컴파일러 출력 메시지를 응답할 수 있다.Input values for the compilation process are the compile command line and CWS. The output values of the compilation process are object files and compiler output messages (compiler errors / warnings, etc.). If you give the compiler the same input, you get the same output. Thus, by managing the relationship between the compiled input value and the output value, the output value can be expected when the input value is given. In addition, by caching output values for input values, you can respond to the user who requested the compilation and the object file and the compiler output message as a result of the compilation even if they do not actually compile.

각 호스트(로컬 호스트와 리모트 호스트 포함)는 주어진 컴파일 명령 행을 사용하여 CWS를 컴파일하고 그 결과 값인 오브젝트 파일과 컴파일러 출력 메시지를 생성한다. 이 때, 리모트 호스트(101, 103)는 로컬 호스트(102)로 오브젝트 결과물을 되돌려주고, 동시에 로컬 호스트(102) 및 리모트 호스트(101, 103)는 오브젝트 캐쉬 키를 생성하여 그 오브젝트 캐쉬 키와 오브젝트 파일 및 컴파일러 출력 메시지를 관리 서버(104)로 전달한다. 관리 서버(104)는 전달받은 오브젝트 캐쉬 키와 오브젝트 파일 및 컴파일러 출력 메시지를 오브젝트 캐쉬 관리자에 저장한다.Each host (including local and remote hosts) compiles the CWS using the given compile command line and produces the resulting object file and compiler output messages. At this time, the remote host 101, 103 returns the object output to the local host 102, and at the same time, the local host 102 and the remote host 101, 103 generate an object cache key and the object cache key and the object. Pass file and compiler output messages to the management server 104. The management server 104 stores the received object cache key, object file, and compiler output message in the object cache manager.

캐쉬 관리를 위한 키 값은 다음과 같은 방법으로 생성한다. 컴파일러의 입력 값인 컴파일 명령 행과 CWS에 대한 정보가 필요하다. CWS에 대한 정보는 각 파일의 이름, 크기, 마지막 수정 시간이다. 각 호스트는 특정한 메모리 버퍼에 먼저 컴파일 명령 행 정보를 기록하고 그 뒤에 CWS에 포함된 각 파일의 파일 이름, 크기, 마지막 수정 시간 등을 파일 이름 순서대로 차례로 기록한다. 이와 같이 생성된 데이터를 MD4 해쉬를 이용하여 64byte 키로 만들어 낸다. 동일한 키 값을 갖는 CWS 컴파일 요청은 동일한 결과를 만들어낸다.The key value for cache management is generated as follows. You need information about the compiler command line, the compile command line, and CWS. Information about the CWS is the name, size, and last modification time of each file. Each host first writes the compile command line information to a specific memory buffer, followed by the file name, size, and last modified time of each file in the CWS, in order of file name. The data created in this way is made into 64byte key using MD4 hash. CWS compilation requests with the same key value produce the same result.

로컬 호스트(102)는 사용자가 캐쉬 검색 옵션을 사용하여 분산 컴파일을 요청하면, 먼저 관리 서버(104)로 컴파일하려는 CWS들의 오브젝트 캐쉬 키 리스트를 전달한다. 오브젝트 캐쉬 키 리스트를 전달받은 관리 서버(104)는 오브젝트 캐쉬 관리자를 검색하여 해당하는 오브젝트 캐쉬 키가 존재하는지 조사한다. 해당하는 오브젝트 캐쉬 키가 존재할 경우 관리 서버(104)는 해당하는 오브젝트 파일과 컴파일러 출력 메시지를 로컬 호스트(102)로 전송한다. 로컬 호스트(102)는 캐쉬된 오브젝트 파일과 컴파일러 출력 메시지를 전달받아 해당 CWS의 컴파일 결과로 저장한다. 캐쉬 검색을 통해서 결과를 획득하지 못한 잔여 CWS들에 대한 처리는 일반적인 분산 컴파일 과정으로 처리된다.When the local host 102 requests distributed compilation using the cache retrieval option, it first passes a list of object cache keys of the CWSs to compile to the management server 104. The management server 104, which has received the object cache key list, searches for the object cache manager and checks whether the corresponding object cache key exists. If the corresponding object cache key exists, the management server 104 sends the corresponding object file and compiler output message to the local host 102. The local host 102 receives the cached object file and the compiler output message and stores them as a result of compilation of the corresponding CWS. Processing of remaining CWSs whose results are not obtained through a cache search is handled by a general distributed compilation process.

이하, 도 1의 리모트 호스트(101, 103)에서의 가상 컴파일러 환경 구축 방법을 설명한다.Hereinafter, a method for establishing a virtual compiler environment in the remote hosts 101 and 103 of FIG. 1 will be described.

분산 컴파일을 위해서는 로컬 호스트(102) 뿐만 아니라 리모트 호스트(101, 103)에서도 컴파일 과정이 동일하게 수행되어야 한다. 이를 위해, 로컬 및 리모트 호스트에 동일한 네이티브 컴파일러가 설치되어야 한다. 하지만, 가상 컴파일러 환경 구축 기술을 통해서 네이티브 컴파일러가 설치되어 있지 않는 리모트 호스트(101, 103)에서도 컴파일 작업을 수행할 수 있다.For distributed compilation, the compiling process should be performed on the remote host 101 and 103 as well as the local host 102. To do this, the same native compiler must be installed on the local and remote hosts. However, the virtual compiler environment construction technology can compile even remote hosts 101 and 103 that do not have a native compiler installed.

네이티브 컴파일러가 설치되어 있지 않은 리모트 호스트의 경우 분산 컴파일 작업 이전에 로컬 호스트(102)로부터 네이티브 컴파일러 실행 관련 파일을 전송받는다. 로컬 호스트(102)로부터 전송받은 네이티브 컴파일러 실행 관련 파일이 리모트 호스트에서 정상적으로 실행되기 위해서는, 네이티브 컴파일러 실행 관련 파일이 실행될 때 참조하게 되는 외부적인 환경(예를 들면, 운영체제(OS) 환경)이 리모트 호스트와 로컬호스트(102)에서 동일해야 한다. In the case of a remote host that does not have a native compiler installed, the native compiler execution related files are transmitted from the local host 102 before distributed compilation. In order for the native compiler execution related file received from the local host 102 to run normally on the remote host, an external environment (for example, an operating system (OS) environment) referred to when the native compiler execution related file is executed is executed by the remote host. And should be the same on the local host 102.

일반적으로 네이티브 컴파일러는 외부 환경과 접촉하기 위해 운영체제(OS)에서 제공하는 API들을 호출해야 한다. API들을 호출함으로써 네이티브 컴파일러는 자신이 실행될 수 있는 환경인지를 점검하게 된다. 그러나, 본 실시예의 리모트 호스트에는 네이티브 컴파일러가 정상적으로 설치된 것이 아니기 때문에, 보통의 API 호출을 수행하는 경우 리모트 호스트의 네이티브 컴파일러 실행 관련 파일은 자신이 정상적으로 실행될 수 없는 환경이라고 판단하게 된다. In general, native compilers should call APIs provided by the operating system (OS) to contact the external environment. By calling the APIs, the native compiler checks whether it is an environment in which it can run. However, since the native compiler is not normally installed in the remote host of the present embodiment, when a normal API call is made, it is determined that the native compiler execution related file of the remote host cannot be executed normally.

따라서, 리모트 호스트의 네이티브 컴파일러 실행 관련 파일이 API 호출을 수행하는 경우 자신이 정상적으로 실행될 수 있는 환경이라고 판단하도록 해야 한다. 이를 위해 리모트 호스트의 네이티브 컴파일러 실행 관련 파일이 호출하는 API들을 훅킹하고, 훅킹된 API들을 네트워크 연결을 통해 로컬 호스트(102)의 API 호출 대리자에게 전달한다. 로컬 호스트(102)의 API 호출 대리자는 리모트 호스트에서 발생된 API 호출을 대신 호출하고, 그 실행 결과를 네트워크를 통해 리모트 호스트로 전송한다. 리모트 호스트의 네이티브 컴파일러 실행 관련 파일은 상기 대리 호출 실행 결과를 기초로 자신이 정상적으로 실행될 수 있는 환경이라고 판단하여 정상적인 컴파일을 수행한다. 즉, 리모트 호스트에 로컬 호스트와 동일한 가상의 컴파일러 환경이 구축된다.Therefore, when a native compiler execution related file of a remote host makes an API call, it should be determined that the environment can execute normally. To this end, hook APIs called by a native compiler execution related file of a remote host, and pass the hooked APIs to an API call delegate of the local host 102 through a network connection. The API call delegate at the local host 102 calls the API call made at the remote host instead and sends the execution result over the network to the remote host. The native compiler execution related file of the remote host determines that it is an environment in which it can be executed normally based on the execution result of the proxy call, and performs normal compilation. In other words, the same virtual compiler environment as that of the local host is established on the remote host.

도 3은 본 발명에 따른 하이브리드 P2P 네트워크 지능형 분산 컴파일 방법을 설명하는 일실시예 흐름도이다.3 is a flowchart illustrating an embodiment of a hybrid P2P network intelligent distributed compilation method according to the present invention.

도 3에 도시된 바와 같이, 먼저, 임의의 한 호스트(이하 "로컬 호스트"라 한 다)는 사용자로부터 컴파일 요청을 수신하면(301) 그 컴파일 요청이 분산 컴파일 요청인지 판단한다(302). As shown in FIG. 3, first, any one host (hereinafter referred to as "local host") receives a compilation request from a user (301) and determines whether the compilation request is a distributed compilation request (302).

판단 결과 분산 컴파일 요청이 아닌 경우, 로컬 호스트는 자체적으로 컴파일을 수행하고(303), 판단 결과 분산 컴파일 요청인 경우, 로컬 호스트는 관리 서버와 네트워크 연결을 시도한다(304).If the determination result is not a distributed compilation request, the local host compiles itself (303). If the determination result is a distributed compilation request, the local host attempts a network connection with the management server (304).

관리 서버와 네트워크 연결이 안되는 경우 로컬 호스트는 자체적으로 컴파일을 수행하고(303), 관리 서버와 네트워크 연결이 이루어진 경우 로컬 호스트는 컴파일 작업 집합 분석을 수행한다(305). 즉, 전체 소스 파일에 대해서 의존관계를 분석하여 전체 파일의 의존관계 맵을 생성한다. 컴파일 대상 소스 파일과 의존관계 연결 링크(Link)가 있는 모든 파일들의 묶음을 컴파일 작업 집합(Compile Working Set, 이하 'CWS'라 한다)이라 정의하고, CWS에 포함되는 파일들의 개수를 CWS.count라고 정의하며, CWS에 포함되는 파일들의 크기의 합을 CWS.size라고 정의한다. If there is no network connection with the management server, the local host compiles itself (303), and if the network connection with the management server is established, the local host performs compilation working set analysis (305). In other words, it creates a dependency map of the entire file by analyzing the dependencies of the entire source file. Define the bundle of all files that have compile target source file and dependency link as Compile Working Set (CWS), and the number of files included in CWS is called CWS.count. Define the sum of the files included in CWS as CWS.size.

관리 서버와 네트워크 연결 후, 로컬 호스트는 컴파일 작업의 개수에 따라 관리 서버에 적당한 대수의 호스트(이하 "리모트 호스트"라 한다)를 요청하고, 관리 서버로부터 이용 가능한 리모트 호스트의 접속 정보 리스트를 획득한다(306).After the network connection with the management server, the local host requests the appropriate number of hosts (hereinafter referred to as "remote host") from the management server according to the number of compilation tasks, and obtains a list of connection information of available remote hosts from the management server. (306).

이어서, 로컬 호스트는 상기 접속 정보 리스트를 바탕으로 리모트 호스트들과의 P2P 네트워크 연결을 설정한다(307). 그리고, 로컬 호스트는 정교한 분해 알고리즘에 따라 각 호스트(리모트 호스트, 로컬 호스트 포함)에 컴파일 작업 집합(CWS)을 할당한다(308). 컴파일 작업 집합 분배는 상술한 컴파일 작업 집합 파일 크기 동등화 알고리즘 또는 컴파일 작업 집합 파일 개수 정렬 알고리즘 또는 컴파일 작업 집합 네트워크 입출력 최소화 알고리즘을 이용할 수 있으나 이에 한정되지 않는다. 컴파일 작업 집합 분배 알고리즘을 이용하여 M 개의 호스트(로컬 호스트 포함)에 대해 N 개의 CWS를 할당하여 M 개의 CWSB를 만든다. Subsequently, the local host establishes a P2P network connection with remote hosts based on the connection information list (307). The local host then allocates a compilation working set (CWS) to each host (including remote host and local host) according to a sophisticated decomposition algorithm (308). The compile work set distribution may use the above-described compile work set file size equalization algorithm, compile work set file number sorting algorithm, or compile work set network I / O minimization algorithm, but is not limited thereto. M CWSBs are created by allocating N CWSs for M hosts (including local hosts) using the compilation working set distribution algorithm.

컴파일 작업 집합(CWS)을 할당한 후, 로컬 호스트는 P2P 방식으로 컴파일 작업 집합을 각 리모트 호스트로 전송한다(309). 즉, 로컬 호스트는 각 호스트에 할당된 CWSB(U) 내의 파일 집합을 검사한다. 그리고, 로컬 호스트는 전체 리모트 호스트로 전송할 CWSB(U) 내의 각 파일에 대해 그 파일을 전송받아야 하는 호스트를 매핑시켜 호스트 리스트를 작성한다. 로컬 호스트는 하나의 리모트 호스트에 각각의 파일과 그 파일을 전송받아야 하는 호스트 리스트를 함께 전송한다. 이를 수신한 리모트 호스트는 전송받은 파일을 저장하고 상기 호스트 리스트에서 자신의 주소를 삭제하고 나머지 호스트 중의 하나의 호스트에 그 파일과 호스트 리스트를 전송한다. 이러한 방식으로 모든 리모트 호스트에 파일을 전송한다.After allocating the compilation working set (CWS), the local host transmits the compilation working set to each remote host in a P2P manner (309). That is, the local host examines a set of files in the CWSB (U) assigned to each host. The local host creates a host list by mapping a host to which the file should be transmitted for each file in the CWSB (U) to be transmitted to all remote hosts. The local host sends each file together with a list of hosts that should receive the file. The remote host receiving the file stores the received file, deletes its address from the host list, and transmits the file and the host list to one of the other hosts. In this way, the file is sent to all remote hosts.

이어서, 로컬 호스트 및 P2P 방식으로 컴파일 작업 집합을 전달받은 리모트 호스트는 컴파일을 수행하고(310), 로컬 호스트는 리모트 호스트로부터 컴파일 결과를 수신한다(311).Subsequently, the local host and the remote host receiving the compilation work set in the P2P manner perform the compilation 310, and the local host receives the compilation result from the remote host 311.

이어서, 로컬 호스트는 컴파일 에러가 발생했는지 여부를 판단한다(312). 판단 결과, 컴파일 에러가 없으면 로컬 호스트는 모든 컴파일 작업이 완료되었는지 판단한다(313). 컴파일 작업이 모두 완료되지 않았으면, 로컬 호스트는 컴파일 작업 집합을 다시 할당하고(308), 컴파일 작업이 모두 완료되었으면 로컬 호스트는 컴파일을 종료한다.The local host then determines 312 whether a compilation error has occurred. As a result of the determination, if there is no compilation error, the local host determines whether all compilation tasks are completed (313). If not all of the compilation work is completed, the local host reassigns the compilation work set (308), and if all of the compilation work is completed, the local host terminates compilation.

한편, 리모트 호스트로부터 컴파일 결과를 수신하여 컴파일 에러가 발생했는지 여부를 판단한 결과 컴파일 에러가 존재하면, 로컬 호스트는 컴파일을 종료한다.On the other hand, if a compilation error exists as a result of receiving a compilation result from a remote host and determining whether a compilation error has occurred, the local host terminates compilation.

도 4는 본 발명에 따른 하이브리드 P2P 네트워크 지능형 분산 컴파일 방법을 설명하는 다른 일실시예 흐름도이다.4 is another exemplary flowchart illustrating a hybrid P2P network intelligent distributed compilation method according to the present invention.

도 4는 로컬 호스트가 컴파일 작업 집합 분석을 수행하는 과정(305)과 관리 서버로부터 이용 가능한 리모트 호스트의 접속 정보 리스트를 획득하는 과정(306) 사이에 다음과 같은 과정을 포함한다.4 includes the following process between the process of performing a compilation work set analysis by the local host 305 and the process of obtaining a list of access information of remote hosts available from the management server 306.

먼저, 사용자가 캐쉬 검색 옵션을 사용하여 분산 컴파일을 요청하였는지 여부를 판단한다(401). 사용자가 캐쉬 검색 옵션을 사용하여 분산 컴파일 요청을 한 경우, 로컬 호스트는 관리 서버로 컴파일하려는 CWS들의 오브젝트 캐쉬 키 리스트를 전송하고(402), 관리 서버는 오브젝트 캐쉬 관리자를 검색하여 해당하는 오브젝트 캐쉬 키가 존재하는지 조사한다. 해당하는 오브젝트 캐쉬 키가 존재할 경우 관리 서버는 그에 해당하는 오브젝트 파일과 컴파일러 출력 메시지를 로컬 호스트로 전송한다(403). First, it is determined whether the user has requested distributed compilation using the cache search option (401). When a user makes a distributed compile request using the cache retrieval option, the local host sends a list of object cache keys for the CWSs to compile to the management server (402), and the management server retrieves the object cache manager to find the corresponding object cache key. Check for the presence of. If the corresponding object cache key exists, the management server transmits the corresponding object file and compiler output message to the local host (403).

관리 서버로부터 오브젝트 파일과 컴파일러 출력 메시지를 수신한 로컬 호스트는 모든 컴파일 작업이 완료되었는지 판단하고(404), 컴파일 작업이 완료되지 않은 경우 관리 서버로부터 이용 가능한 리모트 호스트의 접속 정보 리스트를 획득하 여 분산 컴파일 과정을 진행한다(306).The local host receiving the object file and the compiler output message from the management server determines whether all compilations are completed (404), and if the compilation is not completed, obtains and distributes a list of available remote host connection information from the management server. The compilation process proceeds (306).

한편, 상술한 과정을 위해, 로컬 호스트 및 리모트 호스트는 본 발명에 따라 CWS를 컴파일한 후 오브젝트 캐쉬 키를 생성하고, 생성된 오브젝트 캐쉬 키와 오브젝트 파일 및 컴파일러 출력 메시지를 관리 서버로 전송한다. 관리 서버는 전달받은 오브젝트 캐쉬 키와 오브젝트 파일 및 컴파일 출력 메시지를 오브젝트 캐쉬 관리자에 저장한다(405).Meanwhile, for the above-described process, the local host and the remote host compile the CWS according to the present invention, generate an object cache key, and transmit the generated object cache key, object file, and compiler output message to the management server. The management server stores the received object cache key, object file, and compilation output message in the object cache manager (405).

오브젝트 캐쉬 키 생성은 다음의 방법을 이용한다. 컴파일러의 입력 값인 컴파일 명령 행과 CWS에 대한 정보가 필요하다. CWS에 대한 정보는 각 파일의 이름, 크기, 마지막 수정 시간이다. 각 호스트는 특정한 메모리 버퍼에 먼저 컴파일 명령 행 정보를 기록하고 그 뒤에 CWS에 포함된 각 파일의 파일 이름, 크기, 마지막 수정 시간 등을 파일 이름 순서대로 차례로 기록한다. 이와 같이 만들어진 데이터를 MD4 해쉬를 이용하여 64byte 키로 만들어 낸다.The object cache key generation uses the following method. You need information about the compiler command line, the compile command line, and CWS. Information about the CWS is the name, size, and last modification time of each file. Each host first writes the compile command line information to a specific memory buffer, followed by the file name, size, and last modified time of each file in the CWS, in order of file name. The data created in this way is made into 64 byte key using MD4 hash.

또한, 도 4는 로컬 호스트가 정교한 분해 알고리즘에 따라 각 호스트(리모트 호스트, 로컬 호스트 포함)에 컴파일 작업 집합(CWS)을 할당하는 과정(308)과 해당하는 파일을 P2P 방식으로 리모트 호스트에 전송하는 과정(309) 사이에 다음과 같은 과정을 포함한다.In addition, FIG. 4 illustrates a process in which a local host allocates a compilation working set (CWS) to each host (including a remote host and a local host) according to a sophisticated decomposition algorithm, and transmits a corresponding file to a remote host in a P2P manner. Between processes 309, the following processes are included.

즉, 할당된 파일을 P2P 방식으로 리모트 호스트에 전송하기 전에 로컬 호스트는 리모트 호스트로 소스 파일의 정보를 전송한다(406). 리모트 호스트는 소스 파일 캐쉬 관리자에서 소스 파일을 검색하여 동일한 내용의 소스 파일이 있는지 검사하고, 해당하는 파일이 존재하지 않는 경우 로컬 호스트로 해당하는 파일의 전송 을 요청한다(407).That is, before transferring the allocated file to the remote host in a P2P manner, the local host transmits information of the source file to the remote host (406). The remote host searches for a source file in the source file cache manager to check whether there is a source file having the same content, and if the file does not exist, requests the transfer of the corresponding file to the local host (407).

일반적인 컴파일러의 컴파일 과정은 순차적으로 진행된다. 하나의 소스파일을 컴파일하여 결과를 만들어내고 다음 소스 파일을 컴파일한다. 다수의 소스 파일을 컴파일할 때 하나의 소스 파일을 컴파일하는 동안 나머지 소스 파일은 컴파일을 위해 대기해야 하므로 전체 시간이 컴파일 작업의 크기에 비례하여 오래 걸린다. 본 발명에 따른 분산 컴파일 시스템을 이용하면 다수의 소스 파일을 동시에 컴파일하는 것이 가능하기 때문에 M 개의 호스트(M: 컴파일에 참여하는 총 호스트의 수, 로컬 호스트 포함)를 이용하면 컴파일 대기 시간이 1/M 으로 줄어든다. 분산 컴파일에 참여하는 호스트들은 성능이 다양할 것이므로 실제 성능은 1/M 이상 될 수 있다. 분산 컴파일에 참여하는 호스트가 늘어날수록, 또한 성능이 우수한 호스트가 참여할수록 전체 컴파일 시간은 그에 반비례하여 짧아진다.The compilation process of a typical compiler proceeds sequentially. Compile one source file to produce the result, then compile the next source file. When compiling a large number of source files, the rest of the source files have to wait for compilation while compiling one source file, so the total time takes a long proportional to the size of the compilation. Using the distributed compilation system according to the present invention, since it is possible to compile a plurality of source files at the same time, when using M hosts (M: the total number of hosts participating in the compilation, including the local host), the compilation latency is 1 /. Decreases to M Hosts participating in distributed compilation will vary in performance, so actual performance may be over 1 / M. As more hosts participate in distributed compilation and more powerful hosts participate, the overall compile time is inversely shorter.

상술한 바와 같은 본 발명의 방법은 프로그램으로 구현되어 컴퓨터로 읽을 수 있는 형태로 기록매체(씨디롬, 램, 롬, 플로피 디스크, 하드 디스크, 광자기 디스크 등)에 저장될 수 있다. 이러한 과정은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있으므로 더 이상 상세히 설명하지 않기로 한다.As described above, the method of the present invention may be implemented as a program and stored in a recording medium (CD-ROM, RAM, ROM, floppy disk, hard disk, magneto-optical disk, etc.) in a computer-readable form. Since this process can be easily implemented by those skilled in the art will not be described in more detail.

이상에서 설명한 본 발명은, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 있어 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하므로 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니다.The present invention described above is capable of various substitutions, modifications, and changes without departing from the technical spirit of the present invention for those skilled in the art to which the present invention pertains. It is not limited by the drawings.

상기와 같은 본 발명은, 대용량의 컴파일 작업을 다수의 호스트에 지능적으로 분배함으로써, 최대의 효율로 최단 시간 내에 컴파일 작업을 처리할 수 있는 효과가 있다. The present invention as described above, by intelligently distributing a large amount of compilation work to a plurality of hosts, there is an effect that can process the compilation work in the shortest time with maximum efficiency.

Claims (18)

P2P(Peer To Peer) 네트워크 지능형 분산 컴파일러 시스템으로서,Peer-to-peer network intelligent distributed compiler system, 다수의 호스트와 네트워크 연결되어 유휴 호스트의 접속 정보 리스트를 관리하기 위한 관리 서버;A management server for network connection with a plurality of hosts and for managing a list of connection information of idle hosts; 사용자의 분산 컴파일 작업 요청에 따라 컴파일 대상 파일들의 의존관계 맵을 생성하고 그에 따라 컴파일 작업 집합을 생성하며, 상기 유휴 호스트 접속 정보 리스트를 토대로 상기 컴파일 작업 집합을 할당하여 P2P 방식으로 전송하기 위한 로컬 호스트; 및A local host for generating a dependency map of files to be compiled according to a user's distributed compilation task request and generating a compilation task set accordingly, and allocating the compilation task set based on the idle host access information list and transmitting the P2P scheme. ; And 상기 로컬 호스트로부터 수신한 컴파일 작업 집합에 대해 컴파일을 수행하고 그에 따른 결과물을 상기 로컬 호스트로 전송하기 위한 적어도 하나 이상의 리모트 호스트At least one remote host for performing a compile on the compilation set received from the local host and transmitting the resulting result to the local host 를 포함하는 분산 컴파일러 시스템.Distributed compiler system comprising a. 제 1 항에 있어서,The method of claim 1, 상기 로컬 호스트는,The local host, 각 호스트에 할당된 CWSB(U).size가 서로 비슷하도록 각 호스트에 컴파일 작업 집합을 할당하는 것을 특징으로 하는 분산 컴파일러 시스템.A distributed compiler system that allocates a set of compilation operations to each host so that the CWSB (U) .size allocated to each host is similar. 여기서, CWSB(U)는 개별 호스트에 할당한 컴파일 작업 집합들에 대해 합집합 을 수행하여 획득한 파일 집합이고, CWSB(U).size는 CWSB(U)에 속한 파일들의 크기의 합이다.Here, CWSB (U) is a file set obtained by performing a union on compilation work sets allocated to individual hosts, and CWSB (U) .size is the sum of the sizes of files belonging to CWSB (U). 제 1 항에 있어서,The method of claim 1, 상기 로컬 호스트는,The local host, 컴파일 작업 집합에 포함된 파일들의 개수를 기준으로 컴파일 작업 집합을 호스트에 할당하는 것을 특징으로 하는 분산 컴파일러 시스템.A distributed compiler system for allocating a compilation working set to a host based on the number of files included in the compilation working set. 제 1 항에 있어서,The method of claim 1, 상기 로컬 호스트는,The local host, 컴파일 작업 집합에 포함된 파일들의 크기의 합을 기준으로 그 합이 큰 컴파일 작업 집합은 자신에게 분배하고, 나머지 컴파일 작업 집합은 컴파일 작업 집합에 포함된 파일들의 개수를 기준으로 리모트 호스트에 할당하는 것을 특징으로 하는 분산 컴파일러 시스템.Based on the sum of the sizes of the files included in the compilation set, the larger compilation set is distributed to itself, and the remaining compilation sets are allocated to the remote host based on the number of files in the compilation set. Featured distributed compiler system. 제 2 항 내지 제 4 항 중 어느 한 항에 있어서,The method according to any one of claims 2 to 4, 상기 로컬 호스트는,The local host, 각 리모트 호스트로 전송할 CWSB(U) 내의 각 파일에 대해 그 파일을 전송받아야 하는 리모트 호스트를 매핑시켜 호스트 리스트를 작성하고, 하나의 리모트 호스트에 각각의 파일과 각 파일에 대한 호스트 리스트를 함께 전송하는 것을 특징으로 하는 분산 컴파일러 시스템.For each file in CWSB (U) to be sent to each remote host, create a host list by mapping the remote host that should receive the file, and send each file and host list for each file to one remote host together. Distributed compiler system, characterized in that. 여기서, CWSB(U)는 개별 호스트에 할당한 컴파일 작업 집합들에 대해 합집합을 수행하여 획득한 파일 집합이다.Here, CWSB (U) is a file set obtained by performing a union on compilation work sets allocated to individual hosts. 제 5 항에 있어서,The method of claim 5, 상기 리모트 호스트는,The remote host, 상기 로컬 호스트로부터 소스 파일의 정보를 수신하고 그 정보를 이용하여 호스트 내의 소스 파일 캐쉬 관리자를 검색하되, 해당하는 소스 파일이 없으면 상기 로컬 호스트로 파일 전송을 요청하는 것을 특징으로 하는 분산 컴파일러 시스템.And receiving information of a source file from the local host and searching for a source file cache manager in the host using the information, but requesting a file transfer to the local host if there is no corresponding source file. 제 5 항에 있어서,The method of claim 5, 상기 관리 서버는,The management server, 상기 호스트로부터 오브젝트 캐쉬 키와 컴파일 결과 생성된 오브젝트 파일 및 컴파일러 출력 메시지를 수신하여 오브젝트 캐쉬 관리자에 저장하고,Receives the object cache key, the object file generated as a result of the compilation and the compiler output message from the host and stores them in the object cache manager 상기 로컬 호스트로부터 오브젝트 캐쉬 키 리스트를 수신시, 상기 오브젝트 캐쉬 관리자에서 해당하는 오브젝트 파일과 컴파일러 출력 메시지를 검색하여 상기 로컬 호스트에 전송하는 것을 특징으로 하는 분산 컴파일러 시스템.And, upon receiving the object cache key list from the local host, retrieve the corresponding object file and compiler output message from the object cache manager and transmit them to the local host. 제 7 항에 있어서,The method of claim 7, wherein 상기 호스트는,The host, 컴파일 명령 행 및 컴파일 작업 집합에 포함된 각 파일의 파일 이름, 파일 크기, 마지막 수정 시간에 대해 MD4 해쉬를 적용하여 오브젝트 캐쉬 키를 생성하는 것을 특징으로 하는 분산 컴파일러 시스템.A distributed compiler system that generates an object cache key by applying an MD4 hash to the file name, file size, and last modified time of each file included in the compilation command line and compilation set. 제 5 항에 있어서,The method of claim 5, 상기 리모트 호스트는,The remote host, 상기 로컬 호스트로부터 수신된 컴파일러 실행 관련 파일을 실행시, API 호출을 후킹하여 가상의 컴파일러 환경을 구축하는 것을 특징으로 하는 분산 컴파일러 시스템.And executing a compiler execution related file received from the local host, hooking API calls to build a virtual compiler environment. P2P 네트워크 지능형 분산 컴파일 방법으로서,P2P network intelligent distributed compilation method, 임의의 한 호스트(이하, '로컬 호스트'라 한다)가 사용자의 분산 컴파일 작업 요청에 따라 컴파일 대상 파일들의 의존관계 맵을 생성하고 그에 따라 컴파일 작업 집합을 생성하는 컴파일 작업 집합 분석단계;A compilation task set analyzing step in which any one host (hereinafter referred to as a 'local host') generates a dependency map of files to be compiled according to a user's request for distributed compilation tasks, and generates a compilation task set accordingly; 관리 서버로부터 이용 가능한 호스트(이하, '리모트 호스트'라 한다)의 접속 정보 리스트를 수신하고, 수신된 접속 정보 리스트를 바탕으로 리모트 호스트들과 P2P 네트워크 연결을 설정하는 네트워크 설정단계;A network setting step of receiving a connection information list of a host (hereinafter referred to as a "remote host") available from a management server and establishing a P2P network connection with remote hosts based on the received connection information list; 각 호스트에 상기 컴파일 작업 집합을 할당하는 컴파일 작업 집합 할당단계;A compilation task set assignment step of allocating the compilation task set to each host; 할당된 컴파일 작업 집합을 P2P 방식으로 리모트 호스트에 전송하는 P2P 전송단계; 및A P2P transmission step of transmitting the assigned compilation work set to the remote host in a P2P manner; And 리모트 호스트로부터 컴파일 결과를 수신하는 컴파일 결과 수신단계Receive compilation result step to receive compilation result from remote host 를 포함하는 분산 컴파일 방법.Distributed compilation method comprising a. 제 10 항에 있어서,The method of claim 10, 상기 컴파일 작업 집합 할당단계는,The compilation task set allocation step, 각 호스트에 할당된 CWSB(U).size가 서로 비슷하도록 각 호스트에 컴파일 작업 집합을 할당하는 것을 특징으로 하는 분산 컴파일 방법.Distributed compilation method, which allocates a set of compilation tasks to each host so that the CWSB (U) .size allocated to each host is similar to each other. 여기서, CWSB(U)는 개별 호스트에 할당된 컴파일 작업 집합들에 대해 합집합이 수행되어 획득된 파일 집합이고, CWSB(U).size는 CWSB(U)에 속한 파일들의 크기의 합이다.Here, CWSB (U) is a file set obtained by unioning the compilation working sets allocated to individual hosts, and CWSB (U) .size is the sum of the sizes of files belonging to CWSB (U). 제 10 항에 있어서,The method of claim 10, 상기 컴파일 작업 집합 할당단계는,The compilation task set allocation step, 컴파일 작업 집합에 포함된 파일들의 개수를 기준으로 컴파일 작업 집합을 호스트에 할당하는 것을 특징으로 하는 분산 컴파일 방법.A distributed compilation method comprising allocating a compilation working set to a host based on the number of files included in the compilation working set. 제 10 항에 있어서,The method of claim 10, 상기 컴파일 작업 집합 할당단계는,The compilation task set allocation step, 컴파일 작업 집합에 포함된 파일들의 크기의 합을 기준으로 그 합이 큰 컴파일 작업 집합은 로컬 호스트에 할당하고, 나머지 컴파일 작업 집합은 컴파일 작업 집합에 포함된 파일들의 개수를 기준으로 리모트 호스트에 할당하는 것을 특징으로 하는 분산 컴파일 방법.Based on the sum of the files included in the compilation set, the compilation set with the largest sum is allocated to the local host, and the remaining compilation set is allocated to the remote host based on the number of files in the compilation set. Distributed compilation method, characterized in that. 제 11 항 내지 제 13 항 중 어느 한 항에 있어서,The method according to any one of claims 11 to 13, 상기 P2P 전송단계는,The P2P transmission step, 각 리모트 호스트로 전송할 CWSB(U) 내의 각 파일에 대해 그 파일을 전송받아야 하는 호스트를 매핑시켜 호스트 리스트를 작성하고, 하나의 리모트 호스트에 각각의 파일과 각 파일에 대한 호스트 리스트를 함께 전송하는 것을 특징으로 하는 분산 컴파일 방법.For each file in the CWSB (U) to be sent to each remote host, create a host list by mapping the host that should receive the file, and send each file together with the host list for each file to one remote host. Featured distributed compilation method. 여기서, CWSB(U)는 개별 호스트에 할당된 컴파일 작업 집합들에 대해 합집합이 수행되어 획득된 파일 집합이다.Here, CWSB (U) is a file set obtained by unioning the compilation work sets allocated to individual hosts. 제 14 항에 있어서,The method of claim 14, 리모트 호스트가 상기 로컬 호스트로부터 소스 파일의 정보를 수신하고 그 정보를 이용하여 호스트 내의 소스 파일 캐쉬 관리자를 검색하되, 해당하는 소스 파일이 없으면 상기 로컬 호스트로 파일 전송을 요청하는 단계Receiving a source file information from the local host and searching for a source file cache manager in the host using the information, but requesting a file transfer to the local host if the source file does not exist. 를 더 포함하는 것을 특징으로 하는 분산 컴파일 방법.Distributed compilation method characterized in that it further comprises. 제 14 항에 있어서,The method of claim 14, 상기 관리 서버가 각 호스트로부터 오브젝트 캐쉬 키와 컴파일 결과 생성된 오브젝트 파일 및 컴파일러 출력 메시지를 수신하여 오브젝트 캐쉬 관라자에 저장하는 단계; 및Receiving, by the management server, an object cache key, an object file generated as a result of compilation, and a compiler output message from each host and storing the object cache key in an object cache manager; And 상기 관리 서버가 상기 로컬 호스트로부터 오브젝트 캐쉬 키 리스트를 수신하고, 그에 따라 상기 오브젝트 캐쉬 관리자에서 해당하는 오브젝트 파일과 컴파일러 출력 메시지를 검색하여 상기 로컬 호스트에 전송하는 단계Receiving, by the management server, an object cache key list from the local host, and retrieving a corresponding object file and a compiler output message from the object cache manager accordingly; 를 더 포함하는 것을 특징으로 하는 분산 컴파일 방법.Distributed compilation method characterized in that it further comprises. 제 14 항에 있어서,The method of claim 14, 상기 리모트 호스트가 API 호출을 후킹하여 가상의 컴파일러 환경을 구축하는 단계The remote host hooking an API call to build a virtual compiler environment 를 더 포함하는 것을 특징으로 하는 분산 컴파일 방법.Distributed compilation method characterized in that it further comprises. 사용자의 분산 컴파일 작업 요청에 따라 컴파일 대상 파일들의 의존관계 맵을 생성하고 그에 따라 컴파일 작업 집합을 생성하는 컴파일 작업 집합 분석기능;A compilation task set analysis function of generating a dependency map of compilation target files according to a user's distributed compilation task request and generating a compilation task set accordingly; 관리 서버로부터 이용 가능한 호스트의 접속 정보 리스트를 수신하고, 수신된 접속 정보 리스트를 바탕으로 리모트 호스트들과 P2P 네트워크 연결을 설정하는 네트워크 설정기능;A network setting function for receiving a connection information list of available hosts from a management server and establishing a P2P network connection with remote hosts based on the received connection information list; 각 호스트에 상기 컴파일 작업 집합을 할당하는 컴파일 작업 집합 할당기능;A compilation work set assignment function for allocating the compilation work set to each host; 할당된 컴파일 작업 집합을 P2P 방식으로 호스트에 전송하는 P2P 전송기능; 및A P2P transmission function for transmitting the allocated compilation work set to the host in a P2P manner; And 호스트로부터 컴파일 결과를 수신하는 컴파일 결과 수신기능Receive compilation result to receive compilation result from host 을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for realizing this.
KR1020050049535A 2005-05-23 2005-06-10 Hybrid Peer To Peer Network Intelligent Distributed Compiler System and Method thereof, and Computer Readable Recording Medium on which a Program therefor is recorded KR100738004B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020050049535A KR100738004B1 (en) 2005-05-23 2005-06-10 Hybrid Peer To Peer Network Intelligent Distributed Compiler System and Method thereof, and Computer Readable Recording Medium on which a Program therefor is recorded

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR20050043282 2005-05-23
KR1020050043282 2005-05-23
KR1020050049535A KR100738004B1 (en) 2005-05-23 2005-06-10 Hybrid Peer To Peer Network Intelligent Distributed Compiler System and Method thereof, and Computer Readable Recording Medium on which a Program therefor is recorded

Publications (2)

Publication Number Publication Date
KR20060121074A true KR20060121074A (en) 2006-11-28
KR100738004B1 KR100738004B1 (en) 2007-07-13

Family

ID=37707031

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020050049535A KR100738004B1 (en) 2005-05-23 2005-06-10 Hybrid Peer To Peer Network Intelligent Distributed Compiler System and Method thereof, and Computer Readable Recording Medium on which a Program therefor is recorded

Country Status (1)

Country Link
KR (1) KR100738004B1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8907103B2 (en) 2008-08-13 2014-12-09 Metabasis Therapeutics, Inc. Glucagon antagonists
KR101522881B1 (en) * 2008-06-12 2015-05-26 엘지전자 주식회사 System and method for distributed compiling
US9169201B2 (en) 2007-02-09 2015-10-27 Metabasis Therapeutics, Inc. Antagonists of the glucagon receptor
CN112114816A (en) * 2020-09-25 2020-12-22 统信软件技术有限公司 Distributed compiling system and method

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102163930B1 (en) 2019-09-30 2020-10-12 넷마블 주식회사 Distributed compile system implementing blockchain rewards
KR102193822B1 (en) 2020-09-24 2020-12-22 넷마블 주식회사 Distributed compile system implementing blockchain rewards
KR102253238B1 (en) 2020-12-09 2021-05-18 넷마블 주식회사 Method of verifying to distributed compiling
KR102227403B1 (en) 2020-12-09 2021-03-12 넷마블 주식회사 Distributed compile system implementing blockchain rewards

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07114603A (en) * 1993-10-20 1995-05-02 Hitachi Ltd Budget compilation system in parallel/decentralized environment
KR0162761B1 (en) * 1995-11-21 1999-01-15 양승택 Compilation management method of mobile switching software on network file system
JPH10333917A (en) 1997-05-28 1998-12-18 Nec Software Ltd Distributed compilation system
KR20050013661A (en) * 2005-01-17 2005-02-04 김준범 ARM compiler distributed processing system which uses a TCP/IP Socket communication

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9169201B2 (en) 2007-02-09 2015-10-27 Metabasis Therapeutics, Inc. Antagonists of the glucagon receptor
US9701626B2 (en) 2007-02-09 2017-07-11 Metabasis Therapeutics, Inc. Antagonists of the glucagon receptor
KR101522881B1 (en) * 2008-06-12 2015-05-26 엘지전자 주식회사 System and method for distributed compiling
US8907103B2 (en) 2008-08-13 2014-12-09 Metabasis Therapeutics, Inc. Glucagon antagonists
US9783494B2 (en) 2008-08-13 2017-10-10 Metabasis Therapeutics, Inc. Glucagon antagonists
CN112114816A (en) * 2020-09-25 2020-12-22 统信软件技术有限公司 Distributed compiling system and method
CN112114816B (en) * 2020-09-25 2024-05-31 统信软件技术有限公司 Distributed compiling system and method

Also Published As

Publication number Publication date
KR100738004B1 (en) 2007-07-13

Similar Documents

Publication Publication Date Title
KR100738004B1 (en) Hybrid Peer To Peer Network Intelligent Distributed Compiler System and Method thereof, and Computer Readable Recording Medium on which a Program therefor is recorded
CN108510082B (en) Method and device for processing machine learning model
US11494386B2 (en) Distributed metadata-based cluster computing
US11893029B2 (en) Real-time streaming data ingestion into database tables
US11681583B2 (en) Cluster diagnostics data for distributed job execution
US11809428B2 (en) Scalable query processing
CN113767377A (en) Dynamic hash function combination for change detection in distributed storage systems
US20210034418A1 (en) Peer-to-peer distributed computing system for heterogeneous device types
US7210124B2 (en) Reformulating resources with nodes reachable from defined entry points
KR20190119487A (en) Node management system for small data machine learning
US11461325B2 (en) Checkpoints in batch file processing
US20040268213A1 (en) Classifying software and reformulating resources according to classifications
US20090063614A1 (en) Efficiently Distributing Class Files Over A Network Without Global File System Support
Kamali et al. Dynamic data allocation with replication in distributed systems
KR20110116772A (en) System for source code version management in distributed build system and method for transmitting referential file
US11593345B1 (en) Accelerating change data capture determination using row bitsets
Kindberg et al. Adaptive parallelism under Equus
US11797497B2 (en) Bundle creation and distribution
Fu et al. Hyperion: A Generic and Distributed Mobile Offloading Framework on OpenCL
US11403259B1 (en) Catalog query framework on distributed key value store
US20240168950A1 (en) Dynamic changes to compilation based on query properties
EP0436561A1 (en) Data processing network
JP2004348592A (en) Provisioning system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
G170 Publication of correction
FPAY Annual fee payment

Payment date: 20120105

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee