HEADS-project / training

Training material to get started with the HEADS technologies
10 stars 16 forks source link

ThingML: Tutorial on CEP has not the same behavior in Java and JS #82

Closed brice-morin closed 9 years ago

brice-morin commented 9 years ago

JS (seems OK):

$ node main.js
LightSensor: send a value
HumiditySensor: send a value
OutdoorTempSensor: send a value
HeatingSensor: send a value
IndoorTempSensor: send a value
complexAlgo: 5 == 5
Is heating on? true
Is window open? true
Person is present: true
ALERT!! ALERT!! ALERT!!

Java (most likely not OK):

OutdoorTempSensor: send a value
IndoorTempSensor: send a value
HumiditySensor: send a value
HeatingSensor: send a value
LightSensor: send a value
Is heating on? true
Person is present: true

We can see that complexAlgo is never called, hence we never know that window is open, hence no alert.

brice-morin commented 9 years ago

Seems like it is related to the TTL of events. For some reasons, 50 ms was a bit short (though it should be more than enough, we have to see where things are getting slow)

brice-morin commented 9 years ago

OK, I just increased the default TTL so that examples we provide have a good chance to work. Then people could adjust this TTL if they need lowe rvalues.

lmouline commented 9 years ago

Hum... weird It's work well on my PC (on debian jessie)

brice-morin commented 9 years ago

well, let's blame it on Windows :-)