PingBack: proposed XML server list format + central web service demo

Date view Thread view Subject view Author view Attachment view

From: Simon Willison (simon@incutio.com)
Date: Tue Sep 03 2002 - 20:05:56 BST


Hi all,

I've been playing around with the idea of a central web service that keeps
track of pingback servers around the 'net, as an optional alternative
method of discovering servers (for people who don't want the overhead of
<link> auto discovery). I've also been working on a suggested XML format
for storing and distributing localy cached lists of PingBack servers + the
URLs they are interested in.

First up, I'll describe my XML format. It can be used to store a list of
pingback servers along with a list of URL "patterns" that they are
interested in. For example, my blog only cares about URLs that start with
"http://www.bath.ac.uk/~cs1spw/blog/". The patterns to describe that looks
like this:

http://www.bath.ac.uk/~cs1spw/blog/[*]

For the purpose of demonstrating the format, let's say I'm also interested
in links to ANY subdomain of incutio.com. I can represent that with this
pattern:

http://[*].incutio.com/[*]

Here's the XML format I've been working with:

<pingbackServers>
   <server host="www.kryogenix.org" path="/mt/mt-xmlrpc.cgi" port="80">
     <urlpattern>http://www.kryogenix.org/[*]</urlpattern>
   </server>
   <server host="www.bath.ac.uk" path="/~cs1spw/blog/pingback/server.php"
port="80">
     <urlpattern>http://www.bath.ac.uk/~cs1spw/blog/[*]</urlpattern>
     <urlpattern>http://[*].incutio.com/[*]</urlpattern>
   </server>
</pingbackServers>

As you can see, it's a list of <server> elements each showing a host, path,
port and a list of urlpatterns that the server is interested in. The above
format is pretty flexible - it can be used by blogging tools to internally
record which servers they already know about, but it can also be used to
pass lists of pingback servers around.

IDEA: (just thought of this) - a file of this format could be pointed at by
the <link rel="pingback"> tag instead of pointing straight to the server!
That way auto discovery tools can find out what URL patterns are acceptable
to the server as well as just the normal server details.

I've also been working on a central web service (which incidentally uses
the above format internally). I've set it up and it currently accepts three
methods. Here are the details:

===============================

Server: development.incutio.com
Path: /simon/pingback/server.php
Port: 80

Methods:

pingbackcentral.addServer(host, path, port, urlPatternArray)
  - add a pingback server to the list held by the central web service
pingbackcentral.getServerList()
  - returns an array of structs, each representing a server stored in the
central web service.
pingbackcentral.getServersForURL(url)
  - returns an array of structs, each representing a server that has a
urlpattern matching the provided url

===============================

In addition, the XML file with the information stored by the server can be
seen here:

http://development.incutio.com/simon/pingback/serverlist.xml

Try adding new information using the pingbackcentral.addServer() method and
then reloading the XML file to see the changes.

This is all proof-of-concept work at the moment but I think it's shaping up
to be a useful addition to the pingback system.

Incidentally, my company have registered pingback.com and pingback.net
(.org was taken) and we should be able to start sticking stuff up there
shortly.

Cheers,

Simon Willison

-- 
Web Developer, www.incutio.com
Weblog: http://www.bath.ac.uk/~cs1spw/blog/

Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.5 : Tue Sep 03 2002 - 23:05:00 BST