KR102097296B1 - Adaptive back pressure method for real-time stream processing and apparatus thereof - Google Patents

Adaptive back pressure method for real-time stream processing and apparatus thereof Download PDF

Info

Publication number
KR102097296B1
KR102097296B1 KR1020170087324A KR20170087324A KR102097296B1 KR 102097296 B1 KR102097296 B1 KR 102097296B1 KR 1020170087324 A KR1020170087324 A KR 1020170087324A KR 20170087324 A KR20170087324 A KR 20170087324A KR 102097296 B1 KR102097296 B1 KR 102097296B1
Authority
KR
South Korea
Prior art keywords
back pressure
target
stream
merge
real
Prior art date
Application number
KR1020170087324A
Other languages
Korean (ko)
Other versions
KR20180028003A (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 한국전자통신연구원
Publication of KR20180028003A publication Critical patent/KR20180028003A/en
Application granted granted Critical
Publication of KR102097296B1 publication Critical patent/KR102097296B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/762Media network packet handling at the source 
    • H04L65/601
    • H04L67/16
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

실시간 스트림 처리 시스템은 어느 하나의 대상 연산에서 데이터 스트림의 속도가 상기 대상 연산의 처리율을 초과하면, 상기 대상 연산의 선행 연산이 직렬 연산인지 병렬 연산인지 확인하고, 상기 선행 연산이 직렬 연산이면 상기 대상 연산을 복제한 후 상기 선행 연산에 역압 요청을 전송하고, 상기 선행 연산이 병렬 연산이면, 상기 선행 연산이 분할인지 병합인지 확인하며, 상기 선행 연산이 분할이면, 병합 연산을 추가한 후 상기 선행 연산에 역압 요청을 전송하며, 상기 선행 연산이 병합이면, 상기 대상 연산을 복제하고, 병합 연산을 추가한 후 상기 선행 연산에 역압 요청을 전송한다. The real-time stream processing system checks whether the preceding operation of the target operation is a serial operation or a parallel operation when the speed of the data stream in one of the target operations exceeds the processing rate of the target operation, and the target operation if the preceding operation is a serial operation. After replicating the operation, a back pressure request is sent to the preceding operation, and if the preceding operation is a parallel operation, checks whether the preceding operation is a split or a merge, and if the preceding operation is a split, adds a merge operation and then adds the preceding operation Sends a back pressure request to, and if the preceding operation is a merge, duplicates the target operation, adds a merge operation, and then sends a back pressure request to the preceding operation.

Description

실시간 스트림 처리를 위한 적응형 역압 방법 및 그 장치{ADAPTIVE BACK PRESSURE METHOD FOR REAL-TIME STREAM PROCESSING AND APPARATUS THEREOF}ADAPTIVE BACK PRESSURE METHOD FOR REAL-TIME STREAM PROCESSING AND APPARATUS THEREOF}

본 발명은 실시간 스트림 처리를 위한 적응형 역압 방법 및 그 장치에 관한 것이다. The present invention relates to an adaptive back pressure method and apparatus for real-time stream processing.

스마트폰이 널리 퍼지고 IoT(Internet of Things) 환경이 빠르게 확대됨에 따라, 데이터 처리도 빠른 속도를 요구하게 되어, 실시간 처리(Real-time processing) 또는 스트림 처리(Stream processing) 기술이 주목 받고 있다. As the spread of smartphones and the rapid expansion of the Internet of Things (IoT) environment, data processing also requires a high speed, and real-time processing or stream processing technology is drawing attention.

하지만 실시간 스트림 처리는 범위가 한정되지 않고(unbounded), 끊임없이 흘러가는(stream) 데이터 대한 처리 방식이어서, 제때(Just-in-time) 처리를 할 수 없는 상황이 발생하게 된다. However, real-time stream processing is unbounded, and is a processing method for continuously flowing data, so that a situation in which just-in-time processing cannot be performed occurs.

즉, 일정한 비율로 끊임없이 흘러 들어오는 소스 스트림(Source Stream)에서 특정한 작업을 수행하고, 다시 이후의 작업을 수행하는 일감의 연속(Job Sequence) 선 상에서, 특정 작업을 수행하는 소요 시간이 점점 길어질수록 점점 처리해야 할 데이터는 쌓여만 가는 현상이 발생하게 된다. 이는 처리를 수행하는 물리적인 컴퓨팅의 한계나 폭증 스트림이 원인이 된다.In other words, on a continuous stream of work that performs a specific task in a source stream that constantly flows at a constant rate, and then performs a subsequent task, the longer it takes to perform a specific task, the longer it takes. The data to be processed is accumulated only. This is due to the limitation of physical computing that performs processing or the explosive stream.

이러한 문제를 해결하기 위한 기본적인 방법이 역압(Back Pressure) 방법이다. 역압 방법은 선행 작업에게 특정 비율로 데이터를 전송해 달라고 요청하는 방식으로 앞의 작업자에게 반대로 압력을 가한다는 의미에서 역압이라고 일컫는다. 이러한 역압 방법은 결국 최초의 입력 소스 스트림(Input Source Stream)에게 전달되어 데이터를 입력하는 비율로 줄여서 전체적으로 시스템의 처리 속도를 조절하는데 사용된다. The basic method for solving this problem is the back pressure method. The back pressure method is called back pressure in the sense that pressure is applied to the preceding worker in a manner that requests a predecessor to transmit data at a specific rate. This back pressure method is used to control the processing speed of the system as a whole by reducing the ratio of data input to the first input source stream.

하지만, 단순한 역압 방법으로는 시스템에 네트워크 부하를 줄이는 방법만을 제안하고 있으며, 다중 입출력을 다루는 여러 형태의 일감의 연속에서는 단순하게 적용 가능하지 않다. However, as a simple back pressure method, only a method for reducing the network load in the system is proposed, and it is not simply applicable in a series of various types of work dealing with multiple inputs and outputs.

본 발명이 해결하려는 과제는 실시간 스트림 처리 시스템에서 연산들의 처리율을 향상시킬 수 있는 실시간 스트림 처리를 위한 적응형 역압 방법 및 그 장치를 제공하는 것이다. The problem to be solved by the present invention is to provide an adaptive back pressure method and apparatus for real-time stream processing capable of improving the throughput of operations in a real-time stream processing system.

본 발명의 한 실시 예에 따르면, 실시간 스트림 처리 시스템에서 선행 연산에게 역압을 요청하는 방법이 제공된다. 역압 요청 방법은 어느 하나의 대상 연산에서 데이터 스트림의 속도가 상기 대상 연산의 처리율을 초과하면, 상기 대상 연산의 선행 연산이 직렬 연산인지 병렬 연산인지 확인하는 단계, 상기 선행 연산이 직렬 연산이면 상기 대상 연산을 복제한 후 상기 선행 연산에 역압 요청을 전송하는 단계, 상기 선행 연산이 병렬 연산이면, 상기 선행 연산이 분할인지 병합인지 확인하는 단계, 상기 선행 연산이 분할이면, 병합 연산을 추가한 후 상기 선행 연산에 역압 요청을 전송하는 단계, 그리고 상기 선행 연산이 병합이면, 상기 대상 연산을 복제하고, 병합 연산을 추가한 후 상기 선행 연산에 역압 요청을 전송하는 단계를 포함한다. According to an embodiment of the present invention, a method for requesting back pressure from a preceding operation in a real-time stream processing system is provided. The back pressure request method comprises: if the speed of the data stream in any one target operation exceeds the throughput of the target operation, checking whether the preceding operation of the target operation is a serial operation or a parallel operation, and if the preceding operation is a serial operation, the target Sending a back pressure request to the preceding operation after duplicating the operation; if the preceding operation is a parallel operation, checking whether the preceding operation is a division or a merge; if the preceding operation is a division, after adding a merge operation, And sending a back pressure request to a preceding operation, and if the preceding operation is a merge, duplicate the target operation, add a merge operation, and then send a back pressure request to the preceding operation.

본 발명의 실시 예에 의하면, IoT 장치와 같이 다양한 형태의 데이터가 입력되는 실시간 스트림 처리 시스템에서 발생하는 스트림 병목 현상을 해결할 수 있다. 특히, 연산 복제, 스트림 분할, 스트림 병합을 수행함으로써, 단위 연산의 처리율을 높일 수 있으며, 이를 통해 선행 연산에게 단순히 역압 요청을 수행하기 보다는 연산의 처리율을 고려하여 유연한 방향성 비사이클 그래프 확장을 통해 전체 시스템의 처리율을 높일 수 있다. According to an embodiment of the present invention, a stream bottleneck occurring in a real-time stream processing system in which various types of data are input, such as an IoT device, can be solved. Particularly, by performing computational replication, stream division, and stream merging, the throughput of unit operations can be increased, and through this, flexible directional acyclic graph expansion is performed by considering the throughput of operations rather than simply performing back pressure requests to the preceding operations. The throughput of the system can be increased.

도 1은 본 발명의 실시 예에 따른 실시간 스트림 처리 시스템의 스트림 처리를 개략적으로 나타낸 도면이다.
도 2 내지 도 4는 각각 도 1에 도시된 연산 처리부의 일 예를 나타낸 도면이다.
도 5는 일반적인 역압 기법의 일 예를 나타낸 도면이다.
도 6 및 도 7은 각각 일반적인 역압 기법의 문제점을 나타낸 도면이다.
도 8은 본 발명의 한 실시 예에 따른 직렬형 연산 시 적응형 역압 방법을 나타낸 도면이다.
도 9는 본 발명의 한 실시 예에 따른 병렬형 연산 시 적응형 역압 방법을 나타낸 도면이다.
도 10은 본 발명의 다른 실시 예에 따른 병렬형 연산 시 적응형 역압 방법을 나타낸 도면이다.
도 11은 본 발명의 실시 예에 따른 적응형 역압 방법을 통해 확장해 가는 DAG의 일 예를 나타낸 도면이다.
도 12는 본 발명의 실시 예에 따른 역압 방법을 나타낸 순서도이다.
도 13은 본 발명의 실시 예에 따른 역압 장치를 나타낸 도면이다.
1 is a view schematically showing stream processing of a real-time stream processing system according to an embodiment of the present invention.
2 to 4 are views each showing an example of the operation processing unit shown in FIG. 1.
5 is a view showing an example of a general back pressure technique.
6 and 7 are diagrams showing problems of a general back pressure technique, respectively.
8 is a diagram illustrating an adaptive back pressure method for serial operation according to an embodiment of the present invention.
9 is a view showing an adaptive back pressure method in parallel operation according to an embodiment of the present invention.
10 is a diagram illustrating an adaptive back pressure method in parallel operation according to another embodiment of the present invention.
11 is a diagram illustrating an example of a DAG extending through an adaptive back pressure method according to an embodiment of the present invention.
12 is a flow chart showing a back pressure method according to an embodiment of the present invention.
13 is a view showing a back pressure device according to an embodiment of the present invention.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시 예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시 예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art to which the present invention pertains may easily practice. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. In addition, in order to clearly describe the present invention in the drawings, parts irrelevant to the description are omitted, and like reference numerals are assigned to similar parts throughout the specification.

명세서 및 청구범위 전체에서, 어떤 부분이 어떤 구성 요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것을 의미한다. Throughout the specification and claims, when a part “includes” a certain component, this means that other components may be further included rather than excluding other components unless specifically stated to the contrary.

이제 본 발명의 실시 예에 따른 실시간 스트림 처리를 위한 적응형 역압 방법 및 그 장치에 대하여 도면을 참고로 하여 상세하게 설명한다. Now, an adaptive back pressure method and an apparatus for real-time stream processing according to an embodiment of the present invention will be described in detail with reference to the drawings.

도 1은 본 발명의 실시 예에 따른 실시간 스트림 처리 시스템의 스트림 처리를 개략적으로 나타낸 도면이다. 1 is a view schematically showing stream processing of a real-time stream processing system according to an embodiment of the present invention.

도 1을 참고하면, 실시간 스트림 처리 시스템은 입력부(110), 연산 처리부(120) 및 출력부(130)를 포함한다. Referring to FIG. 1, the real-time stream processing system includes an input unit 110, a calculation processing unit 120, and an output unit 130.

입력부(110)를 통해 데이터 스트림이 입력되고, 연산 처리부(120)는 입력된 데이터 스트림에 대해 필요한 연산 처리를 수행한 후, 출력부(130)를 통해 연산 처리된 데이터 스트림을 출력한다. The data stream is input through the input unit 110, and the calculation processing unit 120 performs necessary calculation processing on the input data stream, and then outputs the data stream processed through the output unit 130.

도 2 내지 도 4는 각각 도 1에 도시된 연산 처리부의 일 예를 나타낸 도면이다. 2 to 4 are views each showing an example of the operation processing unit shown in FIG. 1.

도 2 내지 도 5를 참고하면, 연산 처리부(120)는 복수의 연산을 포함한다. 각각의 연산은 선행 연산과 후행 연산을 가질 수 있다. 단, 시간적으로 첫 번째 연산은 선행 연산이 없을 수 있고, 시간적으로 마지막 연산은 후행 연산이 없을 수 있다. 복수의 연산들은 직렬형, 병렬형 또는 직렬과 병렬의 혼합형으로 구성될 수 있다. 2 to 5, the calculation processing unit 120 includes a plurality of calculations. Each operation can have a preceding operation and a subsequent operation. However, the first operation in time may not have a preceding operation, and the last operation in time may not have a subsequent operation. The plurality of operations may be composed of a serial type, a parallel type, or a mixed type of serial and parallel.

직렬령 연산은 연산들이 직렬로 연결되어 있는 구조를 나타낸다. 도 2에 도시한 바와 같이, 연산 1, 연산 2 및 연산 3은 직렬로 연결되어 있다. 이 경우, 연산 2의 선행 연산은 연산 1이 되고, 연산 2의 후행 연산은 연산 3이 된다. The serial command operation represents a structure in which operations are connected in series. As shown in Fig. 2, operations 1, 2 and 3 are connected in series. In this case, the preceding operation of operation 2 is operation 1, and the subsequent operation of operation 2 is operation 3.

병렬형 연산은 연산들이 병렬로 연결되어 있는 구조를 나타낸다. 도 3에 도시한 바와 같이, 연산 1은 연산 2 및 연산 3과 연결되고, 연산 2 및 연산 3은 연산 4와 연결된다. 이 경우, 연산 1은 연산 2 및 연산 3의 선행 연산이 되고, 연산 4는 연산 2 및 연산 3의 후행 연산이 된다. 연산 4는 연산 2 및 연산 3을 선행 연산으로 가진다. Parallel operation represents a structure in which operations are connected in parallel. As shown in FIG. 3, operation 1 is connected to operation 2 and operation 3, and operation 2 and operation 3 are connected to operation 4. In this case, operation 1 becomes the pre-operation of operation 2 and operation 3, and operation 4 becomes the subsequent operation of operation 2 and operation 3. Operation 4 has operation 2 and operation 3 as preceding operations.

혼합형 연산은 연산들이 직렬로도 연결되어 있고, 병렬로도 연결되어 있는 구조를 나타낸다. 도 4에 도시한 바와 같이, 연산 1은 연산 2 및 연산 3과 연결되고, 연산 2는 연산 4와 연결되며, 연산 3 및 연산 4가 연산 5와 연결된다. 연산 2와 연산 4는 직렬로 연결되고, 연산 1은 연산 2와 연산 3과 병렬로 연결된다. The mixed-type operation represents a structure in which operations are connected in series and in parallel. As shown in FIG. 4, operation 1 is connected to operation 2 and operation 3, operation 2 is connected to operation 4, and operation 3 and operation 4 are connected to operation 5. Operation 2 and operation 4 are connected in series, and operation 1 is connected to operation 2 and operation 3 in parallel.

도 5는 일반적인 역압 기법의 일 예를 나타낸 도면이다. 5 is a view showing an example of a general back pressure technique.

연산 1이 연산 2의 선행 연산일 때, 연산 1은 이전 선행 연산에서 데이터 스트림을 입력 받아 정해진 연산을 수행한 후, 연산 2로 출력한다. 이때 연산 1과 연산 2에는 각각의 버퍼가 존재하고, 각각의 연산을 수행하는 시간이 존재하므로, 데이터 스트림의 흐름상으로 연산이 많은 시간을 소모하게 되면, 오버플로우(Overflow)가 발생하게 된다. When operation 1 is a preceding operation of operation 2, operation 1 receives a data stream from a previous operation, performs a predetermined operation, and outputs it as operation 2. At this time, since each buffer exists in operation 1 and operation 2, and there is a time for performing each operation, when a lot of operation is consumed in the flow of the data stream, overflow occurs.

즉, 데이터 스트림의 비율이 연산의 처리율보다 크지 않으면, 연산 1과 연산 2는 정상적으로 동작할 수 있다. 그러나, 도 5에 도시한 바와 같이, 연산 2의 데이터 스트림의 비율보다 연산 2의 처리율이 느리다면, 연산 2의 버퍼에는 데이터 스트림이 쌓이게 되고, 연산 2는 연산 1에게 역압 요청을 전송한다. That is, if the ratio of the data stream is not greater than the throughput of the operation, operations 1 and 2 can operate normally. However, as shown in FIG. 5, if the throughput of operation 2 is slower than the ratio of the data stream of operation 2, the data stream is accumulated in the buffer of operation 2, and operation 2 sends a back pressure request to operation 1.

예를 들어, 연산 2의 처리율이 초당 6개의 데이터를 처리할 수 있다고 가정하면, 연산 1에게 6 ops/Sec로 역압 요청을 전송한다. 연산 1은 연산 2로부터 역압 요청을 수신하면, 초당 6개의 데이터를 출력한다. For example, assuming that the throughput of operation 2 can process 6 data per second, a back pressure request is sent to operation 1 at 6 ops / Sec. Operation 1 outputs 6 data per second when a back pressure request is received from operation 2.

이를 통해 최초의 연산까지 데이터 스트림의 비율이 조절되고, 결국 전체 시스템의 데이터 스트림의 비율이 조절된다. 이때 연산 2의 처리율이 너무 낮으면, 선행 연산에게 영향을 미쳐서 시스템의 전체적인 처리율이 현저히 낮아진다. 한 예로, 연산 1, 연산 2, 연산 3 및 연산 4와 같은 직렬형 연산이 있을 경우, 연산 1은 초당 10개, 연산 2는 초당 7개, 연산 3은 초당 5개의 데이터 처리가 가능한데, 연산 4가 초당 1개의 데이터만 처리 가능하면, 결국, 연산 1, 연산 2, 연산 3 및 연산 4는 모두 초당 1개의 데이터를 처리하여 출력하는 구조가 되므로, 전체 시스템의 성능이 현저히 저하된다. 결론적으로 일반적인 역압 기법으로는 시스템에서 수행하는 연산들의 처리 비율을 조절하기가 어려워진다. Through this, the ratio of the data stream is adjusted until the first operation, and eventually the ratio of the data stream of the entire system is adjusted. At this time, if the throughput of operation 2 is too low, it affects the preceding operation, and the overall throughput of the system is significantly lowered. For example, if there are serial operations such as operation 1, operation 2, operation 3, and operation 4, operation 1 can process 10 data per second, operation 2 is 7 per second, operation 3 can process 5 data per second, operation 4 If only one data per second can be processed, in the end, operation 1, operation 2, operation 3 and operation 4 all have a structure that processes and outputs 1 data per second, and thus the performance of the entire system is significantly reduced. In conclusion, it is difficult to control the processing rate of operations performed by the system using the normal back pressure technique.

도 6 및 도 7은 각각 일반적인 역압 기법의 문제점을 나타낸 도면이다. 6 and 7 are diagrams showing problems of a general back pressure technique, respectively.

도 6을 참고하면, 연산 1이 연산 2 및 연산 3과 병렬로 연결되어 있고, 연산 2와 연산 3의 데이터 스트림의 비율이 초과하는 경우, 연산 2와 연산 3의 연산 처리율이 다를 수 있다. 이에 따라서, 연산 2가 연산 1에게 6 ops/Sec로 역압 요청을 전송하고, 연산 3이 연산 1에게 4 ops/Sec로 역압 요청을 전송하면, 연산 1에서는 서로 다른 비율로 역압 요청을 수신하게 된다. 이 경우, 연산 1은 적절한 스트림 비율을 해결하기 어려워진다.Referring to FIG. 6, when operation 1 is connected in parallel to operation 2 and operation 3, and the ratio of data streams of operation 2 and operation 3 exceeds, the operation throughput of operation 2 and operation 3 may be different. Accordingly, when operation 2 sends a back pressure request to operation 1 at 6 ops / Sec, and operation 3 sends a back pressure request to operation 1 at 4 ops / Sec, operation 1 receives back pressure requests at different rates. . In this case, operation 1 becomes difficult to solve the proper stream ratio.

또한 도 7을 참고하면, 연산 1 및 연산 2가 연산 3과 연결되어 있고, 연산 3의 데이터 스트림의 비율이 초과하는 경우, 연산 3에서는 스트림 비율을 조절하기 위해 10 ops/Sec로 역압 요청을 해야 하는데, 어떠한 비율로 연산 1 및 연산 2에게 역압 요청을 해야 하는지에 대한 해결이 어려워진다.Also, referring to FIG. 7, when operation 1 and operation 2 are connected to operation 3, and the ratio of the data stream of operation 3 is exceeded, operation 3 requires back pressure request at 10 ops / Sec to adjust the stream ratio. However, it is difficult to solve the ratio 1 and 2 to request back pressure.

이러한 문제를 해결하기 위해 본 발명의 실시 예에서는 동적 방향성 비사이클 그래프(directed acyclic graph, DAG)를 이용한다. 본 발명의 실시 예에서는 DAG를 동적으로 변형하여 연산을 처리하는 주체를 생성하여 데이터 스트림을 분할, 병합하는 절차를 통해 데이터 스트림의 흐름에 맞는 비율로 실시간 스트림을 처리한다. In order to solve this problem, an embodiment of the present invention uses a dynamic directional acyclic graph (DAG). In an embodiment of the present invention, a DAG is dynamically transformed to generate a subject processing an operation, and a data stream is divided and merged to process a real-time stream at a rate suitable for the flow of the data stream.

도 8은 본 발명의 한 실시 예에 따른 직렬형 연산 시 적응형 역압 방법을 나타낸 도면이다. 8 is a diagram illustrating an adaptive back pressure method for serial operation according to an embodiment of the present invention.

도 8을 참고하면, 연산 1과 연산 2가 직렬로 연결되어 있고, 연산 2의 데이터 스트림의 비율이 초과하는 경우, 연산 1은 연산 2에 역압 요청을 한다. 도 5와 같은 기존의 방식은 연산 1이 연산 2에게 단순히 역압 요청을 전송하고, 연산 1이 스트림 비율을 조절하여 출력하는 형태이다. 이에 반해, 본 발명의 실시 예에 따른 연산 처리부(120)는 스트림 분할을 위해 연산 2를 복제하여 연산 2'를 생성하고, 연산 2와 연산 2'가 연산 1에 역압 요청을 하게 된다. 연산 1은 연산 2와 연산 2'로 나누어서 데이터를 출력하게 된다. 가령, 각각의 연산을 수행하는 프로세스가 존재하면, 이를 복제하여, 서로 다른 프로세스로 나누어 수행하여, 시스템 자원을 충분히 활용하는 구조가 된다. 이와 같이, 도 8은 스트림 분할과 연산 복제의 일 예이다.Referring to FIG. 8, when operation 1 and operation 2 are connected in series, and the ratio of the data stream of operation 2 exceeds, operation 1 requests back pressure to operation 2. In the conventional method as shown in FIG. 5, operation 1 simply transmits a back pressure request to operation 2, and operation 1 outputs by adjusting the stream ratio. On the other hand, the operation processing unit 120 according to an embodiment of the present invention duplicates operation 2 to generate operation 2 'to divide the stream, and operation 2 and operation 2' request back pressure to operation 1. Operation 1 is divided into operation 2 and operation 2 'to output data. For example, if a process for performing each operation exists, it is duplicated, divided into different processes, and executed to make full use of system resources. As such, FIG. 8 is an example of stream division and computational replication.

도 9는 본 발명의 한 실시 예에 따른 병렬형 연산 시 적응형 역압 방법을 나타낸 도면이다. 9 is a view showing an adaptive back pressure method in parallel operation according to an embodiment of the present invention.

도 9를 참고하면, 연산 1이 연산 2 및 연산 3과 병렬로 연결되어 있고 연산 2 및 연산 3의 데이터 스트림의 비율이 초과하는 경우, 앞에서 언급한 바와 같이 연산 2와 연산 3이 각각 역압 요청들을 연산 1로 전송하면, 연산 1은 어떠한 연산에 어떤 비율로 역압 요청을 해야 하는지에 대한 문제가 발생한다. 본 발명의 실시 예에 따른 연산 처리부(120)는 연산 1의 후행 연산들인 연산 2와 연산 3에서 역압 요청들이 연산 1로 전송되는 구조에서는 연산 2와 연산 3을 각각 연산 2와 연산 3을 서로 병합하여, 연산2,3을 수행하는 단위로 생성하고, 각 단위가 동일한 비율로 연산 1에 역압 요청을 전송하도록 한다. 예를 들면, 기존 방식의 경우 도 6에 도시한 바와 같이 연산 2가 연산 1에게 6 ops/Sec로 역압 요청을 전송하고, 연산 3이 연산 1에게 4 ops/Sec로 역압 요청을 전송하지만, 본 발명의 실시 예에 따르면, 연산2,3이 병합된 연산이 각각 동일한 비율인 5 ops/Sec로 역압 요청을 하게 된다. 그러면, 연산 1은 연산2,3이 병합된 연산으로 각각 5 ops/Sec로 나누어서 데이터를 출력한다. 이와 같이, 도 9는 연산 병합과 스트림 분할의 일 예이다. Referring to FIG. 9, when operation 1 is connected in parallel to operation 2 and operation 3 and the ratio of the data streams of operation 2 and operation 3 exceeds, as mentioned above, operation 2 and operation 3 respectively generate back pressure requests. When transferred to operation 1, operation 1 has a problem as to which operation should request back pressure at what rate. The operation processing unit 120 according to an embodiment of the present invention merges operation 2 and operation 3 with operation 2 and operation 3, respectively, in a structure in which back pressure requests are transferred to operation 1 in operations 2 and 3, which are subsequent operations of operation 1 Thus, it is generated in units performing calculations 2 and 3, and each unit transmits a back pressure request to calculation 1 at the same rate. For example, in the case of the conventional method, as shown in FIG. 6, operation 2 sends a back pressure request to operation 1 at 6 ops / Sec, and operation 3 sends a back pressure request to operation 1 at 4 ops / Sec. According to an embodiment of the present invention, the operations in which operations 2 and 3 are merged request back pressure at the same ratio of 5 ops / Sec, respectively. Then, operation 1 is a combination of operations 2 and 3, and is divided into 5 ops / Sec, respectively, to output data. As such, FIG. 9 is an example of operation merging and stream division.

도 10은 본 발명의 다른 실시 예에 따른 병렬형 연산 시 적응형 역압 방법을 나타낸 도면이다. 10 is a diagram illustrating an adaptive back pressure method in parallel operation according to another embodiment of the present invention.

도 10을 참고하면, 연산 1 및 연산 2가 연산 3과 연결되어 있고, 연산 3의 데이터 스트림의 비율이 초과하는 경우, 연산 3에서는 역압 요청을 할 때, 연산 1 및 연산 2 중에서 어떤 연산에 어떤 비율로 역압 요청을 해야 하는지에 대한 문제가 발생한다. 이에 본 발명의 실시 예에 따른 연산 처리부(120)는 연산 3을 복제하여 연산 3'를 생성하고, 연산 3과 연산 3'를 병합하여 연산 3"를 생성한다. 이때 연산 3이 연산 1로 연산 3의 처리율만큼 역압 요청을 하고, 연산 3'가 연산 2로 연산 3'의 처리율만큼 역압 요청을 한다. 예를 들면, 연산 3은 연산 1로 5 ops/Sec로 역압 요청을 하고, 연산 3'가 연산 2로 10 ops/Sec로 역압 요청을 한다.Referring to FIG. 10, when operation 1 and operation 2 are connected to operation 3, and the ratio of the data stream of operation 3 exceeds, when operation 3 requests back pressure, in operation 1 and operation 2 The question arises as to whether to request a back pressure at a rate. Accordingly, the operation processing unit 120 according to an embodiment of the present invention duplicates operation 3 to generate operation 3 'and merges operation 3 and operation 3' to generate operation 3 ". At this time, operation 3 computes operation 1 The back pressure request is processed by the throughput of 3, and the operation 3 'requests the back pressure by the operation 2' by the operation 2. For example, the operation 3 requests the back pressure at operation 5 ops / Sec, and the operation 3 ' A request for back pressure is 10 ops / Sec with 2 calculations.

이를 통해 일반적인 병합 연산에서의 오버헤드를 줄일 수 있다. 도 10은 대표적인 연산 복제와 스트림 병합의 일 예이다. This can reduce the overhead in general merge operations. 10 is an example of representative computational replication and stream merging.

도 11은 본 발명의 실시 예에 따른 적응형 역압 방법을 통해 확장해 가는 DAG의 일 예를 나타낸 도면이다. 11 is a diagram illustrating an example of a DAG extending through an adaptive back pressure method according to an embodiment of the present invention.

도 11을 참고하면, 초기 그래프 1)에서 연산 1, 연산 2, 연산 3이 직렬로 연결되어 있는 직렬형 연산이 존재한다고 가정한다. 이때 연산 2에 병목현상(bottleneck)이 발생하게 되면, 연산 처리부(120)는 그래프 2)와 같이 연산 2를 복제하여 연산 2'를 생성하고, 연산 2 및 연산 2'에서는 연산 3으로 데이터를 전달한다. 이후, 연산 3에서 병목현상이 발생하게 되면, 연산 처리부(120)는 그래프 3)과 같이 연산 3을 복제하여 연산 3'를 생성하고, 후행 연산으로 새롭게 병합 연산인 연산 3"를 생성한다. 그러면 연산 2는 연산 3으로 데이터를 전달하고, 연산 2'는 연산 3'로 데이터를 전달한다. 그리고 연산 3과 연산 3'는 연산 3"로 데이터를 전달한다. 이후, 연산 2'에 병목 현상이 나타나면, 연산 처리부(120)는 그래프 4)와 같이 연산 3'의 선행 연산인 연산 2'를 복제하여 연산 2"를 생성하고, 연산 2'와 연산 2"에서는 연산 3'로 데이터를 전달한다. 이때 연산 3'에서 병목현상이 발생하게 되면, 연산 처리부(120)는 그래프 5)와 같이 연산 3'을 복제하여 연산 3a를 생성하고, 후행 연산으로 연산 3'와 연산 3a를 병합한 연산 3b를 생성하여 그래프에 추가한다. 이렇게 연산의 병목현상으로 발생하는 스트림 처리 시스템의 성능 저하를 동적으로 그래프를 유지하여, 다양하게 대처하게 된다. 이는 초기 그래프 1)과 그래프 5)는 동일한 연산을 수행하는 연산들이지만, 시스템의 연산 처리율에 따라 동적으로 연산 복제, 스트림 분할 및 스트림 병합을 통해 실시간으로 데이터 스트림을 처리할 수 있게 된다. Referring to FIG. 11, it is assumed that there is a serial operation in which the operations 1, 2, and 3 are connected in series in the initial graph 1). At this time, if a bottleneck occurs in operation 2, the operation processing unit 120 duplicates operation 2 as shown in graph 2) to generate operation 2 ', and in operation 2 and operation 2', data is transferred to operation 3 do. Then, when a bottleneck occurs in operation 3, the operation processing unit 120 duplicates operation 3 as shown in graph 3) to generate operation 3 ', and generates a new merge operation, operation 3 ", as a subsequent operation. Then Operation 2 transfers data to operation 3, operation 2 'transfers data to operation 3', and operation 3 and operation 3 'transfers data to operation 3 ". Thereafter, when a bottleneck occurs in operation 2 ', the operation processing unit 120 duplicates operation 2', which is the preceding operation of operation 3 ', as shown in graph 4) to generate operation 2 ", and in operation 2' and operation 2", Data is transferred to operation 3 '. At this time, if a bottleneck occurs in operation 3 ', the operation processing unit 120 duplicates operation 3' as shown in graph 5) to generate operation 3a, and performs operation 3b in which operation 3 'and operation 3a are merged as a subsequent operation. Create and add it to the graph. In this way, the performance degradation of the stream processing system caused by the bottleneck of the operation is dynamically maintained and the graph is coped with variously. Although the initial graphs 1) and 5) are operations that perform the same operation, data streams can be processed in real time through computational replication, stream division, and stream merging dynamically according to the computational throughput of the system.

도 12는 본 발명의 실시 예에 따른 역압 방법을 나타낸 순서도이다.12 is a flow chart showing a back pressure method according to an embodiment of the present invention.

기존의 역압 방법은 정해진 주기마다 데이터 스트림의 비율을 확인하여, 데이터 스트림의 비율이 해당 연산의 처리율을 초과하면, 선행 연산에 역압 요청을 수행한다. In the conventional back pressure method, the ratio of the data stream is checked every predetermined period, and when the ratio of the data stream exceeds the processing rate of the corresponding operation, a back pressure request is made to the preceding operation.

이에 반해, 도 12를 참고하면, 본 발명의 실시 예에 따른 연산 처리부(120)는 정해진 주기마다 데이터 스트림의 비율을 확인하고(S1210), 어느 하나의 연산(이하, "대상 연산"이라 함)에서 데이터 스트림의 비율이 대상 연산의 처리율을 초과하면(S1220), 대상 연산의 선행 연산이 직렬 연산인지 확인한다(S1230). On the other hand, referring to FIG. 12, the operation processing unit 120 according to an embodiment of the present invention checks the ratio of the data stream every predetermined period (S1210), and any one operation (hereinafter referred to as "target operation") When the ratio of the data stream exceeds the processing rate of the target operation (S1220), it is checked whether the preceding operation of the target operation is a serial operation (S1230).

연산 처리부(120)는 대상 연산의 선행 연산이 직렬 연산이면, 대상 연산을 복제한 후 선행 연산에 역압 요청을 전송한다(S1240). If the preceding operation of the target operation is a serial operation, the operation processing unit 120 duplicates the target operation and transmits a back pressure request to the preceding operation (S1240).

연산 처리부(120)는 선행 연산이 병렬 연산이면, 대상 연산이 병렬 연산이고 선행 연산이 분할인지 확인한다(S1250). 연산 처리부(120)는 대상 연산이 병렬 연산이고 선행 연산이 분할이면, 분할된 선행 연산들을 병합한 후 선행 연산에 역압 요청을 전송한다(S1260). If the preceding operation is a parallel operation, the operation processing unit 120 checks whether the target operation is a parallel operation and whether the preceding operation is a partition (S1250). If the target operation is a parallel operation and the preceding operation is divided, the operation processing unit 120 merges the divided preceding operations and transmits a back pressure request to the preceding operation (S1260).

한편, 연산 처리부(120)는 대상 연산이 병렬 연산이고, 선행 연산이 병합이면(S1270), 대상 연산을 복제하고, 병합 연산을 추가한 후 선행 연산에 역압 요청을 전송한다(S1280). Meanwhile, when the target operation is a parallel operation and the preceding operation is a merge (S1270), the operation processing unit 120 duplicates the target operation, adds a merge operation, and transmits a back pressure request to the preceding operation (S1280).

이와 같이, 본 발명의 실시 예에 따른 역압 요청 방법은 연산 복제, 스트림 분할 및 스트림 병합 등을 수행하여 스트림 부하를 동적으로 조절할 수 있다. As described above, the back pressure request method according to an embodiment of the present invention can dynamically adjust the stream load by performing computational replication, stream splitting, and stream merging.

도 13은 본 발명의 실시 예에 따른 역압 장치를 나타낸 도면이다.13 is a view showing a back pressure device according to an embodiment of the present invention.

도 13을 참고하면, 역압 장치(1300)는 프로세서(1310), 메모리(1320), 저장 장치(1330) 및 입출력(input/output, I/O) 인터페이스(1340)를 포함한다. Referring to FIG. 13, the back pressure device 1300 includes a processor 1310, a memory 1320, a storage device 1330, and an input / output (I / O) interface 1340.

프로세서(1310)는 중앙 처리 유닛(central processing unit, CPU)이나 기타 칩셋, 마이크로프로세서 등으로 구현될 수 있다.The processor 1310 may be implemented as a central processing unit (CPU) or other chipset, microprocessor, or the like.

메모리(1320)는 동적 랜덤 액세스 메모리(dynamic random access memory, DRAM), 램버스 DRAM(rambus DRAM, RDRAM), 동기식 DRAM(synchronous DRAM, SDRAM), 정적 RAM(static RAM, SRAM) 등의 RAM과 같은 매체로 구현될 수 있다. The memory 1320 includes media such as dynamic random access memory (DRAM), RAMbus DRAM (RDRAM), synchronous DRAM (SDRAM), and static RAM (SRAM). Can be implemented as

저장 장치(1330)는 하드 디스크(hard disk), CD-ROM(compact disk read only memory), CD-RW(CD rewritable), DVD-ROM(digital video disk ROM), DVD-RAM, DVD-RW 디스크, 블루레이(blu-ray) 디스크 등의 광학 디스크, 플래시 메모리, 다양한 형태의 RAM과 같은 영구 또는 휘발성 저장 장치로 구현될 수 있다. The storage device 1330 includes a hard disk, compact disk read only memory (CD-ROM), CD rewritable (CD-RW), digital video disk ROM (DVD-ROM), DVD-RAM, DVD-RW disk , Blu-ray disks, optical disks, flash memory, and various types of RAM such as permanent or volatile storage devices.

I/O 인터페이스(1340)는 프로세서(1310) 및/또는 메모리(1320)가 저장 장치(1330)에 접근할 수 있도록 한다. 또한 I/O 인터페이스(1340)는 시스템의 관리자와 인터페이스를 제공할 수 있다. The I / O interface 1340 allows the processor 1310 and / or memory 1320 to access the storage device 1330. Also, the I / O interface 1340 may provide an interface with a system administrator.

프로세서(1310)는 도 8 내지 도 12에서 설명한 연산 처리부(120)의 연산 기능을 수행할 수 있으며, 특히 연산 복제, 스트림 분할 및 스트림 병합 등의 기능을 수행할 수 있다. 프로세서(1310)는 연산 복제, 스트림 분할 및 스트림 병합 등의 기능을 구현하기 위한 프로그램 명령을 메모리(1320)에 로드시켜, 도 8 내지 도 12에서 설명한 동작이 수행되도록 할 수 있다. 그리고 이러한 프로그램 명령은 저장 장치(1330)에 저장되어 있을 수 있으며, 또는 네트워크로 연결되어 있는 다른 시스템에 저장되어 있을 수 있다. The processor 1310 may perform a calculation function of the calculation processing unit 120 described with reference to FIGS. 8 to 12, and may perform functions such as calculation replication, stream splitting, and stream merging. The processor 1310 may load program instructions for implementing functions such as computational replication, stream splitting, and stream merging into the memory 1320 so that the operations described with reference to FIGS. 8 to 12 may be performed. In addition, these program commands may be stored in the storage device 1330 or may be stored in another system connected through a network.

이상에서 본 발명의 실시 예에 대하여 상세하게 설명하였지만 본 발명의 권리 범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리 범위에 속하는 것이다. Although the embodiments of the present invention have been described in detail above, the scope of rights of the present invention is not limited thereto, and various modifications and improvements of those skilled in the art using the basic concept of the present invention defined in the following claims are also provided. It belongs to the scope of rights.

Claims (4)

실시간 스트림 처리 시스템에서 선행 연산에게 역압을 요청하는 방법으로서,
정해진 주기마다 데이터 스트림의 비율을 확인하는 단계,
어느 하나의 대상 연산에서 데이터 스트림의 비율이 상기 대상 연산의 처리율을 초과하면, 상기 대상 연산의 선행 연산이 직렬 연산인지 확인하는 단계,
상기 대상 연산이 병렬 연산이고 상기 선행 연산이 분할 연산인지 병합 연산인지 확인하는 단계,
상기 대상 연산이 병렬 연산이고 상기 선행 연산이 분할 연산이면, 분할된 선행 연산들을 병합한 후 상기 선행 연산에 역압 요청을 전송하는 단계, 그리고
상기 대상 연산이 병렬 연산이고 상기 선행 연산이 병합 연산이면, 상기 대상 연산을 복제하고, 복제된 연산들을 병합하는 병합 연산을 추가한 후 상기 선행 연산에 역압 요청을 전송하는 단계
를 포함하는 역압 요청 방법.
A method for requesting back pressure from a preceding operation in a real-time stream processing system,
Checking the ratio of the data stream every predetermined period,
If the ratio of the data stream in any one target operation exceeds the processing rate of the target operation, checking whether a preceding operation of the target operation is a serial operation,
Checking whether the target operation is a parallel operation and the preceding operation is a split operation or a merge operation,
If the target operation is a parallel operation and the preceding operation is a split operation, merging the divided prior operations and transmitting a back pressure request to the preceding operation, and
If the target operation is a parallel operation and the preceding operation is a merge operation, replicating the target operation, adding a merge operation to merge the duplicated operations, and then sending a back pressure request to the preceding operation.
Back pressure request method comprising a.
제1항에서,
상기 선행 연산이 직렬 연산이면 상기 대상 연산을 복제한 후 상기 선행 연산에 역압 요청을 전송하는 단계를 포함하는 역압 요청 방법.
In claim 1,
And if the preceding operation is a serial operation, replicating the target operation and then sending a back pressure request to the preceding operation.
삭제delete 삭제delete
KR1020170087324A 2016-09-07 2017-07-10 Adaptive back pressure method for real-time stream processing and apparatus thereof KR102097296B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20160115234 2016-09-07
KR1020160115234 2016-09-07

Publications (2)

Publication Number Publication Date
KR20180028003A KR20180028003A (en) 2018-03-15
KR102097296B1 true KR102097296B1 (en) 2020-04-06

Family

ID=61660044

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170087324A KR102097296B1 (en) 2016-09-07 2017-07-10 Adaptive back pressure method for real-time stream processing and apparatus thereof

Country Status (1)

Country Link
KR (1) KR102097296B1 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101752699B1 (en) * 2011-07-18 2017-07-03 한국전자통신연구원 Method for processing exploding data stream and apparatus for the same

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Kevin Webber, "A Journey into Reactive Streams" (2015.08.28.)*

Also Published As

Publication number Publication date
KR20180028003A (en) 2018-03-15

Similar Documents

Publication Publication Date Title
US10594489B2 (en) Method and device for processing service request
US9135057B2 (en) Operator graph changes in response to dynamic connections in stream computing applications
Yildirim et al. Application-level optimization of big data transfers through pipelining, parallelism and concurrency
US10003649B2 (en) Systems and methods to improve read/write performance in object storage applications
US10209908B2 (en) Optimization of in-memory data grid placement
US8639809B2 (en) Predictive removal of runtime data using attribute characterizing
WO2016062087A1 (en) Streaming application update method, master node, and stream computing system
US9633102B2 (en) Managing passthru connections on an operator graph
EP3377432B1 (en) A method and an apparatus for determining an allocation decision for at least one elevator
US10467106B2 (en) Data processing method, data processing system, and non-transitory computer program product for controlling a workload delay time
US9961169B1 (en) Implementing autoswitching network protocols for optimal efficiency
CN110018781B (en) Disk flow control method and device and electronic equipment
US10303505B2 (en) Adjusting a computing environment for processing a data stream with dummy tuples
CN107153526B (en) Parallel data backflow method in streaming computing environment
KR102097296B1 (en) Adaptive back pressure method for real-time stream processing and apparatus thereof
CN110377398B (en) Resource management method and device, host equipment and storage medium
TWI734681B (en) Method and device for preheating data cache
Madsen et al. Enorm: Efficient window-based computation in large-scale distributed stream processing systems
US20190213088A1 (en) System and method for generating a synthetic backup in a redundant storage solution
Desai et al. Performance measurement of virtual machine migration using pre-copy approach in cloud computing
CN110389827B (en) Method, apparatus and computer program product for optimization in a distributed system
US20170052893A1 (en) Managing cache coherence for memory caches
US10594657B1 (en) Methods for parameterized sub-policy evaluation for fine grain access control during a session and devices thereof
KR101674324B1 (en) Task scheduling device and method for real-time control applications
US10162541B2 (en) Adaptive block cache management method and DBMS applying the same

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant