Friday was another excellent day in terms of Ph.D work and other spheres. I fixed up any remaining glitches with the wide-area part of my protocol. To be completely honest, I’d conveniently overlooked the problem of how to ensure correctness of my protocol during the short period of time after a new Superstring resolver joins the network. In my prototype, services descriptions are purged from a resolver thirty minutes after they are advertised. Therefore services are required to re-advertise themselves every thirty minutes if they wish to be discoverable. This is just a typical soft-state protocol. If a new resolver joins the network, then because of the way Superstring makes use of an underlying distributed hash table, queries which formerly might have been directed to one resolver could be directed at the new resolver. If, just prior to the new resolver joining, a service has just re-advertised itself, queries that would match this service will go unresolved for a thirty minute period (that is, until the service re-advertises itself again). This state of affairs is not acceptable in many circumstances. To combat this, for the first thirty minutes after joining, the new resolver executes the query itself and forwards the query to the resolver which would formerly have been responsible for resolving the query. It then performs the union of the two resulting sets of matching services, and returns this as the response to the query. After the initial thirty minute window of uncertainty everything is as it should be, and it no longer needs to forward any queries. The forwarding of queries by a new node for the first thirty minutes after joining is a small price to pay, especially for long-lived environments which the wide-area half of this protocol is intended for.
So far, during debugging, I’ve tested the wide-area protocol in an environment consisting of three machines. Query resolution is fast, even for detailed queries. However, a new node seems to take quite a long time to join the network due to the underlying distributed hash table protocol (Chord). I’m not sure if this is due to Chord itself, or whether I’ve done something incorrectly in my Chord implementation. I’ll have to check this out.
Today I finished reading Jude the Obscure and started reading Two on a Tower. Jude was very heavy and ultimately quite depressing, though I still love Hardy’s writing style. The last hundred and fifty pages or so were read very speedily. In my last entry I reported that I was feeling very happy. That was until I reached a certain part of Jude, which brought me back down to Earth rather quickly. Anyone who has read the book will undoubtedly know the event in the book to which I allude. Overall, I think I appreciated Tess of the D’Urbervilles a bit more than Jude. Thankfully, Two on a Tower has started more brightly than either of those two books. It could even be said to be humorous in parts. I thought the passage in chapter 2 involving the choir was particularly amusing!
Time for dinner!