<font><span style="line-height:normal;background-color:rgba(255,255,255,0)">> However, I fail to see the reason why this might be useful in this<br>> case, as I cannot see any REST API, and reduce functions are quite<br>
> expensive (thus I imply there is no notion of "request", where you can<br>> implement your match/reduce functions).</span></font><div><font><span style="line-height:normal"><br></span></font></div><div><font><span style="line-height:normal">Hi,</span></font></div>
<div><font><span style="line-height:normal"><br></span></font></div><div><font><span style="line-height:normal">You're right the reduce is similar to Riak or CouchDB. I wanted to give users the ability to iterate over matches within a window and perform logic over them before the results are passed onto a subscribed process (this could just be output formatting or simple averaging logic). The difference here is that the reduce function only runs when the CEP system finds a match, and you can control the size of the matched data. This should mean that the amount of data that the reduce runs over is quite small.</span></font></div>
<div><font><span style="line-height:normal"><br></span></font></div><div><font><span style="line-height:normal">However a rest interface seems a great idea, why didn't I think of that! <span></span>So I'll add it to my todo list.</span></font></div>
<div><font><span style="line-height:normal"><br></span></font></div><div><font><span style="line-height:normal">Many thanks</span></font></div><div><font><span style="line-height:normal"><br></span></font></div><div><font><span style="line-height:normal">Dan<br>
</span></font><br>On Tuesday, May 7, 2013, Motiejus Jakštys wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, May 7, 2013 at 12:54 AM, Richard A. O'Keefe <<a href="javascript:;" onclick="_e(event, 'cvml', 'ok@cs.otago.ac.nz')">ok@cs.otago.ac.nz</a>> wrote:<br>
><br>
> On 7/05/2013, at 6:41 AM, Dan Macklin wrote:<br>
><br>
>> I'd like to announce the first beta release of erlang_cep.<br>
><br>
> Looks interesting. I have just begun to read the documentation,<br>
> but I don't understand why Erlang code should be specifying<br>
> what to do by stuffing Javascript code into binaries instead of<br>
> using Erlang functions.<br>
<br>
The idea is the same in Riak (like mentioned in the announcement),<br>
they provide an option to use javascript for map/reduce<br>
implementation. Same here: implement "reduce" logic in javascript.<br>
<br>
However, I fail to see the reason why this might be useful in this<br>
case, as I cannot see any REST API, and reduce functions are quite<br>
expensive (thus I imply there is no notion of "request", where you can<br>
implement your match/reduce functions).<br>
<br>
--<br>
Motiejus Jakštys<br>
</blockquote></div>