jruizgit / rules

Durable Rules Engine
MIT License
1.16k stars 206 forks source link

CONSIDER: Bloom filters based query on Alpha nodes #34

Open jruizgit opened 8 years ago

balawa commented 8 years ago

An interesting read concerning bloom filter and stream analytic https://www.igvita.com/2010/01/06/flow-analysis-time-based-bloom-filters/

jruizgit commented 8 years ago

Thanks for posting the article. Integrating time based bloom filters would be most useful for event analysis scenarios. Couple of interesting posts:

http://www.michaelnielsen.org/ddi/why-bloom-filters-work-the-way-they-do/ http://matthias.vallentin.net/blog/2011/06/a-garden-variety-of-bloom-filters/

In particular A2 in the last post. With the new Redis BITFIELD support (http://antirez.com/news/104), we might be able to write a very efficient, high performance implementation.

This is what I have in mind for user experience:

Durable.ruleset :a0 do
  when_all m.name.in(s.names) do
  end
  when_all m.name.not_in(s.names) do
    s.names.add m.name
  end
end
balawa commented 8 years ago

This could definitely be very interesting.