Commit Graph

20 Commits

Author SHA1 Message Date
tidwall f5efc40d48 wip: MVT output 2022-04-21 15:00:17 -07:00
tidwall 241117c7ba Added BUFFER option for Within and Intersects
This commit allows for buffering any GeoJSON object.

For example:

    INTERSECTS fleet BUFFER 1000 OBJECT {...LineString...}

This will buffer add a 1 kilometer buffer to a linesting and
search the 'fleet' collection for all objects that
intersect the buffered linestring.

This commit also allows for performing INTERSECTS with a POINT
type. Thus allowing for a polygon-over-point operation, which is
an inverted point-in-polygon.
2021-12-09 18:14:50 -07:00
tidwall 18438e5783 Use same input args for command functions 2021-09-13 10:52:20 -07:00
tidwall 8829b8ffc3 Change hooks collection type from hashmap to btree
This commit changes the collection type that holds all of the
hooks from a hashmap to a btree. This allows for better
flexibility for operations that need to perform range searches
and scanning of the collection.
2021-09-13 10:02:36 -07:00
tidwall 83094b2740 Update hook expiration logic 2021-09-12 09:55:58 -07:00
tidwall c686b87dc2 Return hook ttl with HOOKS request 2021-09-12 09:03:05 -07:00
tidwall c8389fe52c Fix memory leak with group id
This commit fixes a memory leak that was being caused by hooks
hanging on to the geofence group ids past the life of the object.
2021-08-20 05:00:14 -07:00
tidwall 6b08f7fa9e Code cleanup
- Removed unused functions and variables
- Wrapped client formatted errors
- Updated deprecated packages
- Changed suggested code patterns
2021-03-31 08:13:44 -07:00
tidwall 9998e03f6f Optimization for non-cross geofence detection
This commit fixes a performance issue with the algorithm that
determines with geofences are potential candidates for
notifications following a SET operation.

Details

Prior to commit b471873 (10 commits ago) there was a bug where
the "cross" detection was not firing in all cases. This happened
because when looking for candidates for "cross" due to a SET
operation, only the geofences that overlapped the previous
position of the object and the geofences that overlapped the new
position where searched. But, in fac, all of the geofences that
overlapped the union rectangle of the old and new position should
have been searched.

That commit fixed the problem by searching a union rect of the
old and new positions. While this is an accurate solution, it
caused a slowdown on systems that have big/wild position changes
that might cross a huge number of geofences, even when those
geofences did not need actually need "cross" detection.

The fix

With this commit the geofences that have a "cross" detection
are stored in a seperated tree from those that do not. This
allows for a hybrid of the functionality prior and post b471873.

Fixes #583
2020-10-23 09:51:27 -07:00
tidwall c084aeedc2 Code cleanup
This commit cleans up various Go code in the internal directory.
- Ensures comments on exported functions
- Changes all *Server receiver in all files to be "s", instead
  of mixed "c", "s", "server", etc.
- Silenced Go warnings for if/else with returns.
- Cleaned up import ordering.
2019-10-30 10:17:59 -07:00
tidwall 639f6e2deb Replaced boxtree for rbang 2019-09-12 18:42:53 -07:00
tidwall f7888c1edf Fixed malformed json for chans command
Mentioned by ds2xor on Slack
2019-08-03 10:10:28 -07:00
tidwall 8c69fbff31 Fixed clients blocking while webook sending
Closes #428
2019-03-16 15:43:33 -07:00
tidwall 762607dc0a Added geofence delivery counter 2019-03-14 11:23:23 -07:00
Steven Wolfe fd20190bff Verify hook names match for processing 2019-02-22 15:58:13 -07:00
Steven Wolfe a5fbcf5f15 Ensuring channel publish order 2019-01-09 00:23:53 -07:00
tidwall 6b2fc1f37f Fix multiple matches on different key hooks 2018-11-29 15:15:26 -08:00
tidwall 8b29e98359 Optimized spatial index for fences 2018-11-23 18:15:14 -07:00
tidwall f2c217c216 Refactor and comment command details 2018-11-23 15:53:33 -07:00
tidwall 555e47036c Replaced net package with evio
- Added threads startup flag
- Replaced net package with evio
- Refactored controller into server
2018-10-28 15:51:47 -07:00