What is Nostr?
Fabio Manganiello /
npub1v78…kv0u
2023-08-18 16:16:32
in reply to nevent1q…e5f9

Fabio Manganiello on Nostr: npub1twk5s…ju70y The thing is that often (at least in my current case) you also ...

npub1twk5s4hw5dw2ut3z752yrak83a4acd67nu8wecz376wvqz8z9qgqmju70y (npub1twk…u70y) The thing is that often (at least in my current case) you also want to support idempotency in your application.

You often have some form of external, "logical" key (think of it as the URL of your resource), and if you do a `PUT` twice you want to insert the thing the first time, and do nothing (or update it) the second time.

The client-generated UUID approach won't solve this case. If you get two `PUT` requests with the same "logical" key but different primary key, you'll get two different records - and you'll have to deduplicate them later in the application layer.
Author Public Key
npub1v78mmuz20p6qd6nve30axhqu74avwn4f6z4grhug7755rat7wh3syukv0u