New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pub/sub for detecting data modification #2
Comments
Another thing to keep in mind is that postgres supports a pub/sub feature. There's a performance comparison here: |
redis is going to be used by Batter anyways, so it's a moot point. |
The new architecture expects that a third party is updating the data store when information like this changes. The role of a torrent tracker is to simply read from the data store and update existing values. It shouldn't be the tracker's job to attempt to synchronize with changes in other programs. |
Currently, the database is completely reloaded every
Intervals.DatabaseReload
seconds. This is obviously very inefficient, as well as potentially dangerous, but at the time it was written it needed to be compatible with the existing tracker software that was in use.The way data changes should be handled is with a publish/subscribe architecture. My plan is to use redis for this. There will need to be a "deleted" channel and a "modified/new" channel.
I'm not sure if it'd be better to pass in just the modified IDs and have the tracker hit the database, or if it'd be better to pass the entire object over redis.
The text was updated successfully, but these errors were encountered: