Idempotenza significa che un'operazione produce lo stesso risultato indipendentemente dal fatto che venga eseguita una volta o più volte. È cruciale nei sistemi distribuiti perché i retry e i messaggi duplicati sono inevitabili — le operazioni idempotenti rendono questi scenari sicuri.
Che cos'è l'idempotenza
An operation is IDEMPOTENT if doing it MULTIPLE times has the SAME effect as doing it ONCE:
→ "set balance to 100" → idempotent (same result however many times)
→ "add 100 to balance" → NOT idempotent (each call changes it → wrong if duplicated!)
→ in HTTP: GET, PUT, DELETE are idempotent; POST typically is NOT
