Project: springxd
Issue XD-369: Further DSL extensions
Extend the DSL in the following ways: - stream naming, use '=' {code} mystream = http | file {code} - module aliasing (for later referencing) use ':' {code} mystream = http | t1: transform --expression=payload.toUpperCase() | t2: transform --expression=payload.toLowerCase() {code} - sequence of job steps with '&' {code} mybigjobby = step1 --option=value & step2 --option=value {code} - Channels for sources and sinks, use '>', channels references prefixed ':' {code} // sink channel called foo http | transform --expression=payload.toUppercase() > :foo // source channel called foo :foo > count | file {code} - Qualify channels with a stream ':''.' {code} mystream = http | transform --expression=payload.toUppercase() > :foo :mystream.foo > count | log {code} - Reusable substreams, define then reuse {code} myIntricateFlow = transform --expression=payload.toUppercase() | transform --expression=payload.toLowercase() http | myIntricateFlow | file {code} - Parameterized substreams, use $XX or ${XX} to indicate parameters {code} obfuscateName = transform --expression=payload.replaceAll("${name}",XXX) twitter --query=Bieber | obfuscateName --name=Justin | file {code} - Tapping (still not 100% happy about the format here) {code} mystream = http | filter | t1: transform XXX | t2: transform YYY | file // These are then equivalent (tapping on a module is effectively tapping a channel, hence the '>') tap filter > count | file tap mystream.filter > count | file mystream = http | filter > :foo tap :foo > count | file tap :mystream.foo > count | file {code} I'd still like to thing about removing 'tap' and using a symbol (perhaps '@', but @:mystream.foo is a little odd) still not covered, topological constraints on the stream components.
Story points: 3