When can you call operation idempotent?

M. Dabulskis

The definition of idempotent in wikipedia is:Idempotence is the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the initial application.

The problem is: I have REST API PUT call, which updates properties of domain aggregate. Also, it fires event for each property, which was updated. Now if we have two exact the same PUT calls one after the other to our backend:

  1. First PUT call updates the properties of aggregate and fires lets say 5 events.
  2. Second PUT call updates the properties of aggregate, but do not fire any event, because the properties of aggregate did not change (first PUT call updated the values of aggregate properties).

The question is: is this operation idempotent?

ACV

Yes and No. It is idempotent from the data point of view. The data in the database won't change no matter how many times you execute the call. But it is not idempotent in the sense that some logging or other events might occur that would change the "Entropy" of the system :)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

What is an idempotent operation?

From Dev

Can `patch` be idempotent?

From Dev

why is the mongodb oplog is idempotent? Even for insert operation?

From Dev

Can you describe what is happening in this operation?

From Java

When monkey patching an instance method, can you call the overridden method from the new implementation?

From Dev

reasoning behind the constraints on when you can call a static method in a class definition

From Dev

Can you change the from number when sending SMS text during a call?

From Dev

Can you change the from number when sending SMS text during a call?

From Dev

When can you see the effect of your update, insert and delete during a Stored Procedure call?

From Dev

Why use callbacks when you can just call functions globally in Javascript?

From Dev

AngularDart custom filter call() method required to be idempotent?

From Dev

Why can't you call outerHTML on $(this)?

From Dev

can you use call or apply with new?

From Dev

Can you call multiple methods on one line?

From Dev

Can you a call a Sub that has an argument with a button?

From Dev

Can you call the same method on different threads?

From Dev

Can you retrieve the facetime call history?

From Dev

Can you put a function call in an AngularJS expression?

From Dev

When you call `release` instead `destroy` on connection?

From Dev

Javascript - call a function when you finish typing

From Dev

Disable message when you make a call in the cmd?

From Dev

Mock Date() when you call SimpleDateFormat method

From Dev

Cucumber - Can you go Then When Then?

From Dev

How can a .emacs file be made idempotent?

From Dev

How can I write a "idempotent" .Xmodmap

From Dev

What do you call it when the errors lead you in the wrong direction?

From Dev

Can you explain what this binary swapping operation is doing?

From Dev

Does chrome extension can save the operation you set on the extension?

From Dev

Mongoose wait an operation complete when using helpers functions to call

Related Related

  1. 1

    What is an idempotent operation?

  2. 2

    Can `patch` be idempotent?

  3. 3

    why is the mongodb oplog is idempotent? Even for insert operation?

  4. 4

    Can you describe what is happening in this operation?

  5. 5

    When monkey patching an instance method, can you call the overridden method from the new implementation?

  6. 6

    reasoning behind the constraints on when you can call a static method in a class definition

  7. 7

    Can you change the from number when sending SMS text during a call?

  8. 8

    Can you change the from number when sending SMS text during a call?

  9. 9

    When can you see the effect of your update, insert and delete during a Stored Procedure call?

  10. 10

    Why use callbacks when you can just call functions globally in Javascript?

  11. 11

    AngularDart custom filter call() method required to be idempotent?

  12. 12

    Why can't you call outerHTML on $(this)?

  13. 13

    can you use call or apply with new?

  14. 14

    Can you call multiple methods on one line?

  15. 15

    Can you a call a Sub that has an argument with a button?

  16. 16

    Can you call the same method on different threads?

  17. 17

    Can you retrieve the facetime call history?

  18. 18

    Can you put a function call in an AngularJS expression?

  19. 19

    When you call `release` instead `destroy` on connection?

  20. 20

    Javascript - call a function when you finish typing

  21. 21

    Disable message when you make a call in the cmd?

  22. 22

    Mock Date() when you call SimpleDateFormat method

  23. 23

    Cucumber - Can you go Then When Then?

  24. 24

    How can a .emacs file be made idempotent?

  25. 25

    How can I write a "idempotent" .Xmodmap

  26. 26

    What do you call it when the errors lead you in the wrong direction?

  27. 27

    Can you explain what this binary swapping operation is doing?

  28. 28

    Does chrome extension can save the operation you set on the extension?

  29. 29

    Mongoose wait an operation complete when using helpers functions to call

HotTag

Archive