Idempotence

Idempotence (UK: /ˌɪdɛmˈpoʊtəns/,[1] US: /ˈaɪdəm-/)[2] is the property of certain operations in mathematics and computer science whereby they can be applied multiple times without changing the result beyond the initial application.The concept of idempotence arises in a number of places in abstract algebra (in particular, in the theory of projectors and closure operators) and functional programming (in which it is connected to the property of referential transparency).The term was introduced by American mathematician Benjamin Peirce in 1870[3][4] in the context of elements of algebras that remain invariant when raised to a positive integer power, and literally means "(the quality of having) the same power", from idem + potence (same + power).In both cases, the composition is simply the identity function, which is idempotent.In computer science, the term idempotence may have a different meaning depending on the context in which it is applied: This is a very useful property in many situations, as it means that an operation can be repeated or retried as often as necessary without causing unintended effects.Similarly, a request for changing a customer's address to XYZ is typically idempotent, because the final address will be the same no matter how many times the request is submitted.However, a customer request for placing an order is typically not idempotent since multiple requests will lead to multiple orders being placed.Nonetheless, executing the entire sequence once produces the output (3, 5), but executing it a second time produces the output (5, 5), so the sequence is not idempotent.Of the major HTTP methods, GET, PUT, and DELETE should be implemented in an idempotent manner according to the standard, but POST doesn't need to be.As in the example above, reading data usually has no side effects, so it is idempotent (in fact nullipotent).PUT and DELETE with unique identifiers reduce to the simple case of assignment to a variable of either a value or the null-value, respectively, and are idempotent for the same reason; the end result is always the same as the result of the initial execution, even if the response differs.Similarly, PUT and DELETE requests with nonspecific criteria may result in different outcomes depending on the state of the system - for example, a request to delete the most recent record.In each case, subsequent executions will further modify the state of the system, so they are not idempotent.In event stream processing, idempotence refers to the ability of a system to produce the same outcome, even if the same file, event or message is received more than once.In a load–store architecture, instructions that might possibly cause a page fault are idempotent.So if a page fault occurs, the operating system can load the page from disk and then simply re-execute the faulted instruction.In a processor where such instructions are not idempotent, dealing with page faults is much more complex.[citation needed] In service-oriented architecture (SOA), a multiple-step orchestration process composed entirely of idempotent steps can be replayed without side-effects if any part of that process fails.For example, resuming a file transfer, synchronizing files, creating a software build, installing an application and all of its dependencies with a package manager, etc.
On / Off buttons of a train's destination sign control panel. Pressing the On button (green) is an idempotent operation, since it has the same effect whether done once or multiple times. Likewise, pressing Off is idempotent.
A typical crosswalk button is an example of an idempotent system
Idempotent (ring theory)Idempotent matrixdestination signoperationsmathematicscomputer scienceabstract algebraprojectorsclosure operatorsfunctional programmingreferential transparencyBenjamin Peircebinary operatormonoidnatural numbersmultiplicationadditionidentity elementabsorbing elementinverse elementpower setset unionset intersectionBoolean domainlogical disjunctionlogical conjunctionGCD domainBoolean ringTropical semiringring of quadratic matricesdeterminantidentity matrixfunction compositionfixed pointabsolute valueconstantidentity functionceilingfractional partcomplex numbersubgroup generatedconvex hullaffine spaceclosureinteriortopological spaceKleene starKleene plusendomorphismsvector spaceprojectionsinteger sequenceReentrant (subroutine)Stable sortCommand query separationimperative programmingsubroutineside effectspure functiondatabaseHypertext Transfer Protocolevent stream processingload–store architecturepage faultoperating systempretty-printingservice-oriented architecturesynchronizing filessoftware buildpackage managerelevatorcrosswalk buttonsBiordered setClosure operatorFixed point (mathematics)Idempotent of a codeIdempotent analysisIdempotent relationInvolution (mathematics)Iterated functionList of matricesNilpotentOxford English DictionaryMerriam-Websternecessary conditionWayback MachineJohn OusterhoutFree On-line Dictionary of ComputingCambridge University PressEncyclopedia of MathematicsEMS PressHazewinkel, MichielLang, Serge