Hi John,
I can see lots of value in what salmon protocol is trying to do.
Great!
About the JSON format... We (MySpace) are experimenting with a JSON
format to extend our OpenSocial 0.9 REST Activities endpoint. We'd
love to get some feedback on this from you and anyone else who is
interested.
Sample JSON:
"activity": {
"actors": [
{
"id": "tag:
myspace.com,2009:/Person/81472123",
"links": [
"
http://www.myspace.com/bmblack34"
],
"objectTypes": [
"
http://activitystrea.ms/schema/1.0/person"
],
"title": "Brandon Black"
}
],
"detail": "<div class=\"activityBody\"><h5 class=\"activityHeader
\"><a href=\"
http://www.myspace.com/bmblack34\">Brandon Black</a>
added a new photo to the Misc album.</h5><div class=\"activityMedia
ActivityTemplateMediaGallery\" ><ul class=\"activityDetailList\"><li
class=\"activityDetailItem\"><a href=\"\" class=\"thumbnailLink Photo
\"><img src=\"
http://c2.ac-images.myspacecdn.com/images02/6/
s_be8b724c87254f6bbb690eedcb9414f1.png\" alt=\"\" class=
\"thumbnailImage\"/></a></li></ul></div></div>",
"objects": [
{
"id": "tag:
myspace.com,2009:/Photo/1816998/76453118",
"links": [
"
http://c2.ac-images.myspacecdn.com/images02/6/
s_be8bb90eebb4c8725724f66dcb9414f1.png"
],
"source": {
"id": "tag:
myspace.com,2009:/Photo_Album/1816998",
"title": "Misc"
},
"title": ""
}
],
"target": {
"id": "tag:
myspace.com,2009:/Photo_Album/1816998",
"title": "Misc"
},
"time": "2009-10-24T09:15:41",
"verbs": [
"
http://activitystrea.ms/schema/1.0/post"
]
}
XSD (extends the OS 0.9 Activity schema --
http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/REST-API.html)
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="
http://ns.opensocial.org/2008/opensocial"
elementFormDefault="qualified" targetNamespace="http://
ns.opensocial.org/2008/opensocial" xmlns:xs="
http://www.w3.org/2001/
XMLSchema">
<xs:complexType name="Activity">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded"
name="actors" type="tns:ActivityObject" />
<xs:element minOccurs="0" name="context"
type="tns:ActivityContext" />
<xs:element minOccurs="0" name="detail" type="xs:string" /
>
<xs:element minOccurs="0" maxOccurs="unbounded"
name="links" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="unbounded"
name="objects" type="tns:ActivityObject" />
<xs:element minOccurs="0" name="source"
type="tns:ActivityObject" />
<xs:element minOccurs="0" name="target"
type="tns:ActivityObject" />
<xs:element minOccurs="0" name="time" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="unbounded"
name="verbs" type="xs:string" />
</xs:choice>
</xs:complexType>
<xs:complexType name="ActivityObject">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded"
name="actors" type="tns:ActivityObject" />
<xs:element minOccurs="0" name="detail" type="xs:string" /
>
<xs:element minOccurs="0" maxOccurs="unbounded"
name="links" type="xs:string" />
<xs:element minOccurs="0" name="source"
type="tns:ActivityObject" />
<xs:element minOccurs="0" name="time" type="xs:string" />
<xs:element minOccurs="0" name="id" type="xs:string" />
<xs:element minOccurs="0" name="title" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="unbounded"
name="objectTypes" type="xs:string" />
</xs:choice>
</xs:complexType>
<xs:complexType name="ActivityContext">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element minOccurs="0" maxOccurs="unbounded"
name="location" type="tns:Address" />
</xs:choice>
</xs:complexType>
</xs:schema>
> All,
> You've probably seen a mention of Salmon in the meet-up notes from last
> week. I did a quick presentation and demo of Salmon for the people in the
> room at the time, but neglected to actually send a message to this list as
> well. Here's the background:
>
> The Salmon Protocol (
http://salmon-protocol.org) is a real time,
> decentralized commenting and annotation system. The basic idea is that
> commentary swims upstream to the thing being commented on, which can then
> redistribute comments back out to interested subscribers. It's based on
> Atom and is intended to be compatible with Activity Streams -- using
> thr:in-reply-to and crosspost:source for example -- and is also intended to
> allow for reverse syndication of activities such as likes, ratings, etc.
> that are about an object that has registered a Salmon endpoint. That is, if
> you like an item you discover in a Salmon-enabled feed, your agent of choice
> can push the "like" activity up to an endpoint specified by the original
> item, providing more visibility and potential re-publishing of activities
> around the web.
> There's a demo available athttp://
salmon-playground.appspot.com/roswhich
> posts comments back to a Blogger blog (by proxying to an existing API, just
> for demo purposes). Feedback and comments welcomed.
>
> With regard to activities, I'm interested in a few things:
>
> - Making sure everything is compatible (so far this has been done by
> being compatible with Atom, which Activity Streams also does, but now we
> need to pick and choose extensions like crosspost: so things get trickier)
> - Optionally augmenting authorship (I'm interested in standardizing how
> to push an author representation that includes nickname of choice and url of
> an avatar picture along with the comment. These can change over time so
> pulling from a profile is both insufficient and inefficient.)
> - Standardizing a JSON format! (Salmon has held off on this because I
> want to just adopt what Activity Streams does.)
>
> On a side note, it could also be useful to have a structured activity
> indicating someone has flagged something as spam/offensive/etc. Sort of the
> inverse of a like, with the results depending on the identity and reputation
> of the author. (Distributed spam control.) I think this could be useful
> for things beyond Salmon, and it has come up in the context of PubSubHubbub
> for general feeds already.
>
> --
> John Panzer / Google