0

I have a requirement to allow "business" users to create and edit rules on data ingested from input streams. The rules must be business-friendly and there cannot be any development cycles. Here is an example of what I am thinking:

"if weatherStation.id == 100 and weatherStation.temp < 33 and detectedPctWipersOn = 90% 
then return true 
else return false"

As weather station and connected vehicle streaming data is ingested, I need to apply this rule, but if the rule changes to say, detectedPctWipersOn = 75%, the rule must be applied in real-time without a re-deploy or restart. It needs to be data-driven.

Siddhi CEP (WSO2 CEP) appears to only support "deployed" rules. Are there any other CEP products that might provide fulfill what I need, especially if they play nice with KafkaStreams?

If I have to roll-my-own, is there a "streams" design pattern that is recommended on this problem?

Rajeev Sampath
  • 2,739
  • 1
  • 16
  • 19
Jason
  • 2,006
  • 3
  • 21
  • 36
  • Is your question related to Kafka Streams? I am not sure, if you use the right tag. – Matthias J. Sax Oct 13 '16 at 10:00
  • I removed Siddhi tag. Yes, I am looking for a business-friendly rules editor that integrates nicely Kafka Streams. I mentioned Siddhi only to show it does not meet my requirements for this question. – Jason Oct 13 '16 at 10:30
  • I was actually wondering if Kafka Streams tag was intended :) Was not clear to me from you question. Because I do not know Siddhi, I am not sure about the answer. However, from a Kafka Streams point of view, I do not see any problem why you should not be able to update the application with new rules. You only need to keep in mind, that if you start to scale out, if will be difficult to update all instances in a synchronized way. – Matthias J. Sax Oct 13 '16 at 17:46

1 Answers1

0

For this requirement, instead of using the Siddhi engine, try using CEP product. It comes with a query templating facility where you can have some predefined templates with only parameters exposed to the users to configure. eg: WeatherStationTemperature. Once a parameter is changed, internally CEP will redeploy the queries and the changes will take effect immediately.

This works very well for stateless queries like filters as in your example, but the state will be lost if you use windows, patterns etc. So you'll probably need to use database-backed tables/windows to properly implement such use cases.

Rajeev Sampath
  • 2,739
  • 1
  • 16
  • 19