Versions Compared

Key

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

Note: these instructions are currently for the S4-22 branch

...

Install S4

There is currently no real distribution package as such. So you need to download the source and build the platform.

  1. Download from Apache git repository. Follow instructions here. Checkout branch S4-22
  2. Compile and install S4 in the local maven repository: (you can also let the tests run, which is currently quite long: we're not yet using mocks)
    Code Block
    S4:incubator-s4$ ./gradlew install -DskipTests
    .... verbose logs ...
    
  3. Build the startup scripts: 
    Code Block
    S4:incubator-s4$ ./gradlew s4-tools:installApp
    .... verbose logs 
    ...:s4-tools:installApp
    

...

Start a new application

S4 provides some scripts in order to simplify development and testing of applications. Let's see how to create a new template project and start a sample application.

...

  • HelloInputAdapter is a simple adapter that reads character lines from a socket, converts them into events, and sends the events to interested S4 apps, through the "names" stream

Run the sample

...

app

In order to run an S4 application, you need :

...

We can get input through an adapter, i.e. an S4 app that converts an external stream into S4 events, and injects the events into S4 clusters. In the sample application, the adapter is a very basic class, that extends App, listens to an input socket, and converts each received line of characters into a generic S4 event, in which the line data is kept in a "name" field. We specify :

  • the adapter class
  • the name of the output stream
  • the cluster where to deploy this app

For easy testing, we provide a facility to start a node with an adapter app without having to package and deploy the adapter app.

...

The following figures illustrate the various steps we have taken.

Run the Twitter trending example

...