During GSoC 2017, I worked on developing a Python Wrapper on Siddhi Complex Event Processor (Siddhi CEP) Java Library [GitHub, Release 3.1, Release 4.0, Wiki] developed by WSO2 Inc. The Python wrapper covered both versions 3.1.x and 4.x of Siddhi CEP by its two versions PySiddhi3 and PySiddhi4. Additionally, a REST API was developed for WSO2 Data Analytics Server (WSO2 DAS) 4.x as a feature of PySiddhi4.
The API PySiddhi4 on Siddhi CEP 4.x and WSO2 DAS 4.x may require future evolvements since Siddhi CEP 4.x and WSO2 DAS 4.x are still unreleased. However, the developed Python wrappers are in stable state as per the current development versions of Siddhi CEP 4.x (Version 4.0.0-M51) and WSO2 DAS 4.x (4.0.0-M6). The API PySiddhi3 on Siddhi CEP 3.x can be considered as final since Siddhi CEP 3.1 is a stable release.
- PySiddhi4 - Python Wrapper on Siddhi 4.x and WSO2 DAS 4.x [GitHub, Wiki]
- PySiddhi3 - Python Wrapper on Siddhi 3.1 [GitHub, Wiki]
The project consisted of 3 components Python wrapper on Siddhi CEP 4.x, Python wrapper on Siddhi CEP 3.1 and Python API (REST Client) on WSO2 DAS 4.x. All 3 components were developed from scratch. No previous coding work has been done on developing the relavant wrappers prior to GSOC 2017. The APIs dependended on existing opensource products requests and pyjnius as external libraries.
During the latter stage of the project, the components Python wrapper on Siddhi CEP 4.x and Python API (REST Client) on WSO2 DAS 4.x were merged to produce the product PySiddhi4. Python wrapper on Siddhi CEP 3.1 was evolved into product PySiddhi3.
-
Python wrapper on Siddhi CEP 4.x (PySiddhi4)
- The code has been merged with organization repository. Wrapper is fully completed including the distribution packages generation scripts and documentation. Ready to be released via PyPI.
- Organization Code Repository: https://github.com/wso2/PySiddhi/tree/master
- My Fork - https://github.com/madhawav/PySiddhi/tree/master
- Previous Code Repository*: https://github.com/madhawav/SiddhiCEPPythonAPI
- Wiki: https://github.com/wso2/PySiddhi/wiki
- Merge Pull Requests:
- Commit History for GSOC 2017
- All Commits in previous repository upto commit 4eec4fb99fb0cc9e1aeb84cb869f62fb72d40f31
- All commits in organization code repository upto commit 3ffd1009ac1ddaa64335a78ee8de7c1d442db5c0
- Last Commit under GSOC 2017 Program: https://github.com/wso2/PySiddhi/commit/3ffd1009ac1ddaa64335a78ee8de7c1d442db5c0
-
Python wrapper on Siddhi CEP 3.1 (PySiddhi3)
- The code has been merged to organization repository. Wrapper is fully completed including the distribution packages generation scripts and documentation. Ready to be released via PyPI.
- Organization Repository: https://github.com/wso2/PySiddhi/tree/3.x
- My Fork: https://github.com/madhawav/PySiddhi/tree/3.x
- Previous Repository*: https://github.com/madhawav/SiddhiCEPPythonAPI
- Wiki: https://github.com/wso2/PySiddhi/wiki
- Merge Pull Requests
- Commit History for GSOC 2017 Program:
- All Commits in previous repository upto commit [4eec4fb99fb0cc9e1aeb84cb869f62fb72d40f31]
- All commits in organization code repository upto commit 9fce7c3325b14af9f2b5758051602c0575e43e6b
- Last Commit under GSOC 2017 Program: https://github.com/wso2/PySiddhi/commit/9fce7c3325b14af9f2b5758051602c0575e43e6b
*Both products PySiddhi3 and PySiddhi4 were initially developed by myself in a separate single repository. Later, they were divided into two branches of a single new repository PySiddhi hosted by WSO2. This operation has caused commit history to be lost from new repository.
- Python API on WSO2 DAS 4.x (feature of PySiddhi4) - The is a REST client on WSO2 DAS 4.x developed as a Python API.
- The API covers EventSimulator and Siddhi App Manamagement functionality provided by REST API of WSO2 DAS 4.0. The API is stable with current in development version of WSO2 DAS 4.0. The documentation and distribution package generation scripts of PySiddhi4 includes this feature.
- Feature Code in Organization Code Repository: https://github.com/wso2/PySiddhi/tree/master/PySiddhi4/das
- Feature Code in My Fork - https://github.com/madhawav/PySiddhi/tree/master/PySiddhi4/das
- Previous Code Repository*: https://github.com/madhawav/DASPythonClient
- Wiki: https://github.com/wso2/PySiddhi/wiki/Quick-Demo-(DAS-4.0)
- Commit History for GSOC 2017
- All commits in previous code repository upto commit f1b4e51f7e4ee34ed69ba764c0d0b8ab6d694e8a.
- All commits in organization code repository upto commit 3ffd1009ac1ddaa64335a78ee8de7c1d442db5c0
- Last Commit under GSOC 2017 Program: https://github.com/wso2/PySiddhi/commit/3ffd1009ac1ddaa64335a78ee8de7c1d442db5c0
*Python API for WSO2 DAS 4.0 was initially developed as a separate component in a separate repository by myself. Later, it was merged with the master branch of PySiddhi organisation repository hosted by WSO2. This operation has caused commit history to be lost from the new repository.
- It was initially planned to develop a Python Client on WSO2 DAS 3.1 as well. However, due to time constraints and higher priority given to DAS 4.0 Python Client as a new requirement, this deliverable was not undertaken.
During the course of GSoC, I have contributed to the following Open Source Projects which are related to my project.
- Pyjnius - https://github.com/kivy/pyjnius
- Contributed PRs - kivy/pyjnius#290
- Compatibility issue with Python 3.4+
- In PySiddhi, pyjnius API was used internally for natively bridging JAVA with Python. The update 3.4 of Python has introduced a new issue to pyjnius API, which causes it to crash on callbacks that are triggered by threads spawned by JAVA. (since these new threads are unknown to Python Interpreter). This issue caused SiddhiDebuggerCallback of PySiddhi4 to fail.
- Issue Link: kivy/pyjnius#276
- The
threadfix
workaround mentioned here was used to fix this issue.
- Compatibility issue with Windows.
- The pyjnius API used internally had an issue which causes JVM to crash when callbacks are triggered in Microsoft Windows 64 bit Operating Systems. This caused all callback events in PySiddhi such as QueryCallback, StreamCallback, SiddhiDebuggerCallback to fail in Microsoft Windows 64 bit Operating Systems.
- Issue Link: kivy/pyjnius#279
- The issue was fixed by myself using the following pull request.
- Fix Link: kivy/pyjnius#290
Siddhi is a Query Language and a Library for Realtime Streaming Complex Event Processing developed by WSO2 Inc. Siddhi CEP is currently used in WSO2 Data Analytics Server, an Enterprise Level Open Source Data Analytics Solution.
Further information on above products are available in the links below.
- Siddhi 4.0 Library (In Development Version)
- GitHub - https://github.com/wso2/siddhi
- Siddhi 3.1 Library (Stable Release)
- GitHub - https://github.com/wso2/siddhi/tree/3.1.x
- Documentation - https://docs.wso2.com/display/CEP420/SiddhiQL+Guide+3.1
- WSO2 Data Analytics Server 4.0 (In Development Version)
- GitHub - https://github.com/wso2/product-das
- Documentation - https://docs.wso2.com/display/DAS400/Quick+Start+Guide
- WSO2 Data Analytics Server 3.1 (Stable Release)