Activity delivery and followers caching

Hello,

if I got it correctly, when delivering an activity to targets, an originating server must post itself the items to various (shared) inboxes, and receiving server may deliver to target unknown to originating servers (7.1.2 Forwarding from Inbox).

So if my server A wants to deliver an item which is a reply to a note from actor B_actor from server B, it needs to get all followers of B_actor, and thus get the collection from B.

As I don’t want to make requests to retrieve followers each time I send a reply to this actor, I’ll want to cache followers of B_actor on my server A, right?

Thus I wonder how I’m supposed to do this efficiently? I don’t see mechanisms to be notified when there is a new followers to B_actor, or if a former follower did unfollow they.

How are various ActivityPub projects managing this? Do you get fresh followers list each time, do you cache for a limited time? Did I misunderstand something?

Thanks

You can’t necessarily fetch a remote actor’s followers, I think you’re meant to send the activity to the actor and that server is expected to forward it

Thank for your answer.

So it’s the receiving server which forwards the messages? I understood that it was done the other way around, but after reading again ActivityPub it seems to be the case indeed.

I think that I have misunderstood due to:

It makes more sense, and it’s the way it’s done in other protocols (XMPP notably).