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 Thu, 15 Dec 2011 04:37:30 GMT


Leo Neumeyer commented on S4-5:

Another round.

* Got rid of StreamMaker. Now it is a graph from PE to PE using an emit() method. I can easily
infer the stream from the graph, no need to create a stream element.

* Added fluent configuration to Trigger/Timer by creating some additional helper classes that
the user doesn't have to see. 

* I will try to do the stream wiring in the PEs using the Event type of the streams but I'm
not sure if it is possible.

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

import java.util.concurrent.TimeUnit;

public class MyApp extends AppMaker {

    protected void configure() {

        PEMaker pez, pey, pex;

        pez = addPE(PEZ.class);
        pez.withTrigger().fireOn(EventA.class).ifInterval(5, TimeUnit.SECONDS);
        pez.withCache().ofSize(1000).withDuration(3, TimeUnit.HOURS);

        pey = addPE(PEY.class).property("duration", 4).property("height", 99);
        pey.withTimerInterval(50, TimeUnit.MILLISECONDS);

        pex = addPE(PEX.class).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