 |
An NTP Serivce for JXTA
Status of this document
This document provides a proposal for the JXTA community. This document does not specify a JXTA standard nor an Internet standard of any kind. Distribution of this document is unlimited.
Abstract
This document proposes an NTP service for JXTA, based upon the Simple Network Time Protocol (SNTP) Version 4, which is an adaptation of the Network Time Protocol (NTP) used to synchronize computer clocks in the Internet.
It is assumed that the reader is familiar with the following protocols:
Introduction
For many applications, particularly business applications, a sense of accurate time is essential for the correct operation of the application. Furthermore where peer-to-peer communication is involved, it is often important for each peer to share the same perception of time to a high degree of accuracy. Finally, not all systems have a date/time clock.
JXTA does not provide a mechanism to ensure that participating peers share the same perception of time.
Conversely, the Network Time Protocol (NTP) does not specify a peer discovery protocol. The Simple Network Time Protocol (SNTP) specifies a peer discovery protocol based on a local subnet mulitcast. The astute reader will realise that combining NTP (or SNTP) with JXTA will provide JXTA with an acurate clock source and provide NTP with a discovery mechanism for peers participating in the NTP service.
Detail
The initial proposal is to define a JXTA message protocol for NTP requests and NTP responses, an advertisement to describe an NTP server and an implementation whereby participating peers may act as a proxy gateway between the JXTA network and the IP Internet.
Defintions
- jxntp client - a JXTA peer that takes on the role of an NTP client by sending NTP requests and listening for NTP replies over the JXTA network * jxntp server - a JXTA peer that takes on the role of an NTP server by listening for NTP requests, processing the request and sending NTP replies over the JXTA network, and publishing an advertisement describing the fact.
A jxntp server may optionally be a proxy server by forwarding the request on to an NTP server on the IP Internet, waiting for a response and then forwarding the response on over the JXTA network rather than processing the response itself.
There is nothing that prevents a peer performing the role of both jxntp client and server at the
same time.
JXTA NTP Message Protocol
The raw RFC1305-compilant message will be embedded in a JXTA message along with the sending peername and name of the originating server and sent to the recipient peer over the JXTA network using JXTA pipes. The recipent will process the message and return a reply in the same manner.
JXTA NTP Advertisement
jxntp server peers will create input pipes and publish the details in a JXTA advertisement for jxntp client peers to discover.
JXTA NTP propagate mode
jxntp clients and servers may also communicate using propagate pipes. This requires the client to send a propagate message and for the server to be listening on a propagate pipe that it has published in its advertisement.
Current Status
The API has been designed and coding is underway. I have end-to-end messages working but am having problems turning my jxta application into a proper jxta service. I'll propably post this document to the JXTA discuss mailing list once I have something working properly. Please email me for further information or if you would like to help out.
Futures
Once we have something that works properly, there are a number of possibilities for this protocol:
- Implement the full NTP specification in the JXTA server
- Provide drivers to read the popular NTP serial clocks - DIY radio clock receivers can be built for under 30UKP, 20USD, 30Euro
- Provide drivers to read other clock sources (such as the FIG0/10 packet from DAB radio transmissions)
-- MichaelDavey - 26 Apr 2004, 23 June 2004
|