Discuss whether the following operations are idempotent:
i) Pressing a lift (elevator) request button;
ii) Writing data to a file;
iii) Appending data to a file.
Is it a necessary condition for idempotence that the operation should not be associated with any state?
The operation to write data to a file can be defined (i) as in Unix where each write is applied at the read-write pointer, in which case the operation is not idempotent; or (ii) as in several file servers where the write operation is applied to a specified sequence of locations, in which case, the operation is idempotent because it can be repeated any number of times with the same effect. The operation to append data to a file is not idempotent, because the file is extended each time this operation is performed.
The question of the relationship between idempotence and server state requires some careful clarification. It is a necessary condition of idempotence that the effect of an operation is independent of previous operations. Effects can be conveyed from one operation to the next by means of a server state such as a read-write pointer or a bank balance. Therefore it is a necessary condition of idempotence that the effects of an operation should not depend on server state. Note however, that the idempotent file write operation does change the state of a file.
You might also like to view...
Selecting elements that satisfy a set of conditions is known as __________.
a) distilling b) filtering c) purifying d) refining
To sort a table, you use the Ascending button that is located on the Home tab in the ________ group
A) Sort & Filter B) Find C) Arrange D) Records
The assignment operator is simply a question mark (?).
Answer the following statement true (T) or false (F)
When you create an alternate layout based on a page that has artwork, the artwork is copied to the alternate layout and automatically resized to fit the alternate layout.
Answer the following statement true (T) or false (F)