Recent Events for foo.be MainPageDiary (Blog)

URIDiscovery

URI/URL Discovery

Imagine the following the scenario, you are somewhere connected on a network (wired or unwired). You want to know the surrounding URLs and local services. But you just have a browser… and a minimal Python application.

Mechanism of Discovery

SSDP, ZeroConf? (Bonjour) or even FLUTE (RFC 3926) provides some announce service in a complex fashion. They often requires multicast enable and it's very difficult to ensure security of the source even if those protocols include complex mechanism of announce. URL Announce is designed to be simple. It doesn't care too much about efficiency.

URI/URL Announce Format

A UDP protocol is used on a fixed port (12555) until now not allocated by IANA ;-) The UDP message is in a UTF-8 format. The size of the announce is limited to the maximum UDP size being able to send on the link-local. The minimal message contains an URI (RFC 3986) followed by a newline. The additional ordered fields are time stamp followed by newline and signature also followed by newline.

A sample URL announce message with MD5 checksum (integrity) :

<pre> http://192.168.0.1/mylibrary/ Sun, 24 Aug 2008 12:22:33 GMT 9c855f739add83ef1df9e6ba5e2c2f521 <pre>

FAQ

Why is the protocol limited to single UDP frame limited by the link-local MTU?

To simplify the announce protocol to the simple approach. Reassembly or statefulness of UDP packets has always been an issue for correct implementation (e.g. just look at how it's to difficult to keep state while doing DNS request ;-). Today's link-local maximum transmission units are quite large and permit URL/URI announce without too much limitation.

Tags: