@eyeinthesky @smallcircles (funnily enough, in AT Protocol, we only have collections we add records to, all the social layer is defined by applications above, which receive all the changes to records and infer meaning from that)
Discussion
@eyeinthesky @smallcircles (funnily enough, in AT Protocol, we only have collections we add records to, all the social layer is defined by applications above, which receive all the changes to records and infer meaning from that)
@eyeinthesky I think Add / Remove should be used for extended collections. Like, Announce etc look like legacy / tech debt to me.
@silverpill@mitra.social add and remove feel more like building blocks than actual activities.
It would never capture the nuance of many of the activities that it would purportedly represent.
@julian @thisismissem @eyeinthesky @mariusor @smallcircles
Yes, they are building blocks, together with Create, Update and Delete. Everything else can be constructed from them.
@julian @thisismissem @eyeinthesky @mariusor @smallcircles Maybe Offer, Accept and Reject are needed too. Follow can be replaced with Offer(Relationship), I am not sure if there's a way to do it with Add / Remove alone.
@eyeinthesky @smallcircles because the activity isn't just about the change of the collection, but also notifying the other party our social intention. It could have required Like + Add, but that feels cumbersome and developers love side-effects.
@thisismissem @smallcircles The weird thing about Like+side_effects vs Add(Like activity to “likes collections”) is that the side effect is Add Like to “likes collection”. lol They are both one inbox activity.
@eyeinthesky @thisismissem @smallcircles i would use as:result for this -- the *result* when you Accept the Like activity is to Add it to the likes collection... if you care about that level of detail. most people only care about the Like. maybe even less than that! (synthesizing a statement such as :bob :likes :this.)
@trwnh That's a neat idea. Looks like we can get rid of side effects completely by making result a special property.
@silverpill @eyeinthesky @thisismissem @smallcircles the activity properties don't get used very much but they probably should be. the as:actor performs the as:Activity on the as:object to the as:target from the as:origin with the as:instrument leading to the as:result. and maybe in response to the as:inReplyTo? maybe with an as:summary? there are properties of as:Object that would fit well on most as:Activity nodes, although i think they are two distinct processing models (just closely related)
@silverpill @eyeinthesky @thisismissem @smallcircles which is to say, as2 has an "object processing" mode (check name, summary, content, icon, image, ... and render generic display) and an "activity processing" mode (check actor, object, ... and render an activity in the stream) which coexist. the "activity processing" is underutilized in fedi, but it's the more interesting one because it lets you unify a lot of disparate models without forcing everything to be a Note (checkins, scrobbles, etc)
@eyeinthesky @smallcircles that's the thing though! The likes collection doesn't contain activities, it contains objects.
@thisismissem @eyeinthesky @smallcircles likes contains Like activities; shares contains Announce activities; the exception is followers not containing the Follow activity (or not having a follows collection) (or not doing the better thing which is subscription management)
@thisismissem @smallcircles Per the AP spec… “The side effect of receiving this in an inbox is that the server SHOULD increment the object's count of likes by adding the received **activity** to the likes collection if this collection is present.” (emphasis mine)
@eyeinthesky @smallcircles I suspect this is incorrect. I am pretty sure the likes collection contains only objects, not the activities.
@evan was there an erratum for this? I feel like there was?
@thisismissem @smallcircles @evan It makes sense to me. Someone liked a local object. We wouldn’t add the liked object to the liked object “likes” collection (it would be the same object). It seems that only the activity (and collection count) is interesting. Maybe you are thinking about the “liked” collection? (Different topic, but it seems that this *should* be a collection of activities too. Dropping the activity loses info such as the Like timestamp.)
@eyeinthesky @smallcircles and how do I infer social meaning from you adding an object to a collection? I could only do that if I was adding an activity to a collection
@thisismissem @smallcircles I’m not sure how you define “social meaning”, but if you Add a Boop to my boops collection you socially booped me. I suppose a Boop activity is needed either way, but overloading the meaning to include implicit collection management seems dubious to me.
@eyeinthesky @smallcircles yeah, and this is a side effect of the activity (e.g., Like) adding to both my likes collection and the likes collection on your post.
So would my add be targeting two collections with an Activity?
What about Announce? That's add to my outbox, add to my boosts collection, and add to your post's boost collection.
@eyeinthesky @smallcircles (funnily enough, in AT Protocol, we only have collections we add records to, all the social layer is defined by applications above, which receive all the changes to records and infer meaning from that)
I just responded in the other thread about #ForgeFed way of dealing with Issues and PR's, emphasizing the actor model in the #ActivityPub specs.
Guess it depends on the nature of your extension and its desired functionality how you model things, but ForgeFed chose to have a dedicated actor, a TicketTracker, to manage the collection. Big advantage is that it become a truly encapsulated service with its own business logic, fronted by an AP actor for interoperable network communication.
@thisismissem @smallcircles I know feelings will vary, but it doesn’t feel cumbersome to me. It seems more logically consistent and less functionally redundant. Side-effects can still be defined for specific target collections. What do you recommend for extension collection management?
@eyeinthesky @smallcircles yeah, there's those that like side-effects and those that dislike side-effects. Both are valid, AP just chose side effects.
I'm not sure I understand your question
@thisismissem @smallcircles If I define an extension that uses a collection, should I define a special activity for managing the collection instead of using Add/Remove?
@eyeinthesky @smallcircles you could, but you don't necessarily have to. Depends if adding to that collection has a social action besides the add I think.
Say I have a boops collection which contains actors I've booped. I could have a Boop activity with a side effect (because I want them to know I've booped them), or I could not, and just notify them that I added their Actor to this Collection.