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 Sat, 10 Dec 2011 23:52:40 GMT


Leo Neumeyer commented on S4-5:

I started to work on the AppMaker package. The goal is to use a builder pattern to build apps
and do the bindings with Guice behind the scenes. I started with the end user API. I'm also
considering modifying the App class to extend Guice's AbstractModule. Suggestions welcomed.

This is how a user would create an app:

{code:title=Prototyping App Builder|borderStyle=dashed}
package org.apache.s4.appbuilder;

public class Main {

     * @param args
    public static void main(String[] args) {

        AppMaker am = new AppMaker();

        PEMaker pem1, pem2;
        StreamMaker s1;
        StreamMaker s2, s3;

        pem1 = am.addPE(PEZ.class);

        s1 = am.addStream(EventA.class).withName("My first stream.").withKeyFinder("{gender}").to(pem1);

        pem2 = am.addPE(PEY.class).to(s1);

        s2 = am.addStream(EventB.class).withName("My second stream.").withKeyFinder("{age}").to(pem2);

        s3 = am.addStream(EventB.class).withName("My third stream.").withKeyFinder("{height}").to(pem2);



- I am not using generics here, instead I pass the PE and Event types. (I assume we can build
what we want with reflection and only need the type.) 
- For now I am doing this as a separate package but this may end up: PEMaker -> ProcessingElement
and StreamMaker -> Stream.
- The KeyFinder needs to be generated from a string. (Can we reuse the code from 0.3?)
- Need to build the graph using the Guice API. 

The branch name is appbuilder. - [GH repo|]

> 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