3 ms·
An alternate pattern goes like this: 1. Create new data model and adjust reads to read from the new model first and fall back to the old model. Update ALL you
by YZF 10y ago
An alternate pattern goes like this:
1. Create new data model and adjust reads to read from the new model first and fall back to the old model. Update ALL your readers first.
2. Change writes to use the new model.
3. Now you have different options. You can leave things as they stand. You can actively migrate data from old to new. You can do a lazy migration, for example, only when your read old data you migrate it.
There are some gotchas depending on your system specifics, esp. races between writes from the migration process and writes coming from the application. How you address those depends on the specifics of your situation...