I'm fairly new to this list and to gitorious, so I don't know what the correct protocol is for requesting code reviews, etc. I've submitted a few patches by private e-mail to laconi.ca developers before, but recently decided to join the mailing list and contribute like more of a normal person. But, being new here, I don't know whether it's best to write to this mailing list, or to add comments on gitorious? In lieu of guidance, I'll post here.
First, a belated introduction from myself, and a little bit about the kind of things I'm interested in contributing to laconi.ca. I'm very interested in data modelling and exposing data in machine readable formats. This interest has ultimately led me to RDF, which I believe to be the most Web-like way of representing data, and thus the best was of publishing data on the Web. Like a lot of people, I was initially put off by the nasty syntax of RDF/XML, but a few people helped me understand that this is just one way that RDF can be serialised from an abstract data model into a stream of bytes, and that there are other, more readable ways too (albeit ones that tend to enjoy less widespread support in software). I joined identi.ca back in January and was happy to note that it exposed much of its data as RSS 1.0 and FOAF, which are both RDF-based formats. My aim in contributing to laconi.ca is to get as much interesting information exposed in RDF as possible, in order to aid people "mashing up" laconi.ca data with other RDF data sources (such as dbpedia, etc), except of course those few pieces of information that must remain private (e.g. passwords, e-mail addresses, etc). Anyway, here are a few improvements to the RSS 1.0 feeds for review: http://gitorious.org/~tobyink/laconica/tobyink-laconica-dev/commit/7054337c7653352c5a4ac835704b6305f958517f This adds explicit links from each item in the feed to the accounts of that item's recipients. For example, if I were to post a notice that said: @evan: hello Then the RSS item would include a tag like this: <laconica:recipient rdf:resource="http://identi.ca/user/1#acct" /> An application could use this information to find, for example, all my messages addressed to evan, or I could analyse my feed and FOAF file together to find out a list of people I tend to chat to but haven't subscribed to, and thus get a suggested list of people I might want to subscribe to. Pretty useful info. You could kinda figure out this by scraping the message body for "@foo" type tokens, but that doesn't really work as there's no guarantee that the account is at the same server. Scraping the HTML version of the message body is slightly better, but it would still be better to avoid relying on scraping altogether, and just include this info in the RSS directly. Hence my patch. It does need some review though, as I'm concerned that it introduces some extra load on the database. It calls "common_relative_profile" for each account found in the message. It would be nice if someone could check how well it performs on a moderately sized site. http://gitorious.org/~tobyink/laconica/tobyink-laconica-dev/commit/016123cb7d1c8644070e89be76a61f6faea887c6 This patch just adds a link to the conversation ("in context") page from each item in the feed, assuming there is one. Pretty simple. I don't think it adds any extra database accesses. I can't see anyone objecting to it, so I'm not going to waste my time writing an extensive justification for it. http://gitorious.org/~tobyink/laconica/tobyink-laconica-dev/commit/a87aed5bc2ff850220776db727e9983523ce1481 This patch shrinks the file sizes of RSS 1.0 feeds slightly by reducing repeated assertions. It's an improvement on a patch I submitted a while back for adding commontag.org-style tags to RSS items. The old method was to, for each notice, for each tag say something like: this notice has tag <foo>. <foo> is a tag labelled "foo". <foo> has page <http://identi.ca/tag/foo>. <foo> has feed <http://identi.ca/tag/foo/rss>. Now, it just says that the first time a tag is encountered. Additional encounters of the same tag in other notices and it will just assert something like: this notice also has tag <foo>. But doesn't restate the label, page, feed, etc. Cuts down the file size which reduces bandwidth requirements, and CPU/memory requirements for consumers, albeit only very slightly. -- Toby A Inkster <mailto:[email protected]> <http://tobyinkster.co.uk> _______________________________________________ Laconica-dev mailing list [email protected] http://mail.laconi.ca/mailman/listinfo/laconica-dev
