We are planning to develop a geofence match of customers using streams. We are providing customer information with corresponding lat and long into streams. We also have set of geofence polygons (set of lat and long) configured and provided to streams. Now were are using geospatial toolkit available in streams to create polygons for all geofence polygon configuration provided and checking if the customer lies in polygon or not.
Currently this check of customer lying in geofence polygon is comparing each customer in all geofence polygons which we think is not a optimized solution.
We also planned to predefine the geofence polyons into fixed sets and create fixed set of operator in streams and pass customer information to these operators using split.
I need some suggestions on best way to divide geofences dynamically and increase processing speed. We would receive new / updated geofences polygon information periodically into streams which must be again used for matching customer information.
Any suggestions ??