Freeing the cloud, one service at a time

84
François Marier [email protected] freeing the cloud one (small) service at a time

description

This talk presents an approach to building free network services and introduces Libravatar, a Django-based project to provide a federated and Open Source alternative to the Gravatar profile image hosting service, a centralised web service used by a large number of social sites in the cloud.

Transcript of Freeing the cloud, one service at a time

Page 1: Freeing the cloud, one service at a time

François [email protected]

freeing the cloudone (small) service at a time

Page 2: Freeing the cloud, one service at a time
Page 3: Freeing the cloud, one service at a time
Page 4: Freeing the cloud, one service at a time
Page 5: Freeing the cloud, one service at a time

open sourcedesktop

applications

Page 6: Freeing the cloud, one service at a time

SaaS

Page 7: Freeing the cloud, one service at a time

privacy®

Page 8: Freeing the cloud, one service at a time

autonomy

control

Page 9: Freeing the cloud, one service at a time
Page 10: Freeing the cloud, one service at a time

1980s

Page 11: Freeing the cloud, one service at a time
Page 12: Freeing the cloud, one service at a time
Page 13: Freeing the cloud, one service at a time

100% free

operating systems

Page 14: Freeing the cloud, one service at a time

started replacing allproprietary programs

one at a time

Page 15: Freeing the cloud, one service at a time
Page 16: Freeing the cloud, one service at a time
Page 17: Freeing the cloud, one service at a time
Page 18: Freeing the cloud, one service at a time

“Developers of network services are encouraged to:

● Use the GNU Affero GPL, a license designed specifically for network service software, to ensure that users of services have the ability to examine the source or implement their own service.

● Develop freely-licensed alternatives to existing popular but non-Free network services.

● Develop software that can replace centralized services and data storage with distributed software and data deployment, giving control back to users.

Franklin Street Statement, 14 July 2008

Page 19: Freeing the cloud, one service at a time

start replacing allproprietary services

one at a time

Page 20: Freeing the cloud, one service at a time
Page 21: Freeing the cloud, one service at a time
Page 22: Freeing the cloud, one service at a time

libreprojects.net

Page 23: Freeing the cloud, one service at a time

looking for a small one...

Page 24: Freeing the cloud, one service at a time
Page 25: Freeing the cloud, one service at a time

1. upload photo

2. assign to email address

Page 26: Freeing the cloud, one service at a time
Page 27: Freeing the cloud, one service at a time
Page 28: Freeing the cloud, one service at a time

101

Page 31: Freeing the cloud, one service at a time

f52a1d3d8c39868fc92cf70828821635

Page 32: Freeing the cloud, one service at a time

http://www.gravatar.com/avatar/f52a1d3d8c39868fc92cf70828821635.jpg

Page 33: Freeing the cloud, one service at a time

<img src=”http://www.gravatar.com/avatar/f52a1d3d8c39868fc92cf70828821635.jpg”>

Page 34: Freeing the cloud, one service at a time

<img src=”http://www.gravatar.com/avatar/f52a1d3d8c39868fc92cf70828821635.jpg”>

Page 35: Freeing the cloud, one service at a time

started to write a replacement

Page 36: Freeing the cloud, one service at a time

Libravatar

Page 37: Freeing the cloud, one service at a time
Page 38: Freeing the cloud, one service at a time
Page 39: Freeing the cloud, one service at a time
Page 40: Freeing the cloud, one service at a time
Page 41: Freeing the cloud, one service at a time

“80%” of what does

protected accounts

Page 42: Freeing the cloud, one service at a time

“80%” of what does

G / PG / X ratings

XMLRPC API

Page 43: Freeing the cloud, one service at a time

must fit into the world

Page 44: Freeing the cloud, one service at a time

must fit into the world

use the same API

Page 45: Freeing the cloud, one service at a time

must fit into the world

use the same API

be a Twitter client

Page 46: Freeing the cloud, one service at a time

https://api.twitter.com/statuses/show/123.xml

https://identi.ca/api/statuses/show/123.xml

use the same API

Page 47: Freeing the cloud, one service at a time

be a Twitter client

Page 48: Freeing the cloud, one service at a time

must fit into the world

use the same API

be a Gravatar client

Page 49: Freeing the cloud, one service at a time

http://www.gravatar.com/avatar/f52a1d3d8c39868fc92cf70828821635.jpg

http://cdn.libravatar.org/avatar/f52a1d3d8c39868fc92cf70828821635.jpg

use the same API

Page 50: Freeing the cloud, one service at a time

be a Gravatar client

Page 51: Freeing the cloud, one service at a time

Now, how about making it better?

Page 52: Freeing the cloud, one service at a time
Page 53: Freeing the cloud, one service at a time

Federation via DNS

_avatars._tcp SRV avatars.catalyst.net.nz

Page 54: Freeing the cloud, one service at a time

IPv6

Page 55: Freeing the cloud, one service at a time

IPv6 SHA256

Page 56: Freeing the cloud, one service at a time

IPv6 SHA256 OpenID

Page 57: Freeing the cloud, one service at a time

IPv6 SHA256 OpenID

LDAP

Page 58: Freeing the cloud, one service at a time

IPv6 SHA256 OpenID

AccountExport

LDAP

Page 59: Freeing the cloud, one service at a time

IPv6 SHA256 OpenID

PhotoImporters

AccountExport

LDAP

Page 60: Freeing the cloud, one service at a time

What does it look like?

Page 61: Freeing the cloud, one service at a time

Live demo!

Page 62: Freeing the cloud, one service at a time

Django

photos uploadedor imported by users

Page 63: Freeing the cloud, one service at a time

Django

static fileson disk

photos uploadedor imported by users

Page 64: Freeing the cloud, one service at a time

Apache(mod_rewrite)

Django

static fileson disk

avatars sent tothird parties

photos uploadedor imported by users

Page 65: Freeing the cloud, one service at a time

Apache(mod_rewrite)

Django

static fileson disk

avatars sent tothird parties

photos uploadedor imported by users

high traffic

(static)

low traffic

(dynamic)

Page 66: Freeing the cloud, one service at a time

Apache(mod_rewrite)

Django

static fileson disk

avatars sent tothird parties

photos uploadedor imported by users

Page 67: Freeing the cloud, one service at a time

Apache(mod_rewrite)

Django

static fileson disk

avatars sent tothird parties

photos uploadedor imported by users

Crop, resizeand optimise

GearmanQueue

Page 68: Freeing the cloud, one service at a time

Apache(mod_rewrite)

Django

static fileson disk

avatars sent tothird parties

photos uploadedor imported by users

Crop, resizeand optimise

GearmanQueue

Page 69: Freeing the cloud, one service at a time

Apache(mod_rewrite)

Django

static fileson disk

avatars sent tothird parties

photos uploadedor imported by users

Crop, resizeand optimise

GearmanQueue

Apache(mod_rewrite)

static fileson disk

avatars sent tothird parties

Apache(mod_rewrite)

static fileson disk

avatars sent tothird parties

Page 70: Freeing the cloud, one service at a time

Who uses it?

Page 72: Freeing the cloud, one service at a time
Page 73: Freeing the cloud, one service at a time

--- a/IkiWiki/Plugin/comments.pm+++ b/IkiWiki/Plugin/comments.pm@@ -187,6 +188,16 @@ sub preprocess { $commentauthor = $commentuser; }++ eval 'use Libravatar::URL';++ if (! $@) {+ my $email = IkiWiki::userinfo_get($commentuser, 'email');++ if (defined $email) {+ $commentauthoravatar = libravatar_url(email => $email);+ }+ } } else { if (defined $params{ip}) {--- a/templates/comment.tmpl+++ b/templates/comment.tmpl@@ -1,6 +1,10 @@ <TMPL_IF HTML5><article class="comment" id="<TMPL_VAR COMMENTID>"> <TMPL_ELSE><div class="comment" id="<TMPL_VAR COMMENTID>"></TMPL_IF> +<TMPL_IF COMMENTAUTHORAVATAR><div class="comment-avatar">+<img src="<TMPL_VAR COMMENTAUTHORAVATAR>" alt="" />+</div></TMPL_IF>+ <TMPL_IF HTML5><header class="comment-subject"><TMPL_ELSE><div class="comment-subject"></TMPL_IF> <TMPL_IF PERMALINK>

Page 74: Freeing the cloud, one service at a time

--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt@@ -675,6 +678,9 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% ELSE %] <div class="commentline"> [% IF ( ShowReviewer ) %]+ [% IF ( review.avatarurl ) %]+ <img class="avatar" src="[% review.avatarurl %]" height="80" width="80"/>+ [% END %] <h5> Comment by [% review.title %]--- a/opac/opac-detail.pl+++ b/opac/opac-detail.pl@@ -295,6 +295,13 @@ $template->param( ocoins => GetCOinSBiblio($biblionumber), ); +my $libravatar_available = 0;+eval 'use Libravatar::URL';+if (! $@) {+ $libravatar_available = 1;+}

my $reviews = getreviews( $biblionumber, 1 ); my $loggedincommenter;@@ -303,6 +310,9 @@ foreach ( @$reviews ) { $_->{title} = $borrowerData->{'title'}; $_->{surname} = $borrowerData->{'surname'}; $_->{firstname} = $borrowerData->{'firstname'};+ if ($libravatar_available and $borrowerData->{'email'}) {+ $_->{avatarurl} = libravatar_url(email => $borrowerData->{'email'});+ } $_->{userid} = $borrowerData->{'userid'}; $_->{cardnumber} = $borrowerData->{'cardnumber'}; $_->{datereviewed} = format_date($_->{datereviewed});

Page 75: Freeing the cloud, one service at a time
Page 76: Freeing the cloud, one service at a time
Page 77: Freeing the cloud, one service at a time
Page 78: Freeing the cloud, one service at a time
Page 79: Freeing the cloud, one service at a time

Get involved!

● write a plugin

www.libravatar.org launchpad.net/libravatar

libravatar.onlinegroups.net#libravatar on chat.freenode.net

Page 80: Freeing the cloud, one service at a time

Get involved!

● write a plugin

● host a mirror

www.libravatar.org launchpad.net/libravatar

libravatar.onlinegroups.net#libravatar on chat.freenode.net

Page 81: Freeing the cloud, one service at a time

Get involved!

● write a plugin

● host a mirror

● translate the UI

www.libravatar.org launchpad.net/libravatar

libravatar.onlinegroups.net#libravatar on chat.freenode.net

Page 82: Freeing the cloud, one service at a time

Get involved!

● write a plugin

● host a mirror

● translate the UI

● create an account today!

www.libravatar.org launchpad.net/libravatar

libravatar.onlinegroups.net#libravatar on chat.freenode.net

Page 83: Freeing the cloud, one service at a time

ideas for Libravatar?

other easy services to replace?

Questions?

fmarier fmarier

http://feeding.cloud.geek.nz

Page 84: Freeing the cloud, one service at a time

Photo creditsStorm clouds: http://www.flickr.com/photos/johnson7/1460568819/Linen texture: http://www.flickr.com/photos/zooboing/4715048673/Name tag: http://www.flickr.com/photos/stevegarfield/833593377/Cloud sign: http://www.flickr.com/photos/jamescridland/4122948535/Facebook data center: http://www.flickr.com/photos/traftery/5596941479/First web server: http://www.flickr.com/photos/scobleizer/2251820987/Bradley Kuhn: https://secure.wikimedia.org/wikipedia/en/wiki/File:Bkuhn-2008-08-20.jpgBenjamin Mako Hill: http://www.flickr.com/photos/soulfish/2374876735Mike Linksvayer: http://www.flickr.com/photos/joi/2595169497/Luis Villa: http://tieguy.org/pics/Wedding/Honeymoon/Highlights/New-Zealand/img_2145Henri Poole: http://www.flickr.com/photos/weblogsky/9271675/Evan Prodromou: http://www.flickr.com/photos/christopheducamp/4469158609/Jonathan Gray: http://www.flickr.com/photos/jwyg/4497000847/Aaron Swartz: http://www.flickr.com/photos/creativecommons/3111021669/Evan Prodromou presenting: http://www.flickr.com/photos/walkah/4831658754

Copyright © 2011 François MarierReleased under the terms of the Creative CommonsAttribution Share Alike 3.0 Unported Licence