+1 looks good

Suho

On Mon, Dec 1, 2014 at 4:57 PM, Ayash <ayashkan...@wso2.com> wrote:

> Hi All,
>
> The implementation, $subject is adding some scripting support for Siddhi.
> It is as follows,
>
> 1. Scripting languages are going to be JavaScript and Scala.
> 2. New language feature is to be introduced like below,
>       Define script[Language]{//script implementation goes here}
> 3. Siddhi user can choose the scripting language mentioning it like below
> in Siddhi,
>       Define script[JavaScript] {//JavaScript implementation goes here}
>       or
>       Define script[Scala]{//Scala implementation goes here}
> 4. The functions or methods defined are to be available to the user to
> call it like Siddhi inbuilt function.
>
> For example, let's just define and call a Scala-method in Siddhi like
> below,
>
> define script[Scala] {
>     Def *getSymbol*(id: String): String = id
> }
> define stream cseEventStream (symbol string, price float, volume string)
> from cseEventStream
> select *getSymbol*(symbol), convert(volume,long)/1000 as vol,
> sum(convert(volume,long)) as sumVolume
> group by symbol
> insert into StockQuote;
>
> Appreciate your thoughts!!!
>
> Thanks,
> -Ayash
>
>
> --
> Ayashkantha Ramasinghe
> Software Engineer WSO2, Inc.
> email: ayashkan...@wso2.com <sanj...@wso2.com>;
> TP: +94 77 7 487 669
>



-- 

*S. Suhothayan*
Technical Lead & Team Lead of WSO2 Complex Event Processor
 *WSO2 Inc. *http://wso2.com
* <http://wso2.com/>*
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
<http://suhothayan.blogspot.com/>twitter: http://twitter.com/suhothayan
<http://twitter.com/suhothayan> | linked-in:
http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>*
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to