4 ms·
UUID is not enough to prevent duplicate resource creation. Consider the following steps: 1. Receive a request with uuid, 2. Persist the fact that system receive
by farazbabar 8y ago
UUID is not enough to prevent duplicate resource creation. Consider the following steps: 1. Receive a request with uuid, 2. Persist the fact that system received this request, 3. who or what processes it? Even if you are working off atomic persistence, the resource creation process (the kick-off process) needs to maintain the state that it plucked one off the queue or table, atomically update the state in persistence as it creates the resource somewhere else and log the successful creation of this resource as yet another entry in the persistence store. This way, requests that exceed their SLA can be retried and the downstream systems must act with correct idempotent behavior in order for all of this to work correctly in the presence of failures.
It is all very technically possible, but it goes beyond just a UUID (in other words, UUID is necessary but not sufficient).
- Anderkent 8y agoThe issues you list don't really seem to be relevant in regard to duplicate resource creation? They're just about handling creating the resource in the first place. As long as the uuid is persisted you can redirect all attempts to recreate that id to the right job/queue/whatever actually backs resources.