What do you do when idempotency is not possible? If you have Relational databases, how do folks tackle this?
I can understand that it would be excellent for storing search indexes and non-relational databases though.
What do you do when idempotency is not possible? If you have Relational databases, how do folks tackle this?
I can understand that it would be excellent for storing search indexes and non-relational databases though.
Other things are hard to make idempotent but it's stil practical. Examples of this include operations like "delete all rows matching query Q". This either means "delete all rows for now and forevermore" or "delete all rows that exist at time T". In either case new rows matching Q might arrive in the future (but be antedated to the past) and you have to store the operation around in some way to apply the delete operation in the future. This can be easy if your query is easy to represent, and there is a limited class of such queries.
Sorry, it's hard to be precise about this in comments. The bottom line is Gizzard is not perfect for everything but idempotency is worth jumping through hoops a lot of the time (Gizzard or no!)
INSERT INTO table (id, a, b) VALUES (1,2,3)
ON DUPLICATE KEY UPDATE a=2, b=3;