Consistency is Consistently Undervalued
kevinmahoney.co.uk
Consistency is Consistently Undervalued
1–10 of 131 posts
Re: Consistency is Consistently Undervalued
#2That floats on high o'er vales and hills,
When all at once I saw a crowd,
A host, of golden daffodils;
Beside the lake, beneath the trees,
Fluttering and dancing in the breeze.
Re: Consistency is Consistently Undervalued
#3And twinkle on the milky way,
They stretched in never-ending line
Along the margin of a bay:
Ten thousand saw I at a glance,
Tossing their heads in sprightly dance.
Re: Consistency is Consistently Undervalued
#4Still, it's funny how banking seems to be the canonical example for why we need transactions given that most banking transactions are inconsistent (http://highscalability.com/blog/2013/5/1/myth-eric-brewer-on...).
Re: Consistency is Consistently Undervalued
#5And in case you think there's a general solution to that problem, there isn't: https://en.wikipedia.org/wiki/CAP_theorem Still, it's funny how banking seems to be the canonical example for why we need transactions given that most banking transactions are inconsistent ( http://highscalability.com/blog/2013/5/1/myth-eric-brewer-on... ).
It's a useful example because it shows how there can be serious consequences for getting it wrong.
Re: Consistency is Consistently Undervalued
#6And in case you think there's a general solution to that problem, there isn't: https://en.wikipedia.org/wiki/CAP_theorem Still, it's funny how banking seems to be the canonical example for why we need transactions given that most banking transactions are inconsistent ( http://highscalability.com/blog/2013/5/1/myth-eric-brewer-on... ).
Well, they're eventually consistent. It's not like it hasn't been thought through. :) It's a useful example because it shows how there can be serious consequences for getting it wrong.
Re: Consistency is Consistently Undervalued
#7You are using mysql, you make a transaction with say deposit and withdraw.
What happens on the mysql machine if you pull the plug exactly when mysql has done the deposit but not the withdraw?
The ONLY difference between SQL transactions and NoSQL microservice transactions is the time between the parts of a transaction.
Personally I use a JSON file with state to execute my NoSQL microservice transactions and it's alot more scalable than having a pre-internet era SQL legacy design hogging all my time and resources.
Re: Consistency is Consistently Undervalued
#8But consider this: You are using mysql, you make a transaction with say deposit and withdraw. What happens on the mysql machine if you pull the plug exactly when mysql has done the deposit but not the withdraw? The ONLY difference between SQL transactions and NoSQL microservice transactions is the time between the parts of a transaction. Personally I use a JSON file with state to execute my NoSQL microservice transac…
Nothing bad -- the deposit will never be seen. It sounds like you need to read up on what ACID means.
(EDIT: Clarification)
Re: Consistency is Consistently Undervalued
#9But consider this: You are using mysql, you make a transaction with say deposit and withdraw. What happens on the mysql machine if you pull the plug exactly when mysql has done the deposit but not the withdraw? The ONLY difference between SQL transactions and NoSQL microservice transactions is the time between the parts of a transaction. Personally I use a JSON file with state to execute my NoSQL microservice transac…
A transaction means that the amended state is not visible to any readers until it has been fully committed. Pulling the plug means the transaction is lost, and the writer knows that it was not committed (and so can try again).
Re: Consistency is Consistently Undervalued
#10But consider this: You are using mysql, you make a transaction with say deposit and withdraw. What happens on the mysql machine if you pull the plug exactly when mysql has done the deposit but not the withdraw? The ONLY difference between SQL transactions and NoSQL microservice transactions is the time between the parts of a transaction. Personally I use a JSON file with state to execute my NoSQL microservice transac…
Nothing happens. And the client discovers that the connection to the db was closed before the 2 phase commit was done and gives an error to the user.