XMPP, TV and the Semantic Web

20
XMPP, TV and the Semantic Web Or ‘how I got to work on something that wasn’t entirely about RDF for a change…Dan Brickley – VU WAI talk, Feb 1 st 2 “This will be a very informal and very short talk to introduce The XMPP (Jabber) internet protocol and some potential impact it has for TV and Semantic Web applications."

description

A short talk about XMPP, for the WAI series of talks at VU.

Transcript of XMPP, TV and the Semantic Web

Page 1: XMPP, TV and the Semantic Web

XMPP, TV and the Semantic WebOr ‘how I got to work on something that wasn’t entirely about RDF for a change…’

Dan Brickley – VU WAI talk, Feb 1st 2010

“This will be a very informal and very short talk to introduce The XMPP (Jabber) internet protocol and some potential impact

it has for TV and Semantic Web applications."

Page 2: XMPP, TV and the Semantic Web

Extensible Messaging and Presence Protocol (XMPP)

• Open standard for Instant Messaging (IM) chat• Alternative to vendor-specific closed networks• Built opensource-style, then ratified at IETF• How it works:– [email protected] ‘JIDs’– Neverending 2-way conversation via servers– XML ‘stanzas’ – e.g. chat or info/query messages– Servers can be federated (eg. Google Talk) or

standalone (eg. Hyves.nl)

Page 3: XMPP, TV and the Semantic Web

XMPP in a nutshell…

• Developed and deployed for 10+ years• XML-based protocol for IM (chat, buddylists, real time messaging)• Almost entirely unlike SOAP and IRC (but a bit like both)• Used in products from Google, Apple and tools like GAIM/Pidgin• Healthy range of toolkits – servers, clients and libraries• All Google accounts; all Hyves accounts, …• Bewildering and impressive range of extensions (XEPs), e.g.• XEP-0166: Jingle, ‘peer-to-peer media sessions’ (e.g. Google Talk)• XEP-0060: Publish-Subscribe• XEP-0174: Local LAN dns-based discovery and point-to-point links • XEP-0059: Result Set management• XEP-0235: OAuth Over XMPP• XEP-0045: Multi-User Chat• XEP-0275: ‘Entity reputation’• many more…

Page 4: XMPP, TV and the Semantic Web

Why care?

• XMPP can go where HTTP doesn’t• bots, scripts and services can act for their

human users• XMPP’s ‘social graph’ interconnect sites (like

email and FOAF, and unlike closed and proprietary ‘social networks’)

• Friendly and energetic developer community• Save your time for inventing new things

Page 5: XMPP, TV and the Semantic Web

What does it look like?

• Two experimental uses:• Jqbus SPARQL experiments (FOAF project)• ‘NoTube Network’ ideas for TV remotes (NoTube EU)

• Jqbus showed an experimental binding of RDF query (SPARQL) to XMPP

• How else can you send queries into home or laptop?• Or filter them based on buddylist rules (colleagues, family)?• Or allow for query results to arrive hours later?

(if you don’t know SPARQL, think of it as SQL-ish query over linked RDF databases)

Page 6: XMPP, TV and the Semantic Web

Jqbus: sending a query

<iq id="S3IG2-4" to="[email protected]/sparqlserver" type="get">

<query xmlns='http://www.w3.org/2005/09/xmpp-sparql-binding'>

PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt; SELECT DISTINCT ?o WHERE {?s foaf:name ?o.} </query>

</iq> (from [email protected] )

Page 7: XMPP, TV and the Semantic Web

Jqbus: a query arrives

<iq id="40z5D-4" to="[email protected]/sparqlserver" from="[email protected]/sparqlclient" type="get">

<query xmlns="http://www.w3.org/2005/09/xmpp-sparql-binding">

PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt; SELECT DISTINCT ?o WHERE {?s foaf:name ?o.}

</query> </iq>

Page 8: XMPP, TV and the Semantic Web

A response is sent…<iq id="40z5D-4" to="[email protected]/sparqlclient"

from="[email protected]/sparqlserver" type="result"> <query-result xmlns="http://www.w3.org/2005/09/xmpp-sparql-

binding"> <sparql xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:xs="http://www.w3.org/2001/XMLSchema#" xmlns="http://www.w3.org/2005/sparql-results#">

<head><variable name="o"/> </head> <results> <result> <binding name="o"> <literal>Libby Miller</literal>

</binding> </result> <result> <binding name="o"> <literal>Tim Berners-Lee</literal>

</binding> </result> <!-- ... more bindings here --> </results> </sparql> </query-result> </iq>

Page 9: XMPP, TV and the Semantic Web

…and is received.

• Messages can be directed or general– Eg: to [email protected] or to– [email protected]/photo_database

• Can be real-time or delayed• Have practical limits on message size– These SPARQL bindings should be redone– Jingle specs help with bulky data and direct links

Page 10: XMPP, TV and the Semantic Web

Eg. 2: “Buttons” (NoTube Network)

• Work-in-progress ‘smart remote control’ protocol• XMPP as controlled route thru NAT/firewall• Attached to desktop ‘media centre’ software:– Boxee / XBMC / Plex (TV-like full screen media)– MythTV (linux-based PVR, uses DVB-T USB for TV)– EyeTV (applescript-able OSX tool, also DVB-T)– MediaPortal (Opensource C# software)– Windows Media Centre (with .NET SDK)– Itunes (applescript-able on OSX)

Page 11: XMPP, TV and the Semantic Web

What do these all have in common?

• A lot but not enough: chaos of different media-centre APIs and schemas

• Remotes tend to be dumb: sending clicks not commands, and no return-path for data…

• APIs allow basic navigation, play/pause, screenshot, EPG access, but via local PC or LAN

• Can diverse media centres share an API?– Can we expose it over XMPP? – Use it from smartphones? Multi-touch tables?

Page 12: XMPP, TV and the Semantic Web
Page 13: XMPP, TV and the Semantic Web
Page 14: XMPP, TV and the Semantic Web

<iq to="[email protected]/0AEDD375" type="result"><query xmlns="jabber:iq:roster"><item jid="[email protected]" subscription="both”><item jid="[email protected]" subscription="both"/><item jid="[email protected]" subscription="both”><item jid="[email protected]" subscription="both"/><item jid="yves.example @gmail.com" subscription="both"/>

</query></iq>

A remote control with a buddylist?

Page 15: XMPP, TV and the Semantic Web

Maybe.

• Prototyped at the play/pause/ffwd level• With Strophe.js and BOSH, can do HTML5 too!• Can control Boxee and MythTV via XMPP– Sample client running on iphone– Server attached to xmpp:[email protected]– Remote attached to xmpp:[email protected]– Very often super-fast; sometimes awkwardly slow– Can we drop down from server-mediated comms?

Page 16: XMPP, TV and the Semantic Web

Maybe.

• XEP-0174 defines local network discovery– And point-to-point XMPP comms (ie. not via gtalk!)– As used in Apple’s Bonjour iChat local chat– The Jingle specs also relevant here

• Other tricks for faster UI?– Iphone motion sensor – if it’s moving, send a ping– Design a protocol that sends commands not clicks• But beware downloading megabytes of EPG TV data

Page 17: XMPP, TV and the Semantic Web

Service Discovery

• Web service discovery for real?– Which of my buddys have VOIP support? Video?– Which have RDF databases online?– Or a TV / media centre connected?

• Which are on same LAN as me?• How do we manage permissions for all this?

Page 18: XMPP, TV and the Semantic Web

Presence and capabilities

<presence from=”[email protected]/BitlBee82551989" to="[email protected]/0AEDD375">

[…] </presence>

<caps:c node="http://mail.google.com/xmpp/client/caps" ver="1.1" ext="pmuc-v1 sms-v1" xmlns:caps="http://jabber.org/protocol/caps"/>

Page 19: XMPP, TV and the Semantic Web

Summary

• XMPP – the basics just work– Lots of libraries / tools– Helpful, friendly community– Focal point for problem-sharing

• Tread carefully– Navigating the maze of interesting extensions– Guessing which toolkit to bet on for your needs– Learning the landscape and what to rely on

Page 20: XMPP, TV and the Semantic Web

Questions?

• Or to [email protected]

• MythTV / iChat demo: Libby Miller• Draft iPhone graphics: Vicky Buser• NoTube project: www.notube.tv