Mark Redis database backend as deprecated #14679
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Redis isn't really a good key-value database but more of a cache.
This is evidenced by how it presents itself and stuff like eviction algorithms, which would cause terrible data loss if applied to Minetest worlds, as well as keeping all data in RAM, which is inconvenient and unnecessary for MT.
A big selling point for redis is also distributedness, which is relevant for web applications (lots of concurrent processes, clusters, ...) whereas Minetest is a single-threaded, single-instance application.
Description
There's probably nobody really using redis so I propose deprecating and eventually removing it.
This PR both adds a deprecation message and will automatically turn all Redis access read-only with 5.10.0 (or whichever version is next).
Alternatives
People who require a networked database can switch to Postgres.
People who don't can switch to SQLite or LevelDB.
Worth noting that both Postgres (own implementation) and SQLite (via the OS) keep often used data right in RAM, so this isn't a property exclusive to Redis.
If someone absolutely wanted to remove disk access latency from world loading they can use sqlite on tmpfs and I'm sure postgres can also can also be configured in this manner.