Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page describes how to create artifacts for the an Analytics Projectproject. It contains the following sections:

Table of Contents
maxLevel3

Info

The Anaytics pluginplug-in currently working works only for the CEP (WSO2 Complex Event Processor) artifacts which are eventstream, eventpublisher, eventreceiver and executionplan artifacts such as event stream, event publisher, event receiver and execution-plan. In the future, we plan to extend the functionality of Analytics Plugin for DAS (will include WSO2 Data Analytics Server) artifacts as well.

Creating an Analytics

...

project

You can create an Analytics Project project to save all the your Analytics related atifacts such as execution-planplans, stream,publisher,receiverstreams, publishers and receivers.

To create an Analytics

...

project

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Analytics Project in the Analytics category. Image Removed

    Image Added
  2. If you want to create this Analytics project by Artifacts in Deployment Serverusing artifacts from the deployment server, select the New Analytics Project By Artifacts in Deployment Server (<CARBON_HOME>/repositaryrepository/deployment/server/) option. Otherwise Otherwise, leave the Create New Analytics Project option selected. Click Next.

    Image Added
     
  3. Do the following:
    1. Type a unique name for the project.

    2. Optionally specify the working set, if any, that you want to include in this project.

    3. Optionally specify the location where you want to save the project (or leave the default location specified).

    4. If you selected the option to New Analytics Project By Artifacts in Deployment Server option in the previous step, click Browse and navigate to the <CARBON<PRODUCT_HOME>/repositaryrepository/deployment/server/ folder containing the artifact file folders.

  4. A Maven POM file will be generated automatically for this project. If you want to include parent POM information in the file from another project in this workspace, click Next, click the Specify Parent from Workspace check box, and then select the parent project.
  5. Click Finish.
  6. If you specified Deployment Server a deployment server folder containing the artifact file folders, specify whether you want to open those files now.

The new project has now been created in the workspace. If you browse inside the project, you will see a project structure as shown below, with folders created for different resources such as execution-plan, publisher, receiver, and stream. 

Creating

...

a stream

Events are the lifeline of WSO2 CEP/DAS. Data is not only processed as events, but interactions with external systems also uses events. An event is a unit of data, and an event stream is a sequence of events of a particular type. The type of events can be defined as an event stream definition. Definitions of the event streams are stored in the file system as .json files as deployable artifacts in the  <CARBON the <PRODUCT_HOME>/repository/deployment/server/executionplans/ directory as .siddhiql files. Moreeventstreams directory. For more information, see Understanding Event Streams.

Creating a new

...

stream

Follow these the steps below to create a new execution-planstream. Alternatively, you can import an existing execution-planstream.

  1. Open the Developer Studio Dashboard (click click Developer Studio > Open Dashboard) and click Execution-plan in click Stream in the Analytics category.
  2. Select Select Create New Execution-plan and click Stream and click Next.
  3. Type a unique name for the Execution-planstream.
  4. Do one of the following:
    • To save the execution-plan stream in an existing Analytics project in your workspace, click click Browse and  and select that project.
    • To save the execution-plan stream in a new Analytics project, click click Create new Project and  and create the new project.
  5. Click Finish. The execution-plan stream is created in the execution-plan stream folder under the Analytics project you specified, and the execution-plan stream is open in the editor.

Importing

...

a stream

Follow these the steps below to import an existing execution-plan stream from a .siddhiql json file into an Analytics project. Alternatively, you can create a new execution-planstream.

  1. Open the Developer Studio Dashboard (click click Developer Studio > Open Dashboard) and click Execution-plan in click Stream in the Analytics category. 
  2. Select Import Execution-plan and click Select Import Stream and click Next. 
  3. Type a unique name for the Execution-planstream. 
  4. Specify the execution-plan stream file by typing its full path name or clicking clicking Browse and  and navigating to the file. 
  5. In the Save Execution-plan Stream In field, specify an existing Analytics project in your workspace where you want to save the execution-planstream, or click click Create new Project to  to create a new Analytics project and save the execution-plan stream there. 
  6. Click Click Finish. The execution-plan stream is created in the execution-plan stream folder under the Analytics project you specified, and the execution-plan stream is open in the editor.

Creating

...

an execution-plan

WSO2 CEP uses execution-plans to store event processing logic. An execution-plan is bound to an instance of the Siddhi complex event processing runtime, which is responsible for the actual processing of the events. The event processor allows users to configure multiple execution-plans by providing multiple isolated event processing environments per execution-plan. A typical execution-plan consists of a set of queries and related input and output event streams. Definitions of the event streams are stored in the file system as .siddhiql files as deployable artifacts in the  <CARBON the <PRODUCT _HOME>/repository/deployment/server/eventstreams/ directory as .json files. Moreexecutionplans directory. For more information, see Creating a Standalone Execution Plan.

Creating a new

...

execution-plan

Follow these the steps below to create a new streamexecution-plan. Alternatively, you can import an existing streamexecution-plan.

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Stream Execution-plan in the Analytics category.
  2. Select Create New StreamExecution-plan and click Next.
  3. Type a unique name for the Streamexecution-plan.
  4. Do one of the following:
    • To save the
  5. stream
    • execution-plan in an existing Analytics project in your workspace,
  6. click 
    • click Browse
  7.  and
    • and select that project.
    • To save the
  8. stream
    • execution-plan in a new Analytics project,
  9. click 
    • click Create new Project
  10.  and
    • and create the new project.
  11. Click Finish. The stream execution-plan is created in the stream execution-plan folder under the Analytics project you specified, and the stream execution-plan is open in the editor.

Importing

...

an execution-plan

Follow these the steps below to import an existing stream execution-plan from a .json siddhiql file into an Analytics project. Alternatively, you can create a new streamexecution-plan.

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Stream Execution-plan in the Analytics category. 
  2. Select Import StreamExecution-plan and click Next. 
  3. Type a unique name for the Streamexecution-plan. 
  4. Specify the stream execution-plan file by typing its full path name or clicking Browse and navigating to the file. 
  5. In the Save Stream Execution-plan In field, specify an existing Analytics project in your workspace where you want to save the streamexecution-plan, or click Create new Project to create a new Analytics project and save the stream execution-plan there. 
  6. Click Finish. The stream execution-plan is created in the stream execution-plan folder under the Analytics project you specified, and the stream execution-plan is open in the editor.

 

Creating a

...

publisher

Event publishers publish events via various transport protocols. Event publisher configurations are stored in the file system as deployable artifacts in the  <CARBON  .xml files as deployable artifacts in the <PRODUCT _HOME>/repository/deployment/server/eventpublishers/ directory as .xml files. More directory. For more information, see Event Publisher Types.

Creating a new

...

publisher

Follow these the steps below to create a new publisher. Alternatively, you can import an existing publisher.

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Publisher in the Analytics category.
  2. Select Create New Publisher and click Next.
  3. Type a unique name for the Publisherpublisher.
  4. Do one of the following:
    • To save the publisher in an existing Analytics project in your workspace,
  5. click
    • click Browse
  6. and
    •  and select that project.
    • To save the publisher in a new Analytics project,
  7. click
    • click Create new Project
  8. and
    •  and create the new project.
  9. Click Finish. The publisher is created in the publisher folder under the Analytics project you specified, and the publisher is open in the editor.

Importing a

...

publisher

Follow these the steps below to import an existing publisher from an XML .xml file into an Analytics project. Alternatively, you can create a new publisher.

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Publisher in the Analytics category.
  2. Select Import Publisher and click Next.
  3. Type a unique name for the Publisherpublisher.
  4. Specify the publisher file by typing its full path name or clicking Browse and navigating to the file.
  5. In the Save Publisher In field, specify an existing Analytics project in your workspace where you want to save the publisher, or click Create new Project to create a new Analytics project and save the publisher there.
  6. Click Finish. The publisher is created in the publisher folder under the Analytics project you specified, and the publisher is open in the editor.

Creating a

...

receiver

Events are received by the WSO2 CEP/DAS server using event receivers, which manage the event retrieval process. Event receiver configurations are stored in the file system .xml files as deployable artifacts in the  <CARBON artifacts in the <PRODUCT_HOME>/repository/deployment/server/eventreceivers/ directory as .xml files. More directory. For more information, see Configuring Event Receivers.

Creating a new

...

receiver

Follow these the steps below to create a new receiver. Alternatively, you can import an existing receiver.

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Receiver in the Analytics category.
  2. Select Create New Receiver and click Next.
  3. Type a unique name for the Receiverreceiver.
  4. Do one of the following:
    • To save the receiver in an existing Analytics project in your workspace,
  5. click
    • click Browse
  6. and
    •  and select that project.
    • To save the receiver in a new Analytics project,
  7. click
    • click Create new Project
  8. and
    •  and create the new project.
  9. Click Finish. The receiver is created in the receiver folder under the Analytics project you specified, and the receiver is open in the editor.

Importing a

...

receiver

Follow these the steps below to import an existing receiver from an XML a .xml file into an Analytics project. Alternatively, you can create a new receiver.

  1. Open the Developer Studio Dashboard (click Developer Studio > Open Dashboard) and click Receiver in the Analytics category.
  2. Select Import Receiver and click Next.
  3. Type a unique name for the Receiverreceiver.
  4. Specify the receiver file by typing its full path name or clicking Browse and navigating to the file.
  5. In the Save Receiver In field, specify an existing Analytics project in your workspace where you want to save the receiver, or click Create new Project to create a new Analytics project and save the receiver there.
  6. Click Finish. The receiver is created in the receiver folder under the Analytics project you specified, and the receiver is open in the editor.

Deploying the Analytics

...

project

Once you create have created the necessary artifacts in the Analytics Project with atifacts such as execution-plan,stream,publisher and receiver, project, you can create a Composite Application Project (C-App) project to group them and create a Composite Application Archive (CAR) file. Before creating the CAR filethe CAR file, make sure to change the server role of the created bundle to ComplexEventProcessor. To deploy it to WSO2 Complex Event Processor (CEP), you need to change it to the correct server role. 

Image RemovedImage Added

For more information, see Packaging Artifacts Into Deployable Archives.

...