Create a peer to peer network of Cameo servers
With the existence of Cameo servers running on different computers, it becomes easy to create a peer to peer network of Cameo servers.
The first thing is to create the links between Cameo servers. It will be done in the configuration file or programmatically for a more dynamic way. The link is twoway so that when a server attaches another one, both become available for the other one.
A simple API update can provides interesting features:
- Server.getLinkedServerList(): ServerList
ServerList:
- start(...): same interface than Server (add a special interface for common Server and ServerList?)
- connect(...): same interface than Server
- ...
- iterator(): ServersIterator. The ServersIterator class provides a dynamic iteration from the closest to the furthest (for node distance).
Load balancing is not implemented in the API: a simple start can be used: if it fails then try another server. The failure can happen if the application can only run once and is already running. Generalize the attribute multiple to have a maximum fixed number of instances?
Provide a load factor or simply let the client code do it?
Features must be simple. Complexity shoud be implemented in the client code.