java - micro service timeout and transaction -


given micro service architecture, when call service timed out, caller give up. however, request fulfilled , new records inserted.
problem caller system determined request failed because of timeout. best way maintain transaction?

it impossible guarantee consistency between service consumer , service provider separated network. both request transmission , response transmission can result in errors , in edge cases response message might lost on wire without service provider noticing went wrong.

i think might terms "nullipotent" , "idempotent". first refers operations have no effects on service provider (e.g. no change in stored data such reading data), whereas second speaks operations can invoked number of times without changing outcome (e.g. calling delete 1 or ten times still means data gone, if alter calls return exception stating "data gone": data gone after call).

finally there operation neither of two, example "add new element list". forgot term it, these operations turn error handling nightmares have little no change of resuming operations after error in way guarantees same outcome, if there one, many or no error during request sequence.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -