Hi YungSheng,
I think it is not necessary to broadcast updates in this assignment, and often it is not necessary in real life.
Broadcasting updates is a nice feature while you have a small number of clients connected. But as the number grows, the amount of network traffic that will be generated will be enormous.
Consider a normal hotel reservation system -
you should be able to reserve a hotel today from anywhere in the world. Just go into your local travel agent, or search on the web, find the hotel, and book it. Now reverse that scenario: each hotel reservation system would have to send updates to every connected travel agent and every connected web client anywhere in the world!
Nowhere in the specification does it require you to update all connected clients. So make life easier for yourself and leave it out. If you want to, put a comment in the design decisions document saying that you considered it and rejected it - that way you do show that you at least considered the idea.
But if you want to implement it, then it can be an interesting exercise - you will certainly learn more about RMI and using the Observable
pattern over RMI than if you leave it out
.
Regards, Andrew
[ January 08, 2004: Message edited by: Andrew Monkhouse ]