This section describes the steps and commands you need to run the Perl example.
To run the example that Sybase CEP supplies, perform the following actions:
Start Sybase CEP Server.
Start Studio and create an input stream that has the following schema:
Field Name
Data Type
Symbol
String
Price
Float
Copy the URI of this stream. To copy the URI, go to the Sybase CEP Studio window, select the Explorer View, then click on the stream, and then look at the Properties tab for the stream and copy the URI shown in the Stream URI field.
Execute the following command to start the publisher:
perl -I C8 examples/c8_publish.pl <URI just copied>
Execute the following command to start the subscriber:
perl -I C8 examples/c8_subscribe.pl <URI just copied>
In this over-simplified example, the subscriber is actually reading from the input stream. We did this to minimize the number of steps that you would need to execute before you could see a publisher and subscriber working. In practice, you must also:
Create an output stream.
Look up the URI of that output stream.
Launch the subscribe.pl script with the URL of the output stream rather than the URL of the input stream.
Write one or more queries that fed data into the output stream.