wso2 - Siddhi Query for Geofence Entry Detection -


I'm trying to urge the events accomplishment when you entered a Geofence that detects any flight But it can not understand at all. Right query it

I have the following input stream definition:

  section GeofenceMulticasterConsumerStream (journeyId string, geofenceId string, withinGeofence bool, timestamp long)   

whenever I get a positional update for a flight, I genereated (there in this section for each Geofence an event system took about 10 such Geo-fence accomplishment capable of handling 10 * number Will get the positional update events)

This query I have started with:

  set Geofence Partition by GeofenceMulticasterConsumerStream.geofenceId; From each one = GeofenceMulticasterConsumerStream [GEofence inside == false] - & gt; B = GeofenceMulticasterConsumerStream [a.journeyId == b.journeyId and b.withinGeofence == true] in b.journeyId within 300000, b.geofenceId, b.timestamp selected as putting EnteredGeofenceStream division timeEntered geofencePartition  

However, it does mimic me Geofence Entry events, because it does match evaluates against each "B" event each "B" event (if that I have 5 event Jiofens , Which is the one after that, I get 5 Geofence Entry events)

Then I Not add trace some duplicate event it tried to avoid: [== false withinGeofence]

 Every = GeofenceMulticasterConsumerStream  - & gt; B = GeofenceMulticasterConsumerStream [a.journeyId == b.journeyId and b.withinGeofence == true] 300000 within select b.journeyId, b.geofenceId, timeEntered as b.timestamp, Geo-fence: hashEntry (b.journeyId, b.geofenceId , B.temestamp) Dip the stream in the entry duplicate EnteringFost partition by split the split duplicate enterprise only before the #stream window. Select exclusive (insertion )ind, gofenseID, time is included in the interfacefenstream. Geoffence: Hash Ancestor is a function that I created a unique hashode for entry event. 

However, I'm not curious to do this, as you have to keep a record of all the unique hashes in the first unique window, and it is worried that this is a memory leak. Looks a bit at the top because the hash will only apply to that point on time, and therefore I just need a first unique window that is valid for maximum two seconds to check the duplicates.

I think one is one of the big issues to me, I have a stream in which there are many flights and there are many gophones that have been explored from within, because I have seen that all the examples are very much I was thinking that I am trying to achieve something is not possible.

I appreciate any advice with it, because now I am running out of ideas!

Thanks in advance!

Since you are just trying to detect infection -> b, instead of sampling you here You can use 'sequence'.

In Siddhi, when you use a sequence, it corresponds consistently to events without any other events. On the contrary, the pattern allows to exist among other events

In addition to this, since many flights can enter the same geographical location evenly, you will not be able to enter the flight ID (Or travel id) (otherwise coz otherwise, X_outside -> Y_outside -> X_inside -> Y_inside, such as Flight X and Y, which will not be known). In this way, the transition of a particular flight from the external flight -> will always be correctly identified in the inside.

Once you use the correct segmentation with sequences, then you can detect the transition and there is no need to use the unique window.

See the sequences for more details.


Comments