发明名称 Sorted merge of streaming data
摘要 A method for sorting and merging data from at least two sources may include providing a multi-state merge of queues from a first input queue and a second input queue to a merged output, responsive to states of the first and second input queues, setting the state of the first input queue; preventing merging of the first input queue with the non-empty second input queue while the state of the first input queue is empty waiting; and merging the first input queue with the non-empty second input queue responsive to the state of the first input queue being active or ignore, or the wait duration time being exceeded, or in response to a startup command.
申请公布号 US9549014(B1) 申请公布日期 2017.01.17
申请号 US201615013746 申请日期 2016.02.02
申请人 INTERNATIONAL BUSINESS MACHINES CORPORATION 发明人 Foster Kevin Frederic
分类号 H04L12/28;H04L29/06;H04L12/863 主分类号 H04L12/28
代理机构 Shimokaji IP 代理人 Shimokaji IP
主权项 1. A method for sorting and merging data from at least two sources comprising: timestamping the data from the at least two sources; entering the timestamped data into at least one of a first input queue, a second input queue, a third input queue, and a fourth input queue; providing a multi-state merge of queues from the first input queue and the second input queue to a merged output, wherein each of the first input queue and the second input queue has a state from a group including empty waiting, active, and ignore, wherein the empty waiting state has a wait duration time; initializing each of the first input queue and the second input queue to active; responsive to detecting an empty first input queue to be merged with a non-empty second input queue and the state of the first input queue is active, setting the state of the first input queue to empty waiting with a time out; responsive to receiving an entry describing the state of the first input queue when the state of the first input queue is empty waiting, and prior to the time out, setting the state of the first input queue to active; responsive to detecting the time out and state of the first input queue equal to empty waiting, setting the state of the first input queue to ignore; preventing merging of the first input queue with the non-empty second input queue while the state of the first input queue is empty waiting; merging the first input queue with the non-empty second input queue responsive to the state of the first input queue being active; merging the first input queue with the non-empty second input queue responsive to the state of the first input queue being ignore; merging the first input queue with the non-empty second input queue responsive to the wait duration time being exceeded; and merging the first input queue with the non-empty second input queue responsive to a startup command; beginning a sorting of data combined from the first input queue, the second input queue, the third input queue, and the fourth input queue, wherein the sorting of the data combined from the first input queue, the second input queue, the third input queue, and the fourth input queue is executed after casting the combined data to a common data type; receiving a notice that the fourth input queue is newly empty; pausing the sorting of the combined data until after a waiting period for the newly empty fourth input queue has passed; determining whether to sort the first input queue together with the second input queue or the third input queue based on first input queue timestamp data, second input queue timestamp data, and third input queue timestamp data; responsive to a timestamp of datum from at least one of the first input queue, the second input queue, the third input queue, and the fourth input queue being dated after the beginning of the sorting of the combined data, removing the respective datum to an output queue, restarting and completing the sorting of the combined data of the first input queue, the second input queue, and the third input queue based on the determining of whether to sort the first input queue together with the second input queue or the third input queue, wherein the restarting of the sorting proceeds without the removed datum, and wherein the multi-stage merge is for a streaming application.
地址 Armonk NY US