Example Blip Implementations
Although blips, the "common message" of the LLUP, are implementation agnostic, when it comes to implementing LLUP a few examples of how Blips can be constructed using various underlying technologies becomes really useful. That's what we describe here.
An example XML Blip
Schema
atom-elements.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.w3.org/2005/Atom"
xmlns="http://www.w3.org/2005/Atom">
<xs:element name="category">
<xs:complexType>
<xs:attribute name="term" type="xs:string" use="required" />
<xs:attribute name="scheme" type="xs:anyURI" />
<xs:attribute name="label" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:schema>
llup-types.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.x2x2x.org/projects/llup"
xmlns="http://www.x2x2x.org/projects/llup"
elementFormDefault="qualified">
<!-- Specifies the content for an identity -->
<!-- The content of the type is mixed so that a human readable version
of the sender's id can be provided -->
<xs:complexType name="identity" mixed="true">
<!-- The identifier could be using a number of service provision standards,
including but certainly not limited to OpenId -->
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<!-- Declares a list of blip recipients
Recipients could be groups or individuals, but the actual mapping to
distribution channels will be done at the LLUP node -->
<xs:complexType name="recipients">
<xs:sequence>
<xs:element name="recipient" type="xs:string" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!-- Decalares a time-span that tags a particular entry with a lifetime of relevancy -->
<xs:complexType name="time-span">
<xs:attribute name="start" type="xs:dateTime"/>
<xs:attribute name="expires" type="xs:dateTime"/>
</xs:complexType>
<!-- Specifies a payload where any additional information can be passed -->
<xs:complexType name="custom">
<xs:sequence>
<xs:any minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<!-- Specifies recent historical characteristics -->
<xs:complexType name="history">
<xs:attribute name="created" type="xs:dateTime" />
<xs:attribute name="last-updated" type="xs:dateTime" />
</xs:complexType>
</xs:schema>
blip.xsd
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.x2x2x.org/projects/llup" xmlns="http://www.x2x2x.org/projects/llup"
xmlns:atom="http://www.w3.org/2005/Atom"
elementFormDefault="qualified">
<!-- Start of Type Declarations -->
<!-- include LLUP Types constructs -->
<xs:include schemaLocation="llup-types.xsd"/>
<!-- Reuse Atom element constructs -->
<xs:import namespace="http://www.w3.org/2005/Atom" schemaLocation="atom-elements.xsd" />
<!-- End of Type Declarations -->
<!-- Document Definition -->
<xs:element name="blip">
<xs:complexType>
<xs:sequence>
<!-- Identifies the sender of this Blip -->
<xs:element name="sender" type="identity"/>
<!-- Used to indicate the types of receipients that may be interested in this Blip -->
<!-- It is possible to not specify any recipients, in which case it is the responsibility
of the LLUP node to direct the blip along any channels it sees fit -->
<xs:element name="recipients" type="recipients" minOccurs="0" maxOccurs="1"/>
<!-- Used to declare the time-span of relevancy for this Blip.
Outside of which this blip can be ignored or even destroyed -->
<xs:element name="time-span" type="time-span" />
<!-- Declares a list of cateogories -->
<xs:element ref="atom:category" />
<!-- Need to add llup home and llup admin according to the spec. -->
<!-- Specifies the link to the actual content that this blip is notifying about -->
<xs:element name="link" type="xs:anyURI" />
<!-- Specifies the subject of this blip -->
<xs:element name="subject" type="xs:string" />
<!-- Indicates the recent history of this blip -->
<xs:element name="history" type="history" />
<!-- Allows the addition of domain or implementation specific blip payload data
This metadata may or may not be maintained by a node within the LLUP system. -->
<xs:element name="custom" type="custom" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- End Document Definition -->
</xs:schema>
Examples
A very simple Blip with no custom data
<?xml version="1.0" encoding="UTF-8"?>
<blip xmlns="http://www.x2x2x.org/projects/llup"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:atom="http://www.w3.org/2005/Atom">
<sender id="russ@openid.contemporarywebdesign.co.uk">Russ Miles</sender>
<recipients>
<recipient>Russ Miles' Friends</recipient>
<recipient>Russ Miles' Family</recipient>
</recipients>
<time-span start="2007-05-25T09:00:00" expires="2007-05-26T09:00:00"/>
<atom:category term="party"/>
<link>http://www.russmiles.com/party-announcement</link>
<subject>31st Birthday Party Announcement</subject>
<history created="2007-04-17T12:46:00" last-updated="2007-04-17T12:46:00"/>
</blip>
A very simple Blip with custom domain-specific data embedded
<?xml version="1.0" encoding="UTF-8"?>
<blip xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:party="http://www.russmiles.com/party"
xmlns="http://www.x2x2x.org/projects/llup"
xmlns:atom="http://www.w3.org/2005/Atom">
<sender id="russ@openid.contemporarywebdesign.co.uk">Russ Miles</sender>
<recipients>
<recipient>Russ Miles' Friends</recipient>
<recipient>Russ Miles' Family</recipient>
</recipients>
<time-span start="2007-05-25T09:00:00" expires="2007-05-26T09:00:00"/>
<atom:category term="party"/>
<link>http://www.russmiles.com/party-announcement</link>
<subject>31st Birthday Party Announcement</subject>
<history created="2007-04-17T12:46:00" last-updated="2007-04-17T12:46:00"/>
<custom>
<party:activities>
<party:activity>Drinkin, mainly</party:activity>
</party:activities>
</custom>
</blip>
Atom and APP Integration
A Blip That Makes Extensive Use of Both Atom and the Atom Publishing Protocol for Queue-based Work Flow
<?xml version="1.0" encoding="utf-8"?>
<message xmlns="http://www.llup.org/blip#" xmlns:atom="http://www.w3.org/2005/Atom">
<reference href="http://amp.fm/band/foobarfighters/event/utahartsfestival/2008/08/28"/>
<scope start="2008-06-28T22:00:00Z" expire="2005-08-29T01:00:00Z">
<relevance href="self://atom:entry/atom:category" type="application/atom+xml"/>
<relevance href="http://amp.fm/artist/foobarfighters//fans" type="application/atom+xml"/>
</scope>
<signature>mailto+http:sha1:f0411747d71a46d5c63ff40405e877f87dc9e228</signature>
<atom:entry xmlns="http://www.w3.org/2005/Atom">
<atom:id>http://amp.fm/band/foobarfighters/event/utahartsfestival/2008/08/28//1</atom:id>
<atom:link rel="self" href="https://amp.fm/band/foobarfighters/event/utahartsfestival/2008/08/28" />
<atom:title>FooBar Fighters *ROCK* the Utah Arts Festival!</atom:title>
<atom:published>2008-08-25T10:05:33Z</atom:published>
<atom:author>
<atom:name>M. David Peterson</atom:name>
<atom:uri>http://xmlhacker.com/</atom:uri>
</atom:author>
<atom:summary>
It's that time of year again for the Utah Arts Festival to hit Library Square,
and this year is even better than last! Why? Because we're headlining on
Saturday night! w00t!
</atom:summary>
<atom:category label="Utah Arts Festival" term="utah_arts_festival" scheme="http://personplacething.info/thing" />
<atom:category label="Salt Lake City" term="salt_lake_city" scheme="http://personplacething.info/place/us/ut" />
<atom:category label="Library Square" term="library_square" scheme="http://personplacething.info/place/us/ut/slc" />
<atom:category label="Music" term="music" scheme="http://personplacething.info/category" />
<atom:category label="Event" term="event" scheme="http://personplacething.info/category" />
<atom:category label="FooBar Fighters" term="foobar_fighters" scheme="http://personplacething.info/people/music/band" />
<atom:category label="Rock" term="rock" scheme="http://personplacething.info/thing/music/genre" />
</atom:entry>
</message>
An Example JSON Blip
An example simple blip with no custom information
{"blip": {
"sender": {"id": russ@openid.contemporarywebdesign.co.uk", "label": "Russ Miles"},
"recipients": {
"recipient": [
{"value": "Russ Miles\' Friends"},
{"value": "Russ Miles\' Family"}
]
},
"time-span": {"start": "2007-05-25T09:00:00", "expires": "2007-05-26T09:00:00"},
"category": {"term": "party},
"link": "http://www.russmiles.com/party-announcement",
"subject": "31st Birthday Party Announcement",
"history": {"created": "2007-04-17T12:46:00", "last-updated": "2007-04-17T12:46:00"}
}}
An example simple blip with custom information
{"blip": {
"sender": {"id": russ@openid.contemporarywebdesign.co.uk", "label": "Russ Miles"},
"recipients": {
"recipient": [
{"value": "Russ Miles\' Friends"},
{"value": "Russ Miles\' Family"}
]
},
"time-span": {"start": "2007-05-25T09:00:00", "expires": "2007-05-26T09:00:00"},
"category": {"term": "party},
"link": "http://www.russmiles.com/party-announcement",
"subject": "31st Birthday Party Announcement",
"history": {"created": "2007-04-17T12:46:00", "last-updated": "2007-04-17T12:46:00"},
"custom": {
"activity": [
{"value": "Drinkin\', mainly"}
]
}
}}
