{"id":13487386,"url":"https://github.com/haoch/flink-siddhi","last_synced_at":"2025-04-06T06:13:10.734Z","repository":{"id":75671727,"uuid":"67913797","full_name":"haoch/flink-siddhi","owner":"haoch","description":"A CEP library to run Siddhi within Apache Flink™ Streaming Application (Not maintained)","archived":false,"fork":false,"pushed_at":"2023-12-16T18:18:05.000Z","size":635,"stargazers_count":244,"open_issues_count":48,"forks_count":95,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-03-30T05:07:09.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haoch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-11T06:19:09.000Z","updated_at":"2025-03-28T08:38:03.000Z","dependencies_parsed_at":"2024-01-27T11:12:13.122Z","dependency_job_id":"55c56d33-4aa7-46e2-9d3f-0cb2fe64a371","html_url":"https://github.com/haoch/flink-siddhi","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoch%2Fflink-siddhi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoch%2Fflink-siddhi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoch%2Fflink-siddhi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haoch%2Fflink-siddhi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haoch","download_url":"https://codeload.github.com/haoch/flink-siddhi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441059,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T18:00:58.585Z","updated_at":"2025-04-06T06:13:10.703Z","avatar_url":"https://github.com/haoch.png","language":"Java","funding_links":[],"categories":["Java","大数据","Complex Event Processing"],"sub_categories":[],"readme":"flink-siddhi\n============\n\n[![Travis CI](https://api.travis-ci.org/haoch/flink-siddhi.svg)](https://travis-ci.org/haoch/flink-siddhi)\n[![Clojars Project](https://img.shields.io/clojars/v/com.github.haoch/flink-siddhi_2.11.svg)](https://clojars.org/com.github.haoch/flink-siddhi_2.11)\n\n\u003e A light-weight library to run [Siddhi CEP](https://github.com/wso2/siddhi) within [Apache Flink](https://github.com/apache/flink) streaming application.\n\nSiddhi CEP is a lightweight and easy-to-use Open Source Complex Event Processing Engine (CEP) released as a Java Library under `Apache Software License v2.0`. \nSiddhi CEP processes events which are generated by various event sources, analyses them and notifies appropriate complex events according to the user specified queries. \n\nThis project is mainly to provide a light-weight library to easily run Siddhi CEP within flink streaming application.\n\n## Features\n\n* Integrate Siddhi CEP as an stream operator (i.e. `TupleStreamSiddhiOperator`), supporting rich CEP features like\n  * Filter\n  * Join\n  * Aggregation\n  * Group by\n  * Having\n  * Window\n  * Conditions and Expressions\n  * Pattern processing\n  * Sequence processing\n  * Event Tables\n  * ...\n* Provide easy-to-use Siddhi CEP API to integrate Flink DataStream API (See `SiddhiCEP` and `SiddhiStream`)\n  * Register Flink DataStream associating native type information with Siddhi Stream Schema, supporting POJO,Tuple, Primitive Type, etc.\n  * Connect with single or multiple Flink DataStreams with Siddhi CEP Execution Plan\n  * Return output stream as DataStream with type intelligently inferred from Siddhi Stream Schema\n* Integrate siddhi runtime state management with Flink state (See `AbstractSiddhiOperator`)\n* Support siddhi plugin management to extend CEP functions. (See `SiddhiCEP#registerExtension`)\n\n## Development\n\n### Prerequisites\n\n* Java (Version: `1.8`)\n* Apache Maven\n* Apache Flink (Version: `1.7.0`)\n\n### Clone\n\n\tgit clone git@github.com:haoch/flink-siddhi.git\n\n### Building\n\n   \tmvn clean install -DskipTests\n   \n### Testing\n\n   \tmvn clean test\n\n## Usage and API\n\n* Add [`com.github.haoch:flink-siddhi`](https://clojars.org/com.github.haoch/flink-siddhi_2.11) in project dependencies:\n\n        \u003cdependencies\u003e\n                \u003cdependency\u003e\n                        \u003cgroupId\u003ecom.github.haoch\u003c/groupId\u003e\n                        \u003cartifactId\u003eflink-siddhi_2.11\u003c/artifactId\u003e\n                        \u003cversion\u003eLATEST\u003c/version\u003e\n                \u003c/dependency\u003e\n        \u003c/dependencies\u003e\n        \n        \u003crepositories\u003e\n                \u003crepository\u003e\n                        \u003cid\u003eclojars\u003c/id\u003e\n                        \u003curl\u003ehttp://clojars.org/repo/\u003c/url\u003e\n                \u003c/repository\u003e\n        \u003c/repositories\u003e\n \n* Execute [`SiddhiQL`](https://docs.wso2.com/display/CEP300/Introduction+to+Siddhi+Query+Language) with `SiddhiCEP` API, for example:\n\n        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n        SiddhiCEP cep = SiddhiCEP.getSiddhiEnvironment(env);\n        \n        cep.registerExtension(\"custom:plus\",CustomPlusFunctionExtension.class);\n        \n        cep.registerStream(\"inputStream1\", input1, \"id\", \"name\", \"price\",\"timestamp\");\n        cep.registerStream(\"inputStream2\", input2, \"id\", \"name\", \"price\",\"timestamp\");\n        \n        DataStream\u003cTuple5\u003cInteger,String,Integer,String,Double\u003e\u003e output = cep\n             .from(\"inputStream1\").union(\"inputStream2\")\n             .cql( \n             \"from every s1 = inputStream1[id == 2] \"\n             + \" -\u003e s2 = inputStream2[id == 3] \"\n             + \"select s1.id as id_1, s1.name as name_1, s2.id as id_2, s2.name as name_2 , custom:plus(s1.price,s2.price) as price\"\n             + \"insert into outputStream\")\n            .returns(\"outputStream\");\n        \n        env.execute();\n     \n  \u003e For more examples, please see [`org.apache.flink.contrib.siddhi.SiddhiCEPITCase`](https://github.com/haoch/flink-siddhi/blob/master/core/src/test/java/org/apache/flink/streaming/siddhi/SiddhiCEPITCase.java)\n  \n\n## Documentations\n* Site: https://haoch.github.io/flink-siddhi/\n* Wiki: https://github.com/haoch/flink-siddhi/wiki\n* Siddhi Query Language: https://docs.wso2.com/display/CEP300/Introduction+to+Siddhi+Query+Language\n* Apache Flink: http://flink.apache.org/\n\n## Support and Contact\n* Issues: https://github.com/haoch/flink-siddhi/issues\n* Documents: https://github.com/haoch/flink-siddhi/wiki\n\n## Contributors\n\n* Hao Chen [@haoch](https://github.com/haoch) (Author, hao AT apache DOT org)\n* Aparup Banerjee [@aparup](https://github.com/aparup)\n* Blues Zheng [@kisimple](https://github.com/kisimple)\n* [@aagupta1](https://github.com/aagupta1)\n* [@wittyameta](https://github.com/wittyameta)\n* Jinhu Wu [@wujinhu](https://github.com/wujinhu)\n* Pi Jing [@tammypi](https://github.com/tammypi)\n* Jayant Ameta [@wittyameta](https://github.com/wittyameta)\n* Drona [@Dr0na](https://github.com/Dr0na)\n\n## Contribution\n\nWelcome to make contribution to code or document by [sending a pull request](https://github.com/haoch/flink-siddhi/pulls), or [reporting issues or bugs](https://github.com/haoch/flink-siddhi/issues).\n\n## License\n\nLicensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). More details, please refer to [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaoch%2Fflink-siddhi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaoch%2Fflink-siddhi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaoch%2Fflink-siddhi/lists"}