fedwiki / wiki

Federated Wiki - node server as npm package
https://npmjs.org/package/wiki
Other
334 stars 72 forks source link

How does Federation work? #118

Closed Nutomic closed 5 years ago

Nutomic commented 5 years ago

Is there any documentation how exactly the federation protocol works? I skimmed over the paper, but it mostly talks about patterns and high-level things. It is not clear to me what data is shared between instances, or what protocol is used.

Regarding protocol what do you think about using ActivityPub? It is already used by a lot of projects, including alternatives to Twitter, Youtube, Facebook and others.

WardCunningham commented 5 years ago

A wiki site pulls pages from another wiki site with http/https GET. Pages are in json with annotations that lets a site do interesting things. We call this "sharing over the top" as opposed to behind the scene in some database.

This is a top-down overview that might speak to you. http://stack.fed.wiki

I'll mark this issue closed but happy to answer more questions here.

Nutomic commented 5 years ago

So at what time does a server pull a wiki page from a different server? And are pages synchronized and mirrored across the network? Does editing pages work across servers?

WardCunningham commented 5 years ago

A client can pull a page from any server and write it to its own origin. The client has additional protocol that it uses to talk to its origin. Remember, the client came from the origin so this is flexible and admits innovation without placing burdens on the rest of the federation.

Example: Here is a page where the client learns (from sitemaps) that there is a newer version on another server. I can view the new version side by side with my version and may choose to fork the new version or maybe make corresponding improvements in my own words.

image

Some designs seek to propagate changes until there is one agreed-upon truth. We rather let each author tend their own pages borrowing inspiration and content freely from the commons and thus host a beautiful "chorus of voices".