5 ms·
I've reached a point where my default design is relational database augmented with memcache/redis. The relational DB is the authoritative source of truth, redis
by scarface74 10y ago
I've reached a point where my default design is relational database augmented with memcache/redis. The relational DB is the authoritative source of truth, redis absorbs all (most) reads and memcache is, well a distributed cache. Writes go to both redis and relational. Redis data can always be rebuilt, and is regularly rebuilt, from relational data.
I'm really becoming a big fan of CQRS/event sourcing where we have two read models - one NoSql for live data and one relational for BI/Reporting. Events are stored separately in JSON because that's how they come in anyway through the API.
- remotehack 10y agoWow. Let the maintenance begin.
- scarface74 10y agoCQRS is not rocket science. In any case, your schema for your reporting database is usually different from your online database.