wiki.trwnh.com/content/tech/spec/activitypub/shortcomings/resource-vs-procedure-call.md
2024-01-11 11:42:59 -06:00

2.4 KiB
Raw Blame History

+++ +++

is there any idempotency in processing activities, either from a C2S or S2S perspective? I have seen it proposed (albeit semi-unseriously) that you could send multiple Follow or Like activities in order to represent a “super follow” or a “super like”. The only explicitly idempotent bit is the side effect of adding the object to an unordered Collection, which is technically a set and therefore theoretically cant contain duplicates. A more “common usage” interpretation would hold that follows and likes should be idempotent, but theres nothing actually establishing this one way or the other. The most naive implementation of, say, C2S or S2S Like, is to handle each Like separately if each activity uses a different id. It then follows that you could post 10 likes of the same object and subsequently undo 3 of those specific activities. And for what its worth, adding each activity to either a Collection or an OrderedCollection will not be deduplicated, because each of those activities has a different id. Youll effectively need to add an implementation quirk that tries to dedupe activities by their shape rather than by their id, in which case… of what purpose is the id? Why bother looking up the original id at all?

I bring the previous paragraph/point as an example because I assume blocks are idempotent in “common usage”. If this is indeed the case, then perhaps this should be stated as explicit guidance, and all such “idempotent activities” should be identified clearly. But I can also foresee challenges in trying to establish a conclusive judgement on this. Look no further than Announce on Twitter and Twitter-like systems, the “retweet” can only be performed once, but on Tumblr and Tumblr-like systems, the “reblog” can be performed any number of times, including in direct succession. Similar reasoning can be extended to pretty much any other activity type. In fact, if you treat all activities as generic posts or items in the “activity stream”, you might not care if someone does a Follow of the same person multiple times in a row. There is a disconnect between each activity as a resource and each activity as a procedure call. Im not entirely sure that this disconnect can be fully reconciled.

basically you are sending a resource and expecting it to be interpreted in such a way that it has side effects... but the side effects are underspecified. kinda makes you appreciate XRPC from atproto, huh