I am developing a multi-player game in Python with a flag interface, and I use it as an opportunity to learn more about NoSQL's way of doing things.
Redis seems to be suitable for some of the things I need for this application, including storing server sessions and other temporary data, for example. what games are going on, who is online, etc. There are also some good Flask / Redis recipes that have made things very easy so far.
However, there are still some things in the data model that I would rather live inside of a traditional RDBMS, including user accounts, game logs, etc. It's not that Redis cannot do this, but I just think RDBMS is more suitable for them, and since Redis wants everything in memory, it seems to make sense to βstoreβ some of this data on disk.
I do not have a good strategy for how to make these two data stores happy together. Using ORMs such as SQLAlchemy and / or redisco seems fair, because ORMs want to own all the data that is part of their data model, and there are inevitable times when I need classes from one ORM to know about classes from another (e.g. "users are on RDBMS, but games are on Redis, and games have users participating on them.)
Does anyone have experience deploying python web applications using a NoSQL store like Redis for some things and RDBMS for others? If so, do you have any strategies for working together?
source share