Remote partial updates

In ActivityPub, to update an object that you control and that is hosted on your home instance, you:

  1. Send an Update activity via C2S, which has only the specific fields you want to update
  2. The server applies your changes and sends out an Update via S2S containing the whole object, as a notification for others to see the new state

The S2S Update is used merely as a notification there. What if you want to update a remote object, that is hosted on some other server? How to tell the remote server over S2S which changes you want to make?

You might say, just put the updated object in an Update and let the remote server update it on their side, perhaps comparing to the original, to make sure you’re updating only fields you’re authorized to update. I expect complications with diffing the JSON to determine what changed, but even if it works, how can servers know that your Update is a request to update an object rather than a notification?

You might say, by telling that you’re updating a remote object and not a local one. But, there may be objects on your own server, that you don’t own, and you’d want to request changes to them using Update as well.

What now?

PROPOSAL: I thought I’ve seen this somewhere, but couldn’t find it. So here’s my proposal. A Patch activity for updating specific fields of objects.

I need this for ForgeFed and Vervis. It doesn’t make sense to have a dedicated activity for every possible situation of updating some field or two. ActivityPub doesn’t talk about authorized updates of remote objects, so, let’s make an extension for that.

Thoughts, ideas, doubts, alternatives? :pray:

(Ironically, ForgeFed has a Patch type, which would conflict with the Patch activity… but I suppose I’ll find some way to solve that)

1 Like

Offer Update?

Offer Update?

2 Likes

Offer{Update} would allow update requests without adding a custom activity, yeah :slight_smile:

Would it be reasonable for the Update to contain the just the specific fields the sender wants to change? If yes, my problem is solved!

Nope, you’d want to still have an extension type for PartialUpdate in that case. So you’d end up sending Offer PartialUpdate or something like that, I guess. Update is specified for full in-place replacement precisely to avoid having to diff objects in S2S.

1 Like