snappass
snappass copied to clipboard
Abstracting Storage Backends
Recently, I was able to deploy SnapPass to Google Cloud App Engine with very few code changes. Google Cloud does not offer a hosted redis service, but App Engine does have hosted memcache available.
My deployment, based on top of commit f776c7a, can be found here.
The changes required to make this work can be found here.
As you can see, most of the changes are commenting out anything related to redis and adding in the necessary App Engine config files.
Is there a standard way to begin abstracting storage backends such that a simple environment variable could be set to specify if the end user wants to deploy using redis, memcache on App Engine, etc.?
Would others be interested in this functionality?
👍