Salmon (protocol)


The Salmon Protocol is a message exchange protocol running over HTTP designed to decentralize commentary and annotations made against newsfeed articles such as blog posts. It allows a single discussion thread to be established between the article's origin and any feed reader or "aggregator" which is subscribing to the content. Put simply, that if an article appeared on 3 sites: A, B and C, that members of all 3 sites could see and contribute to a single thread of conversation regardless of site they were viewing from.

Example

The origin supplies a Salmon end point – a URL in the metadata of an RSS/Atom feed. An aggregating site makes a note of the end point.



If a member of the aggregator makes a comment, the aggregator will construct a comment for the benefit of the origin.



tag:example.com,2009:cmt-0.44775718
test@example.combob@example.com
ref='tag:blogger.com,1999:blog-893591374313312737.post-3861663258538857954'>
tag:blogger.com,1999:blog-893591374313312737.post-3861663258538857954

Salmon swim upstream!
Salmon swim upstream!
2009-12-18T20:04:03Z


The comment will be base64 encoded, digitally signed, placed in an envelope and POSTed back to the origin via the endpoint.

POST /salmon-endpoint HTTP/1.1
Host: example.org
Content-Type: application/atom+xml



PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxlbnRyeSB4bWxucz0naHR0
cDovL3d3dy53My5vcmcvMjAwNS9BdG9tJz4NCiAgPGlkPnRhZzpleGFtcGxlLmNvbSwyMDA5OmNt
dC0wLjQ0Nzc1NzE4PC9pZD4NCiAgPGF1dGhvcj48bmFtZT50ZXN0QGV4YW1wbGUuY29tPC9uYW1l
Pjx1cmk+Ym9iQGV4YW1wbGUuY29tPC91cmk+PC9hdXRob3I+DQogIDx0aHI6aW4tcmVwbHktdG8g
eG1sbnM6dGhyPSdodHRwOi8vcHVybC5vcmcvc3luZGljYXRpb24vdGhyZWFkLzEuMCcNCiAgICBy
ZWY9J3RhZzpibG9nZ2VyLmNvbSwxOTk5OmJsb2ctODkzNTkxMzc0MzEzMzEyNzM3LnBvc3QtMzg2
MTY2MzI1ODUzODg1Nzk1NCc+DQogICAgdGFnOmJsb2dnZXIuY29tLDE5OTk6YmxvZy04OTM1OTEz
NzQzMTMzMTI3MzcucG9zdC0zODYxNjYzMjU4NTM4ODU3OTU0DQogIDwvdGhyOmluLXJlcGx5LXRv
Pg0KICA8Y29udGVudD5TYWxtb24gc3dpbSB1cHN0cmVhbSE8L2NvbnRlbnQ+DQogIDx0aXRsZT5T
YWxtb24gc3dpbSB1cHN0cmVhbSE8L3RpdGxlPg0KICA8dXBkYXRlZD4yMDA5LTEyLTE4VDIwOjA0
OjAzWjwvdXBkYXRlZD4NCjwvZW50cnk+

base64url
RSA-SHA256

EvGSD2vi8qYcveHnb-rrlok07qnCXjn8YSeCDDXlbhILSabgvNsPpbe76up8w63i2f
WHvLKJzeGLKfyHg8ZomQ



The comment is then made available by the origin in its original feed so subscriber aggregators may refresh their view of the conversation. The protocol provides security so that each aggregator and each member is uniquely identified so that the upstream could employ measures to ban or filter out rogue sites or members if so desired.

Applications

Federated social networks such as GNU Social and Diaspora use Salmon as defined in the OStatus specification to coordinate discussion between members belonging to different servers. A member of one server can publish an article which is disseminated to other users over the network via Salmon who in turn can comment back in a similar fashion.