How to propagate changes to "counts"

Several places in the spec designate a change to a count as a side effect, e.g. receiving accepted Follow activity increases actor’s followers count. How do you propagate that new count to federated servers? Send an “Update” for the Actor object or for that specific followers collection?

1 Like

In my view, as a Client application’s developer, the main problem in updating Actor’s properties is to figure out if I need to update Actor’s object at all or not. So I think that the main task on ANY Actor object’s changes is to change the object’s “update” property.
If any recipient (app…) receives the Actor’s object (as a part of that Actor’s Activity… so it can trust the data…) and notices that local copy has older “updated” date, then that recipient (app) knows that locally stored object should be updated, including any “counts”. This will be that “propagation” of all properties and counts, I think :slight_smile:
Unfortunately, as I see, current ActivityPub implementations (what I see in Pleroma and in Mastodon) don’t have this property in Actor’s object at all :frowning:

Does watching for “Update” activities that target the actor/actor’s collections not tell you when to update, or are the current implementations not sending those?

Do you mean that when I receive activity “ActorA follows ActorB” I should assume that ActorB’s object is up-to-date at the date of the activity creation? In this exactly case I wouldn’t trust the activity at all, because it was not sent by ActorB (whose object I consider for update), and ActorA could use for his Activity outdated (or incomplete) ActorB’s object?!
Anyway, here we are talking now about guesses. But if we had “update” property in Actor object, we could simply compare dates?!

What I do mean is you’d fetch Actor B from its source when one of your users follows it, and then assume Actor B is up-to-date until Actor B sends you an “Update” activity for their actor object

Aha, so you are thinking about a way to make Fediverse (servers or client apps) know that some Actor’s property (e.g. count of posts by this Actor or count of Actor’s followers) changed.
As some properties (e.g. count of posts or likes) could change very often, I don’t think that any Actor’s object updates should be broadcasted (e.g. to other servers…)
If anybody is interested in current state they can easily query the source as you noted.
But do you think that if my ActorA follows ActorB, ActorA should receive not only ActorB’s Activities (which already may contain updated ActorB’s object), but separately explicit updates of the ActorB’s object??? Too much, I would say.
Anyway, having “update” property in the Actor’s object allows any client or server to know, how old is the object’s information. And update it if or when necessary.