Flink and Dynamic templates recognition

。_饼干妹妹 提交于 2019-12-04 19:07:15

At the moment Flink's CEP library does not support this kind of dynamic rule adaption. However, there is no fundamental reason which makes it impossible to implement.

In fact, the changes should be rather straight forward. At the moment the workflow is the following: The user specifies an event pattern. This pattern is translated into a NFA representing the pattern (this happens on the client side). The NFA is then given to the CEP operator which is serialized and shipped to the cluster. On the cluster the CEP operator and the NFA are deserialized and then start processing events.

What one could add is a co-flat map operator which receives on one input channel the events and on the other input channel patterns. For each newly received pattern one either updates the existing NFA (this functionality is missing) or compiles a new one. In the latter case, one would apply incoming events to all stored NFAs.

That way, one could realize a CEP operator whose pattern can be dynamically updated.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!