incubator-s4-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Neumeyer (Commented) (JIRA)" <>
Subject [jira] [Commented] (S4-5) Prototype app builder
Date Wed, 14 Dec 2011 18:07:30 GMT


Leo Neumeyer commented on S4-5:

I had to add a couple of elements.

# To define a stream we need the event type and the property name. The property name needs
to match exactly the property name used by a ProcessingElement that consumes this stream.
I dont' think there is a way around that and of course it is not type safe. 
# Concrete PEs need configuration properties. To pass them using a generic API, I use the
method property(String key, Object value).

Let ne know what you think. Will this be easy to understand given the required conventions?

{code:title=S4 Fluent API|borderStyle=dashed}
package org.apache.s4.appmaker;

public class MyApp extends AppMaker {

    protected void configure() {

        PEMaker pez, pey;
        StreamMaker s1;
        StreamMaker s2, s3;

        pez = addPE(PEZ.class);

        s1 = addStream("stream1", EventA.class).withName("My first stream.").withKey("{gender}").to(pez);

        pey = addPE(PEY.class).to(s1).property("duration", 4).property("height", 99);

        s2 = addStream("stream2", EventB.class).withName("My second stream.").withKey("{age}").to(pey).to(pez);

        s3 = addStream("stream3", EventB.class).withKey("{height}").to(pey);

        addPE(PEX.class).to(s2).to(s3).property("keyword", "money");

> Prototype app builder
> ---------------------
>                 Key: S4-5
>                 URL:
>             Project: Apache S4
>          Issue Type: New Feature
>    Affects Versions: 0.5
>            Reporter: Leo Neumeyer
>            Priority: Minor
>             Fix For: 0.5
> Extend Guice AbstractModule to create a simple application builder layer. The idea is
to evaluate if we can use Guice to do all the wiring including PEs and Streams and Apps.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message