tidwall / tile38

Real-time Geospatial and Geofencing
https://tile38.com
MIT License
9.09k stars 569 forks source link

Hooks/Chans Persistence when the AOF is disabled #352

Open temporaryaccount opened 6 years ago

temporaryaccount commented 6 years ago

Does Tile38 save somewhere else (besides the AOF) the registered hooks/chans so it could reload them after a restart?

In my use-case I don't care much about the data, and the data is being updated very frequently, so the AOF is disabled, but I care about the registered geofence hooks, so I want them to persist.

Is there a solution?

Thanks!

tidwall commented 6 years ago

All data, hooks, and channels are stored in the AOF.

Perhaps one option, assuming that your geofences don't update very often is to make a script that re-loads them when Tile38 starts or when your middleware server connects to Tile38.

temporaryaccount commented 6 years ago

All data, hooks, and channels are stored in the AOF.

That's unfortunate. Logically, the hooks and the channels are meta-data, and could be kept separately from the data. If you would just consider doing so (or having an option) in a future version that would be all I'm asking for. Thanks.

Perhaps one option, assuming that your geofences don't update very often is to make a script that re-loads them when Tile38 starts or when your middleware server connects to Tile38.

The number of geofences can be many, but I think preloading is the way to go. Or I could just leave the AOF turned on and periodically issue AOFSHRINK command, but I still don't know how well and safely shrinking works and how much resource it uses while working.

Thank you.