This question is regarding Datomic in the context of spark streaming. I have two tables T1 and T2. Updates happening on these 2 tables (updated record) may go to (get processed) any of two machines M1 and M2.
I want to take join of T1 and T2 records on M1 and M2 as and when new records of T1 or T2 arrive on M1 or M2. Here the problem is M1's and M2's cache may contain, some data of both T1 and T2.
If new T1 record arrives on M1 then on M1, T1 record will be joined with corresponding record of T2 (cached on M1, which could be stale). At the same this/corresponding T2 record got updated and received on M2. Now on M2, T2 record will be joined with corresponding record of T1 (cached on M2, could be stale) and which got just updated and being processed on M1.
In this situation both M1 and M2 will compute join of T1 and T2 records in incorrect way, because both use cached/stale values of records and changes in T1 and T2 record (novelty info propagation) though committed to backend DB through transactor, has not reached M1's and M2's cache.
Is this situation possible in Datomic and how to solve this? Also is Datomic a good choice for such types of use-cases?