4 ms·
I’ve heard ActivityPub has mixed reviews. Perhaps someone here with a little more expertise can answer this question. Does ActivityPub have a batching mechanis
by serverholic 4y ago
I’ve heard ActivityPub has mixed reviews. Perhaps someone here with a little more expertise can answer this question.
Does ActivityPub have a batching mechanism?
Imagine you are on server A and you have 3000 followers on server B. If you create a post do 3000 messages get sent to server B? Or just one?
- jakewins 4y ago> 7.1.3 Shared Inbox Delivery > For servers hosting many actors, delivery to all followers can result in an overwhelming number of messages sent. Some servers would also like to display a list of all messages posted publicly to the "known network". Thus ActivityPub provides an optional mechanism for serving these two use cases. From https://www.w3.org/TR/activitypub/#outbox-delivery https://www.w3.org/TR/activitypub/#outbox-delivery
- zimpenfish 4y agoYou don't necessarily have a sharedInbox though, I think?
- nightpool 4y agoServers are not required to provide a shared inbox, but if they want to enable batching behavior they can. Not sure if that's what your asking?
- zimpenfish 4y agoAFAIUI yes, you will probably get 3000 messages sent because each follower has their own inbox. There is a potential for batching though - "a server MAY reduce the number of receiving actors delivered to by identifying all followers which share the same sharedInbox who would otherwise be individual recipients and instead deliver objects to said sharedInbox" - if a bunch of the 3000 followers have the same sharedInbox (which presumably the receiving server has somehow magicked up?[1]), then your server can do a bulk delivery to that for those followers. [1] I guess you might make them for specific celebrities if your server has a high density of followers? grepping the Pleroma source doesn't seem to throw up any obvious "automatically make them" logic.
- nightpool 4y agoGenerally, all followers on a single server share the same sharedInbox. To a first approximation, that's what "server" means on ActivityPub—sharing a "batch" inbox you can deliver to.
- zimpenfish 4y ago> Generally, all followers on a single server share the same sharedInbox. You mean that all followers of Celebrity X on instance Y will have a sharedInbox because they're a follower of Celebrity X? Apologies, I've only lightly read the spec and haven't really seen anything like this in there.
- nightpool 4y agoNo, sorry, what I mean is that all users on mastodon.social have a unique private inbox and then a "sharedInbox" value of "https://mastodon.social/inbox https://mastodon.social/inbox". Almost all deliveries (with appropriate "to" and "cc" targeting values that the receiving server can appropriately deliver to, i.e. individual actors or the special "followers" group for an actors) can be sent to the sharedInbox in bulk, but for private groups and some other special cases you may want to use direct delivery.