deciphering the interoperable web

67
BUILDING AND DECIPHERING THE INTEROPERABLE WEB Saturday, July 17, 2010

Upload: michael-bleigh

Post on 18-May-2015

4.040 views

Category:

Technology


2 download

DESCRIPTION

A survey of the technologies that will enable interoperable social web applications, given at Ruby Midwest 2010.

TRANSCRIPT

Page 1: Deciphering the Interoperable Web

BUILDING AND DECIPHERINGTHE INTEROPERABLE WEB

Saturday, July 17, 2010

Page 2: Deciphering the Interoperable Web

MICHAEL BLEIGH@mbleigh

Saturday, July 17, 2010

Page 3: Deciphering the Interoperable Web

Saturday, July 17, 2010

Page 4: Deciphering the Interoperable Web

OMGWTF

BBQpresented by

Saturday, July 17, 2010

Page 5: Deciphering the Interoperable Web

GET READY FOR NOSEBLEEDS

YOU ARE HERE

Saturday, July 17, 2010

Page 6: Deciphering the Interoperable Web

WHAT IS THE INTEROPERABLE WEB?

Saturday, July 17, 2010

Page 7: Deciphering the Interoperable Web

Saturday, July 17, 2010

Page 8: Deciphering the Interoperable Web

Saturday, July 17, 2010

Page 9: Deciphering the Interoperable Web

Saturday, July 17, 2010

Page 10: Deciphering the Interoperable Web

Saturday, July 17, 2010

Page 11: Deciphering the Interoperable Web

Saturday, July 17, 2010

Page 12: Deciphering the Interoperable Web

PUBSUBHUBBUB (PuSH)Saturday, July 17, 2010

Page 13: Deciphering the Interoperable Web

WEBHOOKSwith standards

Saturday, July 17, 2010

Page 14: Deciphering the Interoperable Web

SUBSCRIBER

ATOM/RSS FEED

PUBLISHER

Saturday, July 17, 2010

Page 15: Deciphering the Interoperable Web

<link rel=”hub” href=”...”/>

Saturday, July 17, 2010

Page 16: Deciphering the Interoperable Web

SUBSCRIBER

PUBLISHER

HUB

Saturday, July 17, 2010

Page 17: Deciphering the Interoperable Web

SUBSCRIBERI’D LIKE TO SUBSCRIBE

PUBLISHER

HUB

Saturday, July 17, 2010

Page 18: Deciphering the Interoperable Web

SUBSCRIBER

HERE’S A NEW POST

PUBLISHER

HUB

Saturday, July 17, 2010

Page 19: Deciphering the Interoperable Web

SUBSCRIBERHERE’S A NEW POST

PUBLISHER

HUB

Saturday, July 17, 2010

Page 20: Deciphering the Interoperable Web

SUBSCRIBER

PUBLISHER

HUB

SUBSCRIBER SUBSCRIBERSaturday, July 17, 2010

Page 21: Deciphering the Interoperable Web

SIMPLE + POWERFUL

Saturday, July 17, 2010

Page 22: Deciphering the Interoperable Web

IN RUBY,github.com/igrigorik/PubSubHubbub

Saturday, July 17, 2010

Page 23: Deciphering the Interoperable Web

EventMachine.run { pub = EventMachine::PubSubHubbub.new('http://pubsubhubbub.appspot.com/publish').publish "http://www.test.com/"

pub.callback { puts "Successfully notified hub." } pub.errback { puts "Uh oh, something broke: #{pub.response}" }}

Saturday, July 17, 2010

Page 24: Deciphering the Interoperable Web

SUPERFEEDR = SUPER AWESOME

Saturday, July 17, 2010

Page 25: Deciphering the Interoperable Web

GOOGLE, WORDPRESS,FRIENDFEED, SUPERFEEDR,

STATUSNET

AS USED BY...

Saturday, July 17, 2010

Page 26: Deciphering the Interoperable Web

WEBFINGER

Saturday, July 17, 2010

Page 27: Deciphering the Interoperable Web

E-MAIL = IDENTITY

Saturday, July 17, 2010

Page 28: Deciphering the Interoperable Web

[email protected]

AVATAR/PIC SOCIAL LINKS

HCARD PROFILEOPENID URL

Saturday, July 17, 2010

Page 29: Deciphering the Interoperable Web

GET /.well-known/host-meta

<?xml version='1.0' encoding='UTF-8'?><XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0' xmlns:hm='http://host-meta.net/xrd/1.0'> <hm:Host xmlns='http://host-meta.net/xrd/1.0'>gmail.com</hm:Host> <Link rel='lrdd' template='http://www.google.com/s2/webfinger/?q={uri}'> <Title>Resource Descriptor</Title> </Link></XRD>

Saturday, July 17, 2010

Page 30: Deciphering the Interoperable Web

GET google.com/s2/webfinger/[email protected]

<?xml version='1.0'?><XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'> <Subject>acct:[email protected]</Subject> <Alias>http://www.google.com/profiles/mbleigh</Alias> <Link rel='http://webfinger.net/rel/profile-page' href='http://www.google.com/profiles/mbleigh' type='text/html'/> <Link rel='http://microformats.org/profile/hcard' href='http://www.google.com/profiles/mbleigh' type='text/html'/> <Link rel='http://gmpg.org/xfn/11' href='http://www.google.com/profiles/mbleigh' type='text/html'/> <Link rel='http://specs.openid.net/auth/2.0/provider' href='http://www.google.com/profiles/mbleigh'/> <Link rel='describedby' href='http://www.google.com/profiles/mbleigh' type='text/html'/> <Link rel='describedby' href='http://www.google.com/s2/webfinger/?q=mbleigh%40gmail.com&amp;fmt=foaf' type='application/rdf+xml'/> <Link rel='http://schemas.google.com/g/2010#updates-from' href='https://www.googleapis.com/buzz/v1/activities/100660544095714416357/@public' type='application/atom+xml'/></XRD>

Saturday, July 17, 2010

Page 31: Deciphering the Interoperable Web

IN RUBY, REDFINGERgithub.com/intridea/redfinger

Saturday, July 17, 2010

Page 32: Deciphering the Interoperable Web

require 'mofo'require 'redfinger'

finger = Redfinger.finger('[email protected]')hcard_uri = finger.hcard.first.to_shcard = hCard.find(hcard_uri)hcard.fn # => "Example Guy"hcard.title # => "Title of the guy"

Saturday, July 17, 2010

Page 33: Deciphering the Interoperable Web

GOOGLE, STATUSNETAS USED BY...

Saturday, July 17, 2010

Page 34: Deciphering the Interoperable Web

SALMON

Saturday, July 17, 2010

Page 35: Deciphering the Interoperable Web

UNIFYING THE CONVERSATIONS

Saturday, July 17, 2010

Page 36: Deciphering the Interoperable Web

PuSH BACKWARDS

Saturday, July 17, 2010

Page 37: Deciphering the Interoperable Web

SALMON, GET IT?

Saturday, July 17, 2010

Page 38: Deciphering the Interoperable Web

AGGREGATOR

SOURCE

HUBHERE’S A NEW POST

Saturday, July 17, 2010

Page 39: Deciphering the Interoperable Web

AGGREGATOR

SOURCE

Saturday, July 17, 2010

Page 40: Deciphering the Interoperable Web

AGGREGATOR

SOURCE

HERE’S A COMMENT ON YOUR POSTSALMON

Saturday, July 17, 2010

Page 41: Deciphering the Interoperable Web

AGGREGATOR

SOURCE

HUBHERE’S A NEW COMMENT

AGGREGATORAGGREGATORSaturday, July 17, 2010

Page 42: Deciphering the Interoperable Web

“MAGIC SIGNATURES” AND MORE COMPLEXITY

Saturday, July 17, 2010

Page 43: Deciphering the Interoperable Web

IN RUBY...?

Saturday, July 17, 2010

Page 44: Deciphering the Interoperable Web

CLIQSET, STATUSNETAS USED BY...

Saturday, July 17, 2010

Page 45: Deciphering the Interoperable Web

ACTIVITYSTREAMS

Saturday, July 17, 2010

Page 46: Deciphering the Interoperable Web

ATOM FEEDS ARE BORING,THERE’S NO ACTION

Saturday, July 17, 2010

Page 47: Deciphering the Interoperable Web

LET’S ADD SOME VERBS

Saturday, July 17, 2010

Page 48: Deciphering the Interoperable Web

<entry> <title>ciberch: thanks to /Jerry @robdolin , @daveman692, @chrismessina, @apparentlymart and @jsmarr for a very produtive activitystrea.ms session</title> <content type="html">ciberch: thanks to /Jerry @robdolin , @daveman692, @chrismessina, @apparentlymart and @jsmarr for a very produtive activitystrea.ms session</content> <id>tag:twitter.com,2007:http://twitter.com/ciberch/statuses/2396395271</id> <published>2009-06-30T00:59:54+00:00</published> <updated>2009-06-30T00:59:54+00:00</updated> <link type="text/html" rel="alternate" href="http://twitter.com/ciberch/statuses/2396395271"/> <link type="image/pjpeg" rel="image" href="http://s3.amazonaws.com/twitter_production/profile_images/81481539/180653_normal.jpg"/> <author> <name>Monica Keller</name> <uri>http://www.myspace.com/ciberch</uri> </author></entry>

Saturday, July 17, 2010

Page 49: Deciphering the Interoperable Web

<entry> <! ... !> <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb> <activity:object> <id>tag:twitter.com,2007:http://twitter.com/ciberch/statuses/2396395271/object</id> <title>thanks to /Jerry @robdolin , @daveman692, @chrismessina, @apparentlymart and @jsmarr for a very produtive activitystrea.ms session</title> <link type="text/html" rel="alternate" href="http://twitter.com/ciberch/statuses/2396395271"/> <published>2009-06-30T00:59:54+00:00</published> <updated>2009-06-30T00:59:54+00:00</updated> <author> <name>Monica Keller</name> <uri>http://www.myspace.com/ciberch</uri> </author> </activity:object></entry>

Saturday, July 17, 2010

Page 50: Deciphering the Interoperable Web

FOLLOWED, POSTED, FAVORITED, CLOSED,UPDATED, TAGGED

Saturday, July 17, 2010

Page 51: Deciphering the Interoperable Web

IN RUBY, activity_streamsgithub.com/webcracy/activity_streams

Saturday, July 17, 2010

Page 52: Deciphering the Interoperable Web

require 'rubygems'require 'activity_streams'require 'open-uri'

twitter = 'http://api.cliqset.com/feed/?svcuser=rubenfonseca&feedid=twitternotesposted'feed = ActivityStreams::Feed.from_xml(open(twitter).read)feed.entries.size #=> 20feed.entries.first.id = "http://twitter.com/rubenfonseca/statuses/10075665287"feed.entries.first.verbs.size #=> 1feed.entries.first.verbs.first #=> "http://activitystrea.ms/schema/1.0/post"...

Saturday, July 17, 2010

Page 53: Deciphering the Interoperable Web

FACEBOOK, MYSPACE, GOOGLE, MICROSOFT, BBC,

GOWALLA, OPERA

AS USED BY...

Saturday, July 17, 2010

Page 54: Deciphering the Interoperable Web

OAUTH 2.0Saturday, July 17, 2010

Page 55: Deciphering the Interoperable Web

FLEXIBLE, MULTI-PROFILETOKEN AUTHORIZATION

Saturday, July 17, 2010

Page 56: Deciphering the Interoperable Web

USER AGENT Like web server but no secret shared.

NATIVE APP One-time username/password use.

AUTONOMOUS Userless authorization.

WEB SERVER User authenticates on host site.

Saturday, July 17, 2010

Page 57: Deciphering the Interoperable Web

bit.ly/oauth2-talk

Saturday, July 17, 2010

Page 58: Deciphering the Interoperable Web

IN RUBY, OAUTH2 GEMgithub.com/intridea/oauth2

Saturday, July 17, 2010

Page 59: Deciphering the Interoperable Web

require 'rubygems'require 'sinatra'require 'oauth2'require 'json'

def client OAuth2::Client.new('app_id', 'app_secret', :site => 'https://graph.facebook.com')end

get '/auth/facebook' do redirect client.web_server.authorize_url( :redirect_uri => 'http://localhost:4567/auth/facebook/callback', :scope => 'email,offline_access' )end

get '/auth/facebook/callback' do access_token = client.web_server.get_access_token( params[:code], :redirect_uri => redirect_uri)

user = JSON.parse(access_token.get('/me')) user.inspectend

Saturday, July 17, 2010

Page 60: Deciphering the Interoperable Web

FACEBOOK, GITHUB,37SIGNALS

AS USED BY...

Saturday, July 17, 2010

Page 61: Deciphering the Interoperable Web

BRINGING IT TOGETHER

Saturday, July 17, 2010

Page 62: Deciphering the Interoperable Web

WATCH OUT FOR UNICORN POACHERS

Saturday, July 17, 2010

Page 63: Deciphering the Interoperable Web

XMLSaturday, July 17, 2010

Page 64: Deciphering the Interoperable Web

COMPLEXITY

Saturday, July 17, 2010

Page 65: Deciphering the Interoperable Web

LOCK-IN MINDSET

Saturday, July 17, 2010

Page 66: Deciphering the Interoperable Web

START THINKING IN STANDARDS

Saturday, July 17, 2010

Page 67: Deciphering the Interoperable Web

QUESTIONS?@intridea @mbleigh

bit.ly/interop-slides bit.ly/interop-rate

Saturday, July 17, 2010