« Scarecrow | Main | Reading List: Le Camp des Saints »

Wednesday, June 18, 2008

HotBits: XML Support Added

Ever since its inception in May 1996, the HotBits radioactive random number generator has supported on-line Web access from within applications via the randomX package for Java, which also implements a variety of pseudorandom sequence generation algorithms. It's never been that difficult to obtain HotBits from within an application, as long as it's implemented in a language which provides a reasonably simple way of making Web requests or invoking applications such as Wget which can make them on its behalf.

Still, this is the age of “Web 2.0” (one wonders if “Web 2.1” will have all the functionality actually working, without the hype), so everything must conform to the contemporary community standards for such applications. I have just implemented an update to HotBits (Release 3.2) which adds XML as an option for delivery of the requested random data. The XML file format (here is a sample) strictly conforms to the XML standard and the document type description cited within the file.

You can request HotBits, specifying an XML reply, and parse it with the XML tools your application framework provides. Unlike other HotBits request formats, the result will always be well-formed XML: error documents are XML and contain a status which can be parsed with the same logic as successful results. The status codes in results are compatible with the HTTP protocol, and successful replies include additional information useful to applications such as the number of requests and bytes remaining before quota limits are imposed.

Because it's likely that errors spotted by early adopters who follow these epistles will result in fixes to the application, I haven't yet posted its source code in the usual place. When things settle down in a week or so, I'll update the source code archive on the Web and post a notice of its availability here.

Update: The source code for Release 3.2 is now posted. (2008-06-22 18:29 UTC)

Posted at June 18, 2008 22:39