Cook Computing

XML-RPC Problem with OpenDHT

March 29, 2006 Written by Charles Cook

If you use XML-RPC.NET to connect to OpenDHT at the moment you are likely to find that each request will hang for a minute or so until it times out. By trial and error I found that if you configure XML-RPC.NET to format XML-RPC request documents as a single line, calls will succeed. To do this use the XmlRpcClientProtocol UseIndentation property, e.g.

IOpenDHT proxy = (IOpenDHT)XmlRpcProxyGen.Create(typeof(IOpenDHT));
(proxy as XmlRpcClientProtocol).UseIndentation = false;
int ret = proxy.put(key, value, 10, "TestOpenDHT");

If, like me, you've not heard of OpenDHT before:

OpenDHT is a publicly accessible distributed hash table (DHT) service. In contrast to the usual DHT model, clients of OpenDHT do not need to run a DHT node in order to use the service. Instead, they can issue put and get operations to any DHT node, which processes the operations on their behalf. No credentials or accounts are required to use the service, and the available storage is fairly shared across all active clients.

This service model of DHT usage greatly simplifies deploying client applications. By using OpenDHT as a highly-available naming and storage service, clients can ignore the complexities of deploying and maintaining a DHT and instead concentrate on developing more sophisticated distributed applications.