What is Ferris JDJ Timeserver

Read JDJ Article

Time Server is a research & development application to learn about distributed notification via RMI. What is distributed notification? Well, when RMI is used, a classic client-server architecture is being employed. With client-server, communication is typically initiated by the client when the client makes a request to the server. The server then responds to the client. This communication is traditionally one way: client -> server. Distributed notification attempts to reverse this commuication. It attempts to have the server actively contact clients without a request from the client necessary. This communication is server -> client and not at all what is traditionally thought of when thinking about RMI.

What is distributed notification good for? One good example is event notification. If an event happens at the server, all registed clients can be told about it. This is a much better design pattern then having client repeatedly polling the server looking for changes.

This R&D project introduces the concept of a time server which operates in the complete opposite way of all time servers. Typically, a time client would ping the time server at regular intervals in order to adjust a internal clock to the correct time. The time server in this R&D project is completely different. To demonstrate distributed notification via RMI the time client operates very much like an ActionListener and the time server operates very much like a JButton. The time client adds itself to the server as an "action listener". The time server loops over its registered "action listener" objects and fires an event. In this R&D project, the time server fires an event every second so the "action listener" objects can be told what the new time is. Although the code looks and operates nearly identical to event notification in swing, it is very important to remember client-server and RMI is still being used.