Figure 2.1. Architecture Draft
The core application of each client has a native java interface to an indexing service, which accesses the shared folder and extracts meta-data from documents. Afterwards this metadata is stored in a database.
The user can control the client over a HTML-based GUI which is generated by a servlet which communicates with the client over a SOAP-Webservices interface. This interface is also open for other GUIs like J2ME or MS .NET clients.
Each client registers at the master-server. The master server knows who is online and has the ip-adresses of every client in memory. If a new client connects to the network, the master client can tell him the IPs of his peers. Therefore a SOAP-interface exists which the client can use to communicate with the master-server.
If an appropriate file has been found, the HTTP-Client of the core application connects to it's peer's HTTP-Server and recieves the requested file.