Tuesday, May 19, 2009

New distinct operator in Esper 3.1.0

REJOICE: Esper 3.1.0 got released yesterday and I am currently moving our code to use it.
A couple of leaks got fixed and some behavior have changed. But that's not what made do this post.
After reading through the changelog I discovered this little gem:
 - A new "every-distinct" operator has been introduced to the pattern language. Very similar to the "every" operator, this operator suppresses duplicate results received from sub-expressions based on a set of expressions returning distinct-values.

Before the this new keyword got introduced I had to create a separate data window and use the following query to fill it with unique events:
insert into collectwin select * from reader as tagevent where not exists (select * from collectwin as collected where collected.key=tagevent.key)
Thanks to the new keyword I can now define a pattern for that job:
pattern[every-distinct(res.value) res = ParsedEvents]
As I am doing ALE I need the parsed events to be unique within a certain time frame. To reset the set of unique events do the following:
pattern[every-distinct(res.value) (res = ParsedEvents where timer:within(5 sec))]

This makes the whole thing a lot easier and better looking :)


Tuesday, May 12, 2009

Recent Activities

The last few months were quite busy and once again it was my blog that had to suffer. We rewrote our whole middleware, I got into Esper, we had a big show in Orlando and I had to travel back and forth between Germany and the US.
But I didn't stop writing.
I finally pulled myself together to try write articles for software magazins. To my personal amazement it looks like as if people actually like the things I write ;)
The German Java Magazin published a 2 part series of articles on RFID and Open Source RFID tools in issues 4.09 and 5.09.
I mentioned before that I am writing on an article for the German Eclipse Magazin. The article was published in December 2008.
Yes, I know you won't be able to buy them as there are already new issues of both magazins out. I hope to be able to post links to the articles as both magazins tend to republish them online.