News for hackers. Stuff that matters.
Re:REST and long-running jobs (2014) by DougWebb on Saturday December 01, 2018 @10:40AM (#18577181)
If your IDs are completely unique, you could add them to a Bloom filter [0] when cleaning up the resource. Then you could use that to determine if an incoming ID has possibly been used before or definitely not.

[0] https://en.wikipedia.org/wiki/Bloom_filter

Re:REST and long-running jobs (2014) by striking on Saturday December 01, 2018 @01:30PM (#18578073)
Bloom filters are probabilistic, meaning they don't always produce the right result. From the article you posted:

> False positive matches are possible, but false negatives are not – in other words, a query returns either "possibly in set" or "definitely not in set". Elements can be added to the set, but not removed (though this can be addressed with a "counting" filter); the more elements that are added to the set, the larger the probability of false positives.

So I don't think they're the right choice for this problem, if you actually depend on the result "not here" vs "never was here" being right.

Re:REST and long-running jobs (2014) by jaggederest on Saturday December 01, 2018 @12:06PM (#18577627)
Or you could just have your IDs be monotonically increasing and look at the minimum. Any task prior to that number is "410 Gone" by definition.