Deploying Siddhi Applications Through Stream Processor Studio

I did my internship at WSO2 with the Analytics and SP team. This is one of the projects done by me during the internship period.

Before going through the project in detail lets have a brief understanding about What is the WSO2 Stream Processor, what is the Stream Processor Studio and what is a Siddhi Application in order to understand the use of this feature according to the users perspective.

What is the Stream Processor?

Meanwhile WSO2 SP is powered by Siddhi, a leading Open Source stream processing project.

What is the Stream Processor Studio?

What is a Siddhi Application?

Need For Deploying Siddhi Applications

There are two modes of deployment,

  • Standard Deployment, here we deploy Siddhi Apps in worker node (In Single node, Minimum HA Deployments).
  • Fully Distributed Deployment, here we deploy Siddhi Apps in manager node (Only in Fully Distributed Deployment).

This feature is developed for the Standard deployment where it allows a user to deploy selected Siddhi Apps to preferred servers through the SP Studio.

Standard Deployment

  • Dropping the .siddhi file in to the <SP_HOME>/wso2/worker/deployment/siddhi-files/ directory before or after starting the worker node.
  • Sending a “POST” request to http://<host>:<port>/siddhi-apps with the Siddhi App included in the body of the request.

Bottlenecks

Solution

Technology Used

How to use

  • Then “Deploy To Server” dialog will popup.
  • All the Siddhi Apps saved in the Editor Workspace are listed under “Siddhi Apps To Deploy”.
  • A user can select one or more Siddhi Apps by checking the checkbox in front of the Siddhi App name.
  • Then a user can select the required servers where the selected Siddhi Apps should be deployed.
  • Available servers are listed under “Servers” (These servers are previously added servers which are been stored in the local storage).
  • If a required server is not available under the “Servers” list, you can add it using the “Add New Server”.
  • There are four fields to be filled as Host, Port, User Name and the Password.
  • Fill those fields with the appropriate Host, Port, User Name and the Password for the required worker node and click on the “Add” button.
  • Then the New Server will be available under the Servers list.
  • After selecting the required Siddhi Apps And the Servers click on “Deploy” button.
  • Finally “Deployment Status” will be generated.
  • By going through it you can understand whether a specific Siddhi App is deployed successfully or not.

Hopefully this feature will be available with the next release.

Software Engineer | WSO2 | Faculty of Information Technology | University of Moratuwa| Richmondite