How to make clients receive updates automatically. The clients will be Swing desktop clients and the application will be a rmi application on the server accessible via net. there is no issue of firewall :0
There are lots of ways for a client application to register with a server to receive messages. Java Message Service, JavaSpaces, even email. In Java one of the easiest approaches would be to use a HTTPserver and have the clients periodically query it for new data.
How big is a data update? Can updates be plain text? XML? Some other file format? Whats the maximum acceptable delay between an update being made available and all clients having the data?
Thank you William Brogden for responding me. I am interested in RMI solution. The data will not be big.
I have made a observer/Observable paradigm classes. The idea is that I have a observable object which will keep on running on the server and I have various Observer instances. Any change in the Observable is notified to the Observers over rmi. I have compiled these classes using JDK1.4.
And after that I compiled them using: rmic -d . RemoteObservable RemoteObservableImpl RemoteObserver RemoteObserverImpl
The package is adil.
Q. 1) Why am I getting RemoteObservableImpl_Skel.class and RemoteObserverImpl_Skel.class in addtion to RemoteObservableImpl_Stub.class and RemoteObserverImpl_Stub.class? I heard that newer compilers do not create skelton classes.
After starting rmiregistry I run RemoteObservableImpl using the following
I am successful in implementing Observer/Observable pattern atlast. it was a long standing desire!
I used three clients to test it from three different folders. The first client reflected it when the second client logged on; the fist and second clients reflected it when the third client logged on. The first client showed 3 messages, the second shwoed 2 and the last showed 1 message.