Questions tagged [consistency]

7 questions
4
votes
2 answers

Do coherence and transactional isolation mean the same?

About coherence vs consistency, https://en.wikipedia.org/wiki/Consistency_model says Coherence deals with maintaining a global order in which writes to a single location or single variable are seen by all processors. Consistency deals with the…
Tim
  • 5,405
  • 7
  • 48
  • 84
3
votes
2 answers

Multiple sources of truth - Optimistic concurrency & Eventual consistency

I have a couple of web applications that write to their own databases. They also share a few entities, for example, the customer entity. My business case is such that the same field for the same record can be updated around the same time in both the…
3
votes
1 answer

A size-type vs index-type conundrum

Suppose I'm writing C or C++ code which deals with... ok, let's make it citizens in a state. In this state, citizens have numeric id's (not strings - numbers); and for reasons of performance, or compatibility with other software, it is assumed there…
einpoklum
  • 2,478
  • 1
  • 13
  • 30
2
votes
2 answers

Is sequential consistency equivalent to performing memory accesses by a processes in program order and performing each memory access atomically?

In Fundamentals of Parallel Multicore Architecture, by Yan Solihin, p304 defines sequential consistency memory model: Overall, we can express programmers’ implicit expectation of memory access ordering as: memory accesses coming out of a processor…
0
votes
1 answer

Which techniques to follow to make a fast and consistent message consumer that writes to a RDBMS

I am building a consumer application that reads messages from a queue and runs basic sanitization and deduplication and persists them to an RDBMS. The functional requirements are messages must not be lost Validate and sanitize the arriving messages…
Sujal Mandal
  • 131
  • 1
  • 5
0
votes
2 answers

Why is it considered hard to maintain strong consistency in a distributed system?

Why can't you just use strongly consistent reads for all your DB reads, with retries on 500 responses? According to CAP theorem increasing consistency should probably lower availability, but can't the decreased availability (increased 500 responses)…
-2
votes
1 answer

Unexpected shutdown before a saga completion

Suppose we have some microservices and a saga will run to do a transaction in 6 microservices. What if the whole system dies(unexpected shutdown), on middle of saga process in the step number 4?(System died, So state is lost)