I want to write a Java Client/Server application which should do the following:
- Client connects to to one of two servers
- Server sends a text file or its content to the client
- User edits the file
- Client sends the file back to both servers simultaneously and reliably
- Client closes the application
Bonus: One of these servers might be down at the time of the transmission, so it needs to receive the file on startup.
What architecture or framework would be good and lightweight to enable this? Is JGroups a good start?
edit: I have to assume the following minimal network:
- One or more clients start the application but must not be allowed to edit the file at the same time.
- There are one or more servers, of which at least one is always active (which one is sort of random)
- The client has a .xml file with all server addresses