Aleri 3.0 - Extending SQL with SPLASH Enhancments
Marco’s CEP Blog mentioned that the upcoming 3.0 release of the Aleri Streaming Platform will include enhancements to SPLASH. SPLASH (an acronym for “Streaming Platform LAnguage SHell”—obviously coined by programming geeks) is our embedded scripting language. It allows you to write your own event-processing logic without being constrained by stateless relational operations. I’ve talked about SPLASH, and its wrapper, the FlexStream, in a white paper before. And now SPLASH will be more powerful and easier to use.
First, we’ve added variables and user-defined functions. The syntax comes close to C syntax, while preserving some of the features of SQL expression syntax (e.g., equality test is “=” and assignment is “:=” in SPLASH.) Here, for instance, is the rendering of a recursive factorial function:
int32 factorial(int32 x) {
if (x <= 0) {
return 1;
} else {
return factorial(x-1) * x;
}
}
Functions can be mutually recursive too. Variables and functions can be defined globally for all streams, or locally for the computational streams: Compute, Filter, Join, Aggregate, Flex, and our new Pattern Stream.
Second, we’ve enhance the language with some familiar data structures (vectors, dictionaries), some less familiar ones (ordered record sets), and some novel ones (event caches, which hold a limited or unbounded collection of insert/update/deletes, organized into buckets by key). Any decent scripting language provides vectors (or arrays) and dictionaries: AWK, Perl, Python, to name a few. They’ve stood the test of time. The other data structures have proved helpful in client use-cases.
It’s important to note that SPLASH programming doesn’t break the inherent programming model of the Aleri Streaming Platform. The Platform is still a dataflow programming environment: streams respond to and produce events, and events are queued by streams before being processed. SPLASH simply allows more flexibility in building streams.

