tag:blogger.com,1999:blog-5951375.post1206880645617878148..comments2023-10-03T10:31:50.038-04:00Comments on Magmasystems Blog: Request: Streaming R or R-like Functions in CEP Systemsmarchttp://www.blogger.com/profile/09487180059998380922noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-5951375.post-33681848017841249932009-02-12T16:27:00.000-05:002009-02-12T16:27:00.000-05:00@MarcYou can do that today in Esper without extend...@Marc<BR/>You can do that today in Esper without extending the EPL. Simply use a named window (similar to Coral8 public window) and use the iterator API or JDBC driver (possibly from a remote process) to iterate over the window and do the sampling (in Java for Esper) at regular intervals. I believe Coral8 can n do pretty much the same.<BR/><BR/>@Hans - Hans - you see that some solutions like Alexhttps://www.blogger.com/profile/02000951254466645137noreply@blogger.comtag:blogger.com,1999:blog-5951375.post-69925654428539768572009-02-12T12:57:00.000-05:002009-02-12T12:57:00.000-05:00Not sure if this is exactly what you are looking f...Not sure if this is exactly what you are looking for, but here is an example of 'randomly' sampling a stream into a window; so sampling happens as data rows enter the window -- as opposed to "out of the window".<BR/><A HREF="http://www.damirsystems.com/?p=449" REL="nofollow">Randomly Sampling a Stream</A><BR/>Regards.Damir Sudarevichttps://www.blogger.com/profile/02063725690452549304noreply@blogger.comtag:blogger.com,1999:blog-5951375.post-23407657603232287622009-02-10T19:24:00.000-05:002009-02-10T19:24:00.000-05:00About online versus offline processing:With my sug...About online versus offline processing:<BR/><BR/>With my suggestion, online processing is a special case of window processing, with a window of size 1. MATLAB could do a bit better because you can compile the code as a library and incorporate that directly into the CEP engine (actually, I like the term EPP and I think I'll start using it).<BR/><BR/>But I am curious why anyone would want to do Hanshttps://www.blogger.com/profile/03057096345613832279noreply@blogger.comtag:blogger.com,1999:blog-5951375.post-73371895982598726032009-02-10T16:57:00.000-05:002009-02-10T16:57:00.000-05:00Maybe CEP systems like Esper can just expand the l...Maybe CEP systems like Esper can just expand the language (or pre-defined functions) to include some of the more popular functions of R.<BR/><BR/>For example, a Coral8 statement could be:<BR/><BR/>CREATE WINDOW MyWindow<BR/>KEEP 5 MINUTES;<BR/><BR/>ON EXPIRATION<BR/>INSERT INTO MySampleWindow<BR/>SELECT SAMPLE(10)<BR/>FROM MyWindow<BR/><BR/><BR/>Imagine that MyWindow has a retention policy of 5 marchttps://www.blogger.com/profile/09487180059998380922noreply@blogger.comtag:blogger.com,1999:blog-5951375.post-78675960128791707802009-02-10T16:53:00.000-05:002009-02-10T16:53:00.000-05:00This comment has been removed by the author.marchttps://www.blogger.com/profile/09487180059998380922noreply@blogger.comtag:blogger.com,1999:blog-5951375.post-24493579849010262162009-02-10T16:45:00.000-05:002009-02-10T16:45:00.000-05:00I would also like to know how you can cooperate be...I would also like to know how you can cooperate between Coral8 and R, Matlab and alike. Hans earlier posted in his blog the window technique. If this is easy to implement it would be a good first step. On the other hand I would argue that such window technique does not allow online processing, by definition, because everytime the integrated app would compute the passed window in the whole. If we Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5951375.post-78729919983132940802009-02-10T09:08:00.000-05:002009-02-10T09:08:00.000-05:00It's a good point that R is not very fast in gener...It's a good point that R is not very fast in general, not to mention the cost of pushing the data to and from the runtime.Hanshttps://www.blogger.com/profile/03057096345613832279noreply@blogger.comtag:blogger.com,1999:blog-5951375.post-17661444035612952742009-02-10T01:45:00.000-05:002009-02-10T01:45:00.000-05:00If you just want to take a random sample of size f...If you just want to take a random sample of size from a window and compute some statistic (such as the mean) then you could do this with a custom aggregation UDF. I think it would be fairly straightforward in Coral8 using the C++ SDK. Of course it wouldn't look anything like the original R code, but it would be a lot faster than R.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5951375.post-52196067591695629002009-02-09T10:39:00.000-05:002009-02-09T10:39:00.000-05:00Do you like the R syntax particularly? I mean, you...Do you like the R syntax particularly? I mean, you could write a component to do this in C# pretty easily, right?Hanshttps://www.blogger.com/profile/03057096345613832279noreply@blogger.com