samedi 30 novembre 2019

Software Architecture - JPA Switch To Temporary Tables Dynamically?

Let's assume the following: We have N related tables in which data is coming every few seconds or so and the data is monitored by users. The goal is at time T1 to stop persisting into the N tables but rather somewhere else and later at time T2 to start persisting into the N tables again and migrate the data persisted between T1 and T2 into the N tables.

One good solution to this is by using caching for the period T1 - T2 but in this case the data is somewhat big so this is not going to solve it.

Another solution is (if it's possible) to create temporary tables at T1 and point all of the entities into the newly created tables. Then migrate the data at T2, point back the entities into the original tables and drop the temporary tables.

I know this is a bit off topic and I would like a recommendation for where I can learn more and ask architectural questions?

Aucun commentaire:

Enregistrer un commentaire