When you have a Postgres replication setup (Note: Postgres Replication is totally separate topic and I'll create a different tutorial about it since it's more related to DB Administration than Application Development). your data will be in both databases. in this scenario you are writing into the primary DB, the process is happening in the following steps:
1) Customer 1 and 2 are both written in PrimaryDB.
2) Then Postgres Replication starts, replicating the newly written data from Primary DB to the Secondary DB(s).
3) both data can be read from secondary DB(s).
Note:
Here you are using one EntityManager for WRITING and one for READING and "Data Consistency" is guaranteed by the PG replication.
The Only Issue with this method is "Data Availability", data may not be available immediately in Secondary DB(s) after it written to the primary, due to the PG replication lag.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
When you have a Postgres replication setup (Note: Postgres Replication is totally separate topic and I'll create a different tutorial about it since it's more related to DB Administration than Application Development). your data will be in both databases. in this scenario you are writing into the primary DB, the process is happening in the following steps:
1) Customer 1 and 2 are both written in PrimaryDB.
2) Then Postgres Replication starts, replicating the newly written data from Primary DB to the Secondary DB(s).
3) both data can be read from secondary DB(s).
Note:
Here you are using one EntityManager for WRITING and one for READING and "Data Consistency" is guaranteed by the PG replication.
The Only Issue with this method is "Data Availability", data may not be available immediately in Secondary DB(s) after it written to the primary, due to the PG replication lag.