<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"><channel><title>ralphm.net blog</title><link>http://ralphm.net/blog</link><description>Syndicated ralphm.net blog</description><item><title>Apple Notification Server = Idavoll</title><link>http://ralphm.net/blog/2010/01/14/apple_uses_idavoll</link><dc:date>2010-01-14T16:23:11+01:00</dc:date><description>
          Apple Notification Server turns out to be based on Idavoll, a
            generic XMPP publish-subscribe service.
				</description><content:encoded>&lt;![CDATA[<p><i>Pushing ahead...</i></p>
			

      <p xmlns="http://www.w3.org/1999/xhtml">Last week, <a xmlns="" href="http://romeda.org/">Blaine Cook</a>
        congratulated me on <a href="http://idavoll.ik.nu/">Idavoll</a>
        being in Apple Max OS 10.6 Server, as its Notification Server. I did
        have contact with Apple's server team ages ago, about them using
        Idavoll and having added some customizatons, but never knew where it
        ended up. The <a href="http://www.apple.com/opensource">list of Open
          Source projects used in Apple's products</a> confirms the use of
        Idavoll, and <a href="http://wokkel.ik.nu/">Wokkel</a>, too, as
        a dependency of Idavoll. Cool!</p>

      <p xmlns="http://www.w3.org/1999/xhtml">Idavoll, and thus Notification Server, is a generic XMPP
        publish-subscribe service, in Python with Twisted. Upon inspection of
        the code and the differences against the mentioned versions, most of
        the customizations match those I was already aware of: an SQLite
        backend, the whitelist <a href="http://xmpp.org/extensions/xep-0060.html#accessmodels">node
          access model</a> and associated member affiliations. The link to
        Notification Server at the open source list goes nowhere (yet), so I am
        unsure about the actual license of their additions. I contacted the
        server team, and will write again if I have more news on this.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">At the nice post by Jack Moffitt on <a href="http://metajack.im/2010/01/13/even-apple-uses-xmpp/">Apple's use
          of XMPP</a>, Kael mentions the presence of more
        <a href="http://trac.calendarserver.org/browser/CalendarServer/branches/users/sagen/xmpp/twistedcaldav/notify.py?rev=2684#L433">Publish-Subscribe
          goodness in Calendar Server</a>. This is actually the stuff that
        uses Notification Server for <a href="http://www.appleinsider.com/articles/09/02/11/iphone_push_notification_server_tied_to_snow_leopard_server.html&amp;page=2">push
          notification in iCal</a>. As Jack says, it is truly great to see
        large corporations like Apple to embrace XMPP like this. I really wish
        Google Calendar had a similar feature. Now I only get meeting invites
        through e-mail. Apple's particular use of Publish-Subscribe reminds me of
         Joe Hildebrand's effort on <a href="http://xmpp.org/internet-drafts/draft-hildebrand-webdav-notify-02.html">WebDAV
           notifications</a>, and I think that there are a lot of
         applications that could benefit from such push features.</p>
      
       <p xmlns="http://www.w3.org/1999/xhtml">As I <a href="http://ralphm.net/blog/2009/07/19/twisted_mediamatic">touched
           upon earlier</a>, at <a href="http://www.mediamatic.nl/">Mediamatic Lab</a>, we use XMPP
         Publish-Subscribe for exchanging <em>things</em> for
         federation. But we've also built a bunch of interactive installations,
         most of them dealing with RFID tags we call <a href="http://www.mediamatic.nl/iktag">ikTag</a>s. To name two
         examples, the <a href="http://www.mediamatic.nl/ikcam">ikCam</a> takes a (group)
         picture, uploads it and friends the depicted persons by <a href="http://www.mediamatic.net/page/129066">reading</a> their
         tags. The <a href="http://www.mediamatic.nl/ikpoll">ikPoll</a>
         is a polling station where people can 'vote' on questions with the
         tag. Typically, there are also publish-subscribe notifications coming
         out of those interactions, so you can create a <a href="http://www.flickr.com/photos/bas-boerman/3948163089">live
           stream</a> of things happening at an event like PICNIC. Combined
         with the <a href="http://apiwiki.twitter.com/Streaming-API-Documentation">Twitter
           Streaming API</a> and our own status messages, this creates an
         entertaining back channel, coincidently powered by Idavoll.</p>


		]]&gt;</content:encoded></item><item><title>Jewish Monument Changes</title><link>http://ralphm.net/blog/2009/12/17/jhm_changes</link><dc:date>2009-12-17T14:46:15+01:00</dc:date><content:encoded>&lt;![CDATA[<p><i>An exercise in semantic web relationships...</i></p>
			

      <p xmlns="http://www.w3.org/1999/xhtml">Two exciting projects I've been recently working on at <a href="http;//www.mediamatic.nl/">Mediamatic Lab</a> are two highly
        connected sites around the Jewish Community in the Netherlands during
        World War Ⅱ. The first is one of the oldest sites we have made, the
        <a href="http://www.joodsmonument.nl/">Digital Monument</a>.
        This site contains verified information on all of the Dutch jews that
        have died during WWⅡ along with their households, documented posessions
        and known documents and pictures. It is maintained by a team of editors
        of the <a href="http://www.jhm.nl/">Jewish Historical
          Museum</a>.</p>
     
      <p xmlns="http://www.w3.org/1999/xhtml">The second is a brand new <a href="http://www.jewishmonument.nl/">community site</a>, to
        complement the Monument by allowing anyone to add new information,
        pictures and stories on people at the Monument.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">The Monument is very impressive, as I learned back at the first
        <a href="http://barcamp.org/BarCampAmsterdam">BarCamp
          Amsterdam</a>, hosted by Mediamatic. You will know what I mean if
        you spend a little as five minutes paging through the site.  Today,
        however, I want to talk about the technology behind both sites.</p>

      <h4 xmlns="http://www.w3.org/1999/xhtml">Data Model Changes</h4>
        

        <p xmlns="http://www.w3.org/1999/xhtml">The data in the Monument is highly semantic in nature. People are
          part of households, as head-of-family, spouse, son or daughter. Or
          some other relation. Households have a location and lists of
          possessions.  Tied to all of these are supporting documents and
          pictures. In <a href="http://www.anymeta.net/">anyMeta</a>,
          all of these are modeled as <em>thing</em>s with
          <em>edge</em>s between them with a certain predicate. A
          typical household would be modelled like this:</p>
        

        
          <img xmlns="http://www.w3.org/1999/xhtml" src="/images/blog/jhm_old_model.png"/>
        
        
        <p xmlns="http://www.w3.org/1999/xhtml">For the community site, however, we wanted to have more direct
          relationships between people: parent-child relations, sibling
          relations, partner relations and a more generic (extended) family
          relationship. As the community also has most things of the monument
          imported, this meant a change in the data model and a subsequent
          conversion in the monument.</p>
          
        <p xmlns="http://www.w3.org/1999/xhtml">In anyMeta, (almost) everything is a thing. As such, the
          predicate on an edge between two things is also represented by a
          thing. This has traditionally been named <em>role</em>.
          Like all things in an anyMeta site have a <em>resource
            URI</em>, the resource URI of a role is the predicate's URI.
          We try to use existing (RDF) vocabularies as much as possible for
          this.</p>

        <p xmlns="http://www.w3.org/1999/xhtml">For relationships between people, we've used the
          <code class="literal">knowsOf</code> and <code class="literal">friendOf</code> properties
          from <a href="http://vocab.org/relationship">RELATIONSHIP</a>,
          used in FOAF. So this was the first place to look for the desired new
          predicates. However, this vocabulary does not have a property for
          expressing a generic extended family relationship. Fortunately,
          <a href="http://gmpg.org/xfn/">XFN</a> has the
          <code class="literal">kin</code> relationship type, along with
          <code class="literal">child</code>, <code class="literal">parent</code>,
          <code class="literal">spouse</code> and <code class="literal">sibling</code>.
          Richard Cyganiak described how to <a href="http://vocab.sindice.com/xfn">express XFN relations in
            RDF</a>, so we used that to base our predicates on.</p>

        <p xmlns="http://www.w3.org/1999/xhtml">Like RELATIONSHIP, most of the XFN properties are subproperties
          of the <code class="literal">foaf:knows</code> property, and have some
          hierarchy themselves, too. In anyMeta, we didn't have the concept of
          subproperties, yet, so we added a new role for expressing subproperty
          relationships between roles, and introduced the concept of
          <em>implicit edges</em>. These are edges with a
          superpredicate of the explicit edge that is being created. For
          example, the <code class="literal">xfn:child</code> property is a subproperty
          of <code class="literal">foaf:knows</code>. Whenever an edge between two people
          gets created with the child role, another implicit one with the knows
          role is added, too.</p>

        <p xmlns="http://www.w3.org/1999/xhtml">After conversion and with the implicit edges present, the new
          data model of the example above looks like this:</p>

        
          <img xmlns="http://www.w3.org/1999/xhtml" src="/images/blog/jhm_new_model.png"/>
        

        <p xmlns="http://www.w3.org/1999/xhtml">The blue arrows are the new, derived edges. A spouse edge is made
          between those people that respectively have a head-of-family and
          partner relation to the same household (this can be assumed to be
          correct for this dataset). For person that have a son or daugther
          edge to a household, a child edge is made from the head-of-family and
          partner persons (if any) in that household to this person. We haven't
          (yet) added derived sibling edges, as this relation depends on the
          parents of both persons, too.</p>

        <p xmlns="http://www.w3.org/1999/xhtml">You can also see gray, dashed edges. These are the implicit edges
          that follow from the property hierarchy. Another thing to notice, is
          that the biographies are gone. We put the texts in there directly on
          the persons and households, instead.</p>

        <p xmlns="http://www.w3.org/1999/xhtml">Besides the regular pages of all people, households and other
          things, you can also use our semantic browser to look at the
          relationships between things. For example, <a href="http://www.joodsmonument.nl/page/382750">Mozes and his
            family</a> can be browsed from <a href="http://www.joodsmonument.nl/browse/382750">here</a>.</p>

      

		]]&gt;</content:encoded></item><item><title>Twisted at Mediamatic</title><link>http://ralphm.net/blog/2009/07/19/twisted_mediamatic</link><dc:date>2009-07-19T16:45:59+02:00</dc:date><description>
          A story on how Mediamatic use Twisted for making friends,
            finding stories behind physical objects and poll people. Oh, and
            casually adding social networking federation in the mix.
        </description><content:encoded>&lt;![CDATA[<p><i>How Georgious is Twisted?</i></p>
      

      <p xmlns="http://www.w3.org/1999/xhtml">Even before I got to work for <a href="http://www.mediamatic.nl/">Mediamatic Lab</a>, Mediamatic
        was using <a href="http://www.twistedmatrix.com/">Twisted</a>.
        My friend <a xmlns="" href="http://term.ie/blog/">Andy Smith</a> used it
        for a bunch of projects around physical objects, usually involving some
        kind of RF tags. Examples include the <a href="http://www.mediamatic.nl/page/218">Symbolic Table</a> and
        the <a href="http://www.mediamatic.nl/page/219">Friend Drinking
          Station</a>.  From this grew <a href="http://launchpad.net/fizzjik">fizzjik</a>, a Twisted based
        library that implements support for several kinds of RFID readers,
        network monitoring and access to online services like Flickr and of
        course <a href="http://www.anymeta.net/">anyMeta</a>.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">On the other hand, I have dabbled in Twisted for quite a while now,
        mostly contributing XMPP support in Twisted Words and through the
        playground that is known as <a href="http://wokkel.ik.nu/">Wokkel</a>. But why go through all
        that effort, while there are a several different Python-based XMPP
        implementations out there? And why does Mediamatic use Twisted? Why do
        I believe Twisted is <em>awesome</em>?</p>

      <p xmlns="http://www.w3.org/1999/xhtml">First of all, we like Python. It is a great little language with
        extensive library support (<q>batteries included</q>), where
        everything is an object. Much like in anyMeta. It is a language for
        learning to program, to code small utility scripts, but also for entire
        applications.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">But going beyond that, building applications that interact with
        different network protocols and many connections all at the same time
        is a different story. Many approach such a challenge by using preemtive
        threading. Threads are hard. Really hard. And Python has the GIL,
        allowing the interpreter to only execute byte codes in one thread at a
        time.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">So in comes Twisted. Twisted is a framework for building networked
        applications in Python, through a concept known as cooperative
        multitasking. It uses an event loop that hands off processing of events
        (like incoming data on a socket or a timer going off) to non-blocking
        functions. Events loops are mostly known from GUI toolkits like GTK,
        and so Twisted goes even beyond networking by working with such
        toolkits' event loops, too. As most network protocol implementations
        only have a synchronous interface (i.e. one that blocks), Twisted
        includes asynchronous implementations of a long list of network
        protocols. For the blocking interfaces that come from C libraries, like
        databases, Twisted provides a way to work with
        <em>their</em> threads, while keeping all your controlling
        code in the main thread. Asynchronous programming does take some
        getting used to, hence Twisted's name.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">So how do we use Twisted? Well, a recent application is our recent
        RFID polling system. It allows people to use their ikTag (or any card
        or other object with a Mifare tag), tied to their user account on an
        anyMeta site, to take part in a poll by having their tag read at an
        RFID reader corresponding to a possible answer. The implementation
        involves:</p>

      <ul xmlns="http://www.w3.org/1999/xhtml">
        <li><p>Communication with one or more RFID readers (that
            also have output capabilities for hooking up lamps, for
            example).</p></li>
        <li><p>Communication over HTTP to access anyMeta's API to
            store and process votes.</p></li>
        <li><p>Network availability monitoring (can we access the
            network and specifically our anyMeta site?)</p></li>
        <li><p>Power management monitoring (do we still have
            power?)</p></li>
        <li><p>Device monitoring. Are RFID readers plugged in
            or not? Which device handle are they tied to? Also watch coming
            or leaving devices.</p></li>
        <li><p>A (GTK-based) diagnostic GUI</p></li>
      </ul> 

      <p xmlns="http://www.w3.org/1999/xhtml">Additionally, we also want to show polling results, so we have a
        browser talking to a local HTTP server and a listener for XMPP
        publish-subscribe notifications.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">This is quite a list of tasks for something as seemingly simple as
        a polling stations. But wait: there can be multiple readers tied to a
        particular poll answer, likely physically apart, a polling question can
        have maybe 50 answers (depending on the type of poll, like choosing
        from a collection of keywords) or there could be a lot of questions at
        one event.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">So, back to Twisted. Twisted has HTTP and XMPP protocol support
        (both client and server-side), can talk to serial devices (like your
        Arduino board) and DBus (for watching NetworkManager and device events)
        and provides event loop integration with GTK to also process GUI events
        and manipulate widgets based on events. Together with Wokkel, it powers
        the exchange of information in our (and your?) federating social
        networking sites. In Python. No threads and associated locking. In
        rediculously small amounts of code. That's why.</p>
        
      <p xmlns="http://www.w3.org/1999/xhtml">Not yet convinced? Add a <a href="http://twistedmatrix.com/trac/wiki/TwistedConch">Manhole</a>
        to your application server, SSH into it, and get an interactive, syntax
        highlighted Python prompt with live objects from your application. Yes,
        really.</p>

    ]]&gt;</content:encoded></item><item><title>XMPP Summit #7 and OSCON 2009</title><link>http://ralphm.net/blog/2009/07/19/xmpp_summit_7</link><dc:date>2009-07-19T08:53:10+02:00</dc:date><description>
          Another edition of the XMPP Summit and OSCON and what I am
            going to do there.
        </description><content:encoded>&lt;![CDATA[<p><i>Two great flavors...</i></p>
      

      <p xmlns="http://www.w3.org/1999/xhtml">I am attending <a href="http://xmpp.org/summit/summit7.shtml">XMPP Summit #7</a> and
        part of <a href="http://en.oreilly.com/oscon2009">OSCON 2009</a>, with which it is co-located due the kind folks at
        O'Reilly. Much like <a href="http://ralphm.net/blog/2009/07/26/xmpp_summit_5">last
          year</a>, only this time in San José, California. Unlike the
        European version of the summit last February, we hope to focus more on
        doing than talking, although there will be plenty of that, of
        course.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">Suggestions were made to do some interoperability testing, along
        with general hacking sessions. I am bringing my implementation of
        <a href="http://xmpp.org/extensions/xep-0220.html">server-to-server
          dialback</a>, and a bunch of other protocol implementations in
        <a href="http://wokkel.ik.nu/">Wokkel</a> to the table. While
        there are a bunch of other protocol implementations in Python, I think
        the Twisted approach is so different that I want people to know about
        the ideas behind it. By introducting them to Twisted through Wokkel
        should give them at least a glimpse of <a href="http://ralphm.net/blog/2009/07/19/twisted_mediamatic">why I believe
          Twisted is awesome</a>.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">So, nearing the summit I prepared a bunch of examples around the
        <a href="http://xmpp.org/extensions/xep-0199.html">XMPP Ping</a>
        protocol, as I mentioned <a href="http://ralphm.net/blog/2009/07/08/wokkel_0.6.0">before</a>.
        Additionally I prepared an example <a href="http://wokkel.ik.nu/browser/trunk/doc/examples/echo_server.tac">echo
          bot on steroids</a>, which is basically a stand-alone XMPP server
        that connects to other servers using the server-to-server protocol. It
        will accept presence subscriptions to any potential
        <em>account</em> at the configured domain, sending presence
        and echoing all incoming messages.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">Besides the hacking sessions, I planning to discuss
        publish-subscribe delete-with-redirect, node collections,
        publish-subscribe in multi-user chats and service discovery meta data.
        Oh, and we might go on a field trip to discuss Google Wave XMPP-based
        federation protocols. Then, after the summit, I will hanging out at
        OSCON until Thursday, for hallway meet-ups on federating social
        networks with protocols like OpenID, OAuth and technologies like
        webfinger and pubsubhubbub. I also brought an RFID reader to play
        with.</p>

    ]]&gt;</content:encoded></item><item><title>Wokkel releases</title><link>http://ralphm.net/blog/2009/07/08/wokkel_0.6</link><dc:date>2009-07-08T22:18:15+02:00</dc:date><description>
          A couple of Wokkel releases, that add server-to-server support,
            publish-subscribe improvements and lots of deployment examples
            around the XMPP Ping protocol.
        </description><content:encoded>&lt;![CDATA[<p><i>Making crispy sounds...</i></p>
      

      <p xmlns="http://www.w3.org/1999/xhtml">Today's <a href="http://wokkel.ik.nu/releases/0.6.1/">Wokkel
          0.6.2</a> release is to show case some of the features in the
        previous 0.6.0 release. Most of the work was part of the things we have
        been building at <a href="http://www.mediamatic.nl/">Mediamatic
          Lab</a> as part of a restructuring of how we federate our social
        networking sites using <a href="http://xmpp.org/tech/pubsub.shtml">publish-subscribe</a>.</p>
          
      <p xmlns="http://www.w3.org/1999/xhtml">First of all, I added a preliminary, but functional, implementation
        of server-to-server support, using the dialback protocol. This
        complements the router code that went into 0.5.0 and Twisted Words
        8.2.0 to make a fully stand-alone XMPP server. Note that it does not
        implement any client-to-server functionality yet, but this can be added
        as separate server-side components now.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">To show this off, I have created a bunch of examples around the
        <a href="http://xmpp.org/extensions/xep-0199.html">XMPP Ping</a>
        protocol, for which the protocol implementation itself is also a nice
        example of how to write XMPP protocol implementations using Twisted
        Words and Wokkel. Be sure to check out these <a href="http://wokkel.ik.nu/browser/trunk/doc/examples">examples</a>.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">The other feature I want to mention is publish-subscribe Resources.
        They provide an abstraction of (part of) a publish-subscribe service.
        The protocol parts are handled by Wokkel. This should make it easier to
        do node-as-code scenarios, by just filling in the blanks of the various
        methods that are called upon receiving requests from pubsub
        clients. I'll create some examples for this shortly.</p>

    ]]&gt;</content:encoded></item><item><title>PubSubHubbub</title><link>http://ralphm.net/blog/2009/05/31/pubsubhubbub</link><dc:date>2009-05-31T15:09:49+02:00</dc:date><content:encoded>&lt;![CDATA[<p><i>Pushing it with HTTP...</i></p>
      

      <p xmlns="http://www.w3.org/1999/xhtml"><a href="http://code.google.com/p/pubsubhubbub/">PubSubHubbub</a> is
        a protocol and reference implementation for doing publish-subscribe
        using web hooks, polling in feeds triggered by a ping from the
        publisher, and POSTing Atom entries to notify subscribers. The
        notification part is similar to what I've been working on for the
        publish-subscribe stuff at Mediamatic Lab, where we spiced up <a href="http://idavoll.ik.nu/">Idavoll</a> with an <a href="http://idavoll.ik.nu/wiki/HTTP_Interface">HTTP interface</a>
        to bridge the gap between XMPP Publish-Subscribe and HTTP speaking
        entities.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">Although I spend a lot of time working on XMPP based
        publish-subscribe, I understand the reasons for going for a full
        HTTP-based approach. XMPP can be intimidating for developers of web
        applications. While the differences between XMPP and HTTP are
        important (stateful connections, asynchronous processing, etc), the
        fact that it is different is reason often enough. Hosting
        facilities don't always offer ways to do XMPP, and there is not
        nearly enough running code out there to make it easier for people
        to play with these technologies to spice up their web application
        with non-IM XMPP functionality. Having platforms like Google App
        Engine provide sending and handling raw XMPP stanzas as part of the
        API would surely help.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">That said, PubSubHubbub has two separate sides to it, the
        publishing part and the notification part. There's nothing that
        prevents a <em>hub</em> to do the publishing part
        using regular XMPP publish-subscribe. Instead of fetching the Atom
        Feed over HTTP every time, it could use autodiscovery to find out
        the publish-subscribe node and upgrade by subscribing to it
        instead.  Similarly, the notification part could send out XMPP
        notifications.  Combined with existing HTTP aggregator, that
        combination is very similar to how the aggregator for <a href="http://mimir.ik.nu/trac/">Mimír</a> works.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">I'm still not convinced that PubSubHubbub is the answer to the
        efficient exchange of updates on social objects, but I do think it is a
        good way to make smaller entities be part of a federation of social
        networking sites. Likely, we'll see a hybrid approach, to begin
        with.</p>

    ]]&gt;</content:encoded></item><item><title>Social Web FooCamp 2009</title><link>http://ralphm.net/blog/2009/05/31/swfoo09</link><dc:date>2009-05-31T15:03:08+02:00</dc:date><content:encoded>&lt;![CDATA[<p><i>The stuff we did besides throwing Frisbees...</i></p>
      

      <p xmlns="http://www.w3.org/1999/xhtml">Last month I was fortunate enough to attend <a href="http://swfoo09.pbworks.com/">Social Web FooCamp</a> at
        O'Reilly HQ in Sebastopol, CA, a follow up to Social Graph FooCamp in
        2008. I can't express how inspiring such events are, being able to have
        a continuous, in-depth conversation with so many bright minds about so
        many topics that keep you busy on <em>regular</em> days,
        and more. I'll give a quick overview of the whole trip, and then go
        into depth in a series of posts.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">My trip started with a visit to friend and former <a href="http://www.jaiku.com/">Jaiku</a> colleague Andy
          Smith, who was kind enough to take me in at <a href="http://www.facebook.com/pages/San-Francisco-CA/HouseKu/22204023656">Houseku</a>.
        As soon as I landed on SFO, I got an SMS from him to make a detour to
        his office. Besides meeting a bunch of Andy's fellow googlers, I got to
        spend some time with Brett Slatkin talking about
        <a href="http://code.google.com/p/pubsubhubbub/">PubSubHubbub</a>.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">The next day I got a ride to Sebastopol from Edwin
          Aoki. After a trip full of interesting conversation, we
        arrived at the O'Reilly offices. Sebastopol was a lot warmer than San
        Francisco, perfect for camping. Lots of familiar faces, but also a lot
        of new ones. During the Friday evening, apart from the general
        introduction, I didn't get to any sessions, but instead spent talking
        to a bunch of people on <a href="http://xmpp.org/">XMPP</a>,
        <a href="http://xmpp.org/tech/pubsub.shtml">Publish-Subscribe</a>
        and the work I am doing on federating social networks under that name
        <a href="http://www.mediamatic.nl/page/3392/en">Open-CI</a> at
        <a href="http://www.mediamatic.nl/">Mediamatic Lab</a>.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">The next two days were filled with sessions and hallway talk on
        OpenID, OAuth, different approaches to Publish-Subscribe and inter-site
        communication, resource and service discovery and service scalability.
        While most of the topics were similar to last year, I was glad to share
        what we've done at Mediamatic Lab over the past year, while learning
        how others have fared. We used these technologies to
        make a true federation of social networking sites where you can make
        cross-site relations between people and their social objects. Some of
        our discoveries there we're shared among the participants, while others
        had interesting other approaches.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">Especially interesting to me was a session on OAuth and OpenID
        where I could explain how we tried to improve upon the user experience.
        Both technologies have a bad reputation in this area. With some smart
        defaults and trust between sites, we could eliminate some of the
        screens. There was talk about using pop-ups in some situations, either
        as lightboxes or as new (small) windows. In our experience the former
        can't be used if you want to do SSL (since you can't validate the
        address and certificate). The latter was deemed confusing in our user
        tests. Research is still ongoing, I suppose. The other issue had to do
        with presenting OpenID providers. We currently use a drop down, but
        that doesn't scale up very nicely. Logos might work, but in the end has
        the same issue.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">I also got to show Blaine Cook the code I wrote
        recently to make it easier to write XMPP publish-subscribe enabled
        services (code-as-a-node), that has been included in the recent <a href="">Wokkel</a> release. In turn, Blaine shared his thoughts on
        <a href="http://romeda.org/blog/2009/05/simple-addressing-for-web-part-1.html">simple
          addressing on the web</a> and we got to hash it out with a bunch
        of people like Brad Fitzpatrick, who also organized
        the pubsub shootout session. Finally, Eran
          Hammer-Lahav showed his work on XRD.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">I'm pretty sure I forgot to mention a lot of things, but when it
        comes back to me, I'll write about it some other time.</p>

    ]]&gt;</content:encoded></item><item><title>XMPP and Social Networks, part 2: Nodes</title><link>http://ralphm.net/blog/2008/07/30/xmpp_social_networks_2</link><dc:date>2008-07-30T17:25:02+02:00</dc:date><description>This second part of a series on how to use XMPP
            publish-subscribe for accessing social networking services, node
            organization and naming is explored. Jaiku and Mediamatic Lab's
            anyMeta are used to provide real examples for different choices
            that can be made in this respect.</description><content:encoded>&lt;![CDATA[<p><i>How to organize the nodes that can be subscribed to and what
          identifiers to use for them.</i></p>
      

      <p xmlns="http://www.w3.org/1999/xhtml">In <a href="">part 1</a> I wrote about what you can
        subscribe to and how a social network service will send out
        notifications. I often used <em>node</em> as the thing
        you subscribe to, a term comes directly from the <a href="http://www.xmpp.org/extensions/xep-0060.html">XMPP Publish
          Subscribe</a> specification. In other publish-subscribe
        implementations this is often referred to as
        <em>topic</em>. Nodes are kept by a publish-subscribe
        service, and, among other things, this service is responsible for
        keeping the list of subscribers and sending out notifications.</p>

      <p xmlns="http://www.w3.org/1999/xhtml">Publish-subscribe services currently come in two forms: dedicated
        publish-subscribe services with their own domain (e.g.
        <code class="literal">pubsub.ik.nu</code>) and publish-subscribe services tied
        to a user account (often mentioned in combination with the <a href="http://www.xmpp.org/extensions/xep-0163.html">Personal Eventing
          Protocol</a>, also known as PEP). In the latter case, nodes are
        kept at the bare JID of a user's account (e.g.
        <code class="literal">ralphm@ik.nu</code>. Personal pubsub-nodes have nice
        properties, like the ability to directly associate a particular node
        with a person, and the possibility of doing access control on the
        user's contact list (roster).</p>

      <h4 xmlns="http://www.w3.org/1999/xhtml">Node organization</h4>
        

        <p xmlns="http://www.w3.org/1999/xhtml">In the context of federating social networks, a service needs to
          decide where to put the nodes it wants to allow other entities to
          subscribe to and send out notifications from. In some cases it makes
          sense to keep nodes at user accounts, though in some other cases it
          is better to provide the nodes at the domain of the service itself.
          This depends on the nature of the social objects and the
          subscribable unit you provide. Let's explore some use cases.
        </p>

        <h5 xmlns="http://www.w3.org/1999/xhtml">Jaiku</h5>
          

          <p xmlns="http://www.w3.org/1999/xhtml">In <a href="http://jaiku.com/">Jaiku</a>, social
            objects (microblog posts and aggregated items like photos,
            bookmarks, etc), are organized in streams. Streams are tied to
            either a user, or a channel, and don't change ownership. The
            social objects themselves are static, once created, they cannot be
            edited. They can have comments associated with them, but those
            also cannot be edited. The only thing that can happen to streams,
            stream items, and comments is deletion.</p>

          <p xmlns="http://www.w3.org/1999/xhtml">Here, it makes sense to have a node for each stream, and
            possibly a stream for the comments to each stream item. Those can
            be tied to the owner's JID (e.g.
            <code class="literal">ralphm@jaiku.com</code> or
            <code class="literal">#jabber@jaiku.com</code>). Another possible node could
            be: all comments by a person. Another node an entity might want to
            subscribe to is: all public microblog posts. Such a node would be
            associated with the domain of the service rather than any
            particular user's JID.</p>

        

        <h5 xmlns="http://www.w3.org/1999/xhtml">anyMeta</h5>
          

          <p xmlns="http://www.w3.org/1999/xhtml">The company I work for, <a href="http://www.mediamatic.nl/">Mediamatic Lab</a> has a
            (proprietary) CMS called <a href="http://www.anymeta.net/">anyMeta</a>. Instead of
            'content', the C in CMS here stands for Community, to highlight
            the social network properties it provides. anyMeta is a highly
            semantic system that deals in <em>thing</em>s (a
            person, an article, an event, a blog), and
            <em>edge</em>s (the relations between things, each
            with a predicate like friend-of, author-of, etc). I mainly work on
            federating instances of anyMeta.</p>

          <p xmlns="http://www.w3.org/1999/xhtml">Things in anyMeta are usually editable, so it makes sense to
            want to keep informed about changes. For example, an article can
            have a large number of edits, and a person might move, change
            employers or have other changes to his profile. Thus, we chose to
          at least provide each thing as a subscribable unit. Upon creating a
          thing, a new node is created, and a representation of the thing is
          published to the node. Editing a thing, results in subsequent
          publishes. Subscribers will receive notifications as the node gets
          published to.</p>

          <p xmlns="http://www.w3.org/1999/xhtml">We organized the nodes in a flat namespace, tied to a domain,
            rather than a user. One reason is that the owner of any particular
            thing might change. Tying a node to the first owner, and then
            needing to move it when the owner changes, is cumbersome.</p>

        

      

      <h4 xmlns="http://www.w3.org/1999/xhtml">Node naming</h4>
        

        <p xmlns="http://www.w3.org/1999/xhtml">Each node has an identifier that is unique within the
          publish-subscribe service holding them. So you could have two nodes
          named <code class="literal">updates</code> tied to two different users. Node
          identifiers are opaque; one should not derive meaning from how the
          node identifier looks. Embedded slashes might suggest some
          hierarchy, for example, but an application should not assume that
          such a hierarchy actually exists.</p>

        <p xmlns="http://www.w3.org/1999/xhtml">That said, it makes perfect sense to use logical, human readable
          identifiers for nodes. They might even be very similar to the URI
          layout of the service's web site. Let's check what one could do for
          the examples given above.</p>


        <h5 xmlns="http://www.w3.org/1999/xhtml">Jaiku</h5>
          

          <p xmlns="http://www.w3.org/1999/xhtml">It makes sense to have the node identifier for the regular
            posts (called presence) be <code class="literal">presence</code> and the
            nodes for the individual posts (with comments)
            <code class="literal">presence/123456</code>, where the number is the same
            as used in the web page for that post. Those two examples could be
            tied to a JID representing me at Jaiku:
            <code class="literal">ralphm@jaiku.com</code>.</p>

          <p xmlns="http://www.w3.org/1999/xhtml">The node for all public posts could be called
            <code class="literal">explore</code> and located at the JID of the whole
            service: <code class="literal">jaiku.com</code>. This would be similar to
            the web site, where all public posts can be viewed at <a href="http://jaiku.com/explore">http://jaiku.com/explore</a>.</p>

          <p xmlns="http://www.w3.org/1999/xhtml">It might also make sense to have a dedicated node for a user's
            profile information, that can be retrieved and presented at a
            service or application that consumes the social object updates. At
            least a (full) name and some icon or headshot would be nice to
            have there. Obviously, subscribing to such a node would mean that
            future profile changes will also propagate to the consuming
            entities. An example identifier would be
            <code class="literal">profile</code>, to be kept at the user's JID.</p>

        

        <h5 xmlns="http://www.w3.org/1999/xhtml">anyMeta</h5>
          

          <p xmlns="http://www.w3.org/1999/xhtml">In anyMeta, each thing has an identifier, that could be used
            for the node identifier as well. However, in the current
            implementation, all nodes are held by a loosely coupled, generic
            publish-subscribe service that caters multiple anyMeta instances.
            We chose to use unique identifiers as generated by the
            publish-subscribe service, which don't have any relation with the
            thing identifier.</p>

          <p xmlns="http://www.w3.org/1999/xhtml">As you might have guessed, some of the stuff being discussed
            here has already been implemented in anyMeta. The
            publish-subscribe service used is <a href="http://idavoll.ik.nu/">Idavoll</a>. It has grown an
            <a href="http://idavoll.ik.nu/wiki/HTTP_Interface">HTTP
              interface</a> that is used (internally) to create new nodes,
            publish items that represent things, and subscribe to, and receive
            notifications from, remote publish-subscribe nodes. The thing that
            holds <a href="http://www.mediamatic.net/person/24879">my
              Mediamatic profile</a> is represented by the node
            <code class="literal">generic/4efe2253-2242-4e01-bfdf-957cc2a9481d</code> at
            <code class="literal">pubsub.mediamatic.nl</code>. All things in this site,
            but also the <a href="http://www.picnicnetwork.org/">PICNIC
              site</a>, have nodes like this. In a future post I will
            explore what we do with these nodes.</p>

        
        
      

      <p xmlns="http://www.w3.org/1999/xhtml">In this part, we explored how one could organize the nodes that
        entities can subscribe to to get updates. Some might be tied to the
        (virtual) JID of the user's account, or associated with the JID of the
        service itself. Node identifiers might be human guessable, and like
        the web URIs, or could be seemingly random opaque strings.
        Implementations that consume subscribe to, and consume notifications
        from, the nodes at social networking services, should not assume
        anything about the organization and naming of the providing service.
        This presents a challenge for the next episode: how does one know
        which nodes are there and what they are called? So, up next:
        discovery. Homework assignment: look carefully at the HTML of my
        Mediamatic profile page.</p>

    ]]&gt;</content:encoded></item><item><title>XMPP and Social Networks, part 1: Notifications</title><link>http://ralphm.net/blog/2008/07/26/xmpp_social_networks_1</link><dc:date>2008-07-26T16:12:11+02:00</dc:date><content:encoded>&lt;![CDATA[<p><i>What you can subscribe to and how notifications are sent
				out.</i></p>
			

			<p xmlns="http://www.w3.org/1999/xhtml">The use of XMPP publish-subscribe in federation and third-party
				applications deviates a bit from the standard use-case. Usually
				publishing, subscribing and receiving notifications happen through
				the same protocol on specific (leaf) nodes. Entities subscribe to a
				node that represents a particular thing they are interested in
				getting updates for, and when an item is published to that node,
				these subscribers will receive a notification for that item.</p>

			<p xmlns="http://www.w3.org/1999/xhtml">For federating social networks, the focus is on the exchange of
				updates on social objects or comments between services. For
				third-party applications, the most important thing is getting
				updates, preferably as soon as possible. So, for both of those use
				cases, receiving notifications through XMPP gives it an edge over
				HTTP: no polling, lower latency, less connections.</p>

			<p xmlns="http://www.w3.org/1999/xhtml">How these items are published, does not really matter that
				much. What you will typically see is that services somehow have a
				new item available (submission via the web, SMS, e-mail or a
				web-based API) and want to expose that through XMPP. Posting a new
				update through XMPP from a third-party client usually does not
				provide an advantage over existing web-based APIs.</p>

			<p xmlns="http://www.w3.org/1999/xhtml">For a service like Jaiku, Twitter or Identi.ca to provide XMPP
				publish-subscribe support, it is important to define the
				<em>subscribable unit</em> and provide that as a
				node. Such a node will usually not be published to directly, but is
				more of an aggregate node. Examples would be: all updates by a
				particular user, all updates in particular channel, all updates by
				a user and his contacts, all public updates. An other example could
				be: all comments on a particular social object.</p>

			<p xmlns="http://www.w3.org/1999/xhtml">Conceptually, all such aggregate nodes are internally
				subscribed to a particular subset of new and updated social objects
				and comments. You might even implement it exactly like that. Think
				of a prospective search that is captured by a node: every time a
				new item comes into the service, it is determined which of the
				provided nodes would be a match for this item, based on author,
				contact lists and permissions. Subsequently, for all of those
				nodes, a notification will be sent out to its subscribers. Telling
				items apart in this scenario is then likely not done using the
				service JID, node identifier of item identifier, but using some
				identifier in the payload, like Atom's <code class="literal">id</code>
				element, although those other identifiers might provide a
				context.</p>

			<p xmlns="http://www.w3.org/1999/xhtml">For those familiar with the concept of XMPP publish-subscribe
				collection nodes: those would be a special form of aggregate nodes
				that make it explicit what their relationship to the nodes they
				aggregate items for is.</p>

		]]&gt;</content:encoded></item><item><title>XMPP Summit #5: XMPP and Social Networks</title><link>http://ralphm.net/blog/2008/07/26/xmpp_summit_5</link><dc:date>2008-07-26T16:12:05+02:00</dc:date><description>
					A brief overview of the 5th XMPP Summit and an introduction
					into a series of articles on XMPP in social networks, focusing on
					federation.
				</description><content:encoded>&lt;![CDATA[<p><i>An introduction...</i></p>
			

			<p xmlns="http://www.w3.org/1999/xhtml">The major topics on the 5th XMPP Summit were Jingle, and XMPP
				as a complementary protocol next to HTTP for building social
				networking services, as <a xmlns="" href="http://stpeter.im/">stpeter</a> briefly <a href="https://stpeter.im/?p=2227">mentioned</a>. While I think
				that the <a href="https://stpeter.im/?p=2228">consensus on OAuth
					over XMPP</a>, was very important, I think we also settled on
				a good set of best practices for federating social networks using
				<a href="http://www.xmpp.org/extensions/xep-0060.html">XMPP
					Publish Subscribe</a>.</p>

			<p xmlns="http://www.w3.org/1999/xhtml">This particular topic has had my full attention over the last
				year or so, and it is about time that I start writing about that,
				explaining the afore mentioned best practices in their context. As
				this covers a lot of ground, I'd like to make a series out of it,
				each detailing a particular aspect.</p>

			<p xmlns="http://www.w3.org/1999/xhtml">Topics that will come by include: the <em>subscribable
					unit</em> and how notifications are generated, payload
				formats, discovery, local representation and implementation
				strategies.</p>

		]]&gt;</content:encoded></item></channel></rss>
