According to my experience, it is quite easy to implement a spreadsheet that can be accessed by a single user even with multiple views. In this project, a spreadsheet must be accessed by multiple users that spread over a network, and different user may have several views of the spreadsheet. I can image there are a lot of network programming. Under the suggestion of Prof. Hans Vangheluwe, it may be easy to use Pyro, which is Python remote object. I have no exprience with Pyro. So the main risk for me is whether Pyro is suitable for this project. So the early work was devoted to learn Pyro and try some examples.
In order to access a remote object in Pyro, you must know the object's name that registered in the Pyro Name Server. In our project, we have a single centralize spreadsheet. All the user can not query the spreadsheet until the server was started. So it is possible that giving a specific name to the spreadsheet object, and let all the users know this registered name. This solve the problem when a user initialize a talk with the server. But how about the server initialize a talk to a user. We have to solve the latter one since the server have to notify all the user as soon as the spreadsheet is updated. There are two possible problems:
Based on the above analysis, I would like to implement in the following way: when a client want to access server, it talks to a Pyro proxy object. At the same time, a socket connection between the server and a client is kept so that the server can talk to the client.
In this experiment, I have a server that registers an instance of the coordinator class in Pyro Name Server. I also have a Partner class, which can access the instance of the coordinator class by using Pyro proxy object. When an instance of Partner talk to the server, the server will send back a data to all the Partner instances on a network through the socket connection between server and each Partner instance. This is similar to the project requirement that all the clients should notify the update.
How to run the source code: