The Salmon Protocol Workflow

The Salmon protocol itself simply defines methods for unifying conversations and updated content among a series of sites or services. Its workflow includes two main actors that will be communicating back and forth:

Publisher (source)

The site or services containing the content and conversation entities that other sites subscribe to or aggregate

Subscriber (aggregator)

The sites or services that aggregate the content and conversations from the publisher, syndicating out that content on their own sites

The communication between these two entities spans several different steps, which we’ll cover next.

1. Publisher pushes updated content to subscriber

At the first stage of the process, the publisher updates its content or has updates to its discussion threads. It pushes these updates through to its subscribers via a communication method such as PubSubHubbub so that the subscribers may update their content. Figure 10-12 shows this full flow—from the publisher through the hub to the subscribers.

Salmon, step 1: Publisher pushes updated content to subscribers through hub (e.g., PubSubHubbub)

Figure 10-12. Salmon, step 1: Publisher pushes updated content to subscribers through hub (e.g., PubSubHubbub)

This step mirrors the communication step between publisher and subscriber that we saw in the PubSubHubbub protocol, where a centralized hub controls the flow of updates from publisher to subscriber.

When the content is pushed to the subscriber, it contains a link parameter with a callback URI on the publisher side that will be used to push content back upstream from subscriber to publisher.

The subscriber takes the new content and updates the version on its site or service so that it is in sync with the publisher. The callback URI provided in the update feed is stored for later use.

Subscriber pushes updated content back upstream to publisher

Once the content on the subscriber site or service is updated (e.g., new comments), the subscriber will retrieve the Salmon callback URI for the publisher and push its updated content back to the publisher via an HTTP POST request, as shown in Figure 10-13.

Salmon, step 2: Subscriber pushes updated content to publisher through hub

Figure 10-13. Salmon, step 2: Subscriber pushes updated content to publisher through hub

At this point, the publisher will need to implement a verification mechanism to ensure that the subscriber is a trusted source. If the subscriber is indeed trusted, then the publisher will integrate the changes back into its content.

Publisher pushes updated content to all subscribers

Once the new content is integrated back into the publisher site or service, that publisher will issue another call to all subscribers with the new updates so that they may all update their versions to the new unified content. Figure 10-14 shows this transaction.

Salmon, step 3: Publisher pushes updated content from the single subscriber out to all subscribers

Figure 10-14. Salmon, step 3: Publisher pushes updated content from the single subscriber out to all subscribers

As with the first step, the publisher may use mechanisms such as PubSubHubbub to push content through to a series of subscribers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.240.244