Computer SystemsII SearchEngine Server-Client
This is my Solution to the Computer SystemsII Search Engine
- SE-Server constantly listens thought the ‘Server Listener’ Class for connections from other servers, when a connection is revised a server worker is spawned, and the socket passed to the worker, which then fulfils any requests made by the connected server. This allows the
- Listener to keep accepted more connections.
- SE-Server maintains a list of all know running servers.
- SE-Server searches for additional local servers every 60 seconds
- SE-Server announces its presence to other servers every 60 seconds
- On a server with infinite resources, would be able to handle an infinite number of server connections.
- Allows the addition of an extra running server or the deletion of an existing running server
- dynamically while the multi-server system is running.
- SE-Server constantly listens thought the ‘Client Listener’ Class for connections from clients when a connection is revised a client worker is spawned, and the socket passed to the worker, which then fulfils any search requests made by the connected client
- On a server with infinite resources, would be able to handle an infinite number of client connections.
- When a search request is sent the client program either transmits the information of the matched website back to the client program for display, or sends the client program a error message if a matched website does not exist.
- If the Client Worker cannot find the keyword, it will send a search request to all other servers on the list of all known running servers.
- A set of records, where each record is formulated by two data fields: 1)Website Object containing website name, and website URL and 2) a short set of keywords describing of the website
- Database stored locally to search server.
- Can backup Database to .sdb files
- Can load .sdb files and merge into database
- On shutdown , the ‘Shutdown’ thread gets passed to JVM though the Runtime.getRuntime().addShutdownHook();
- The ‘Shutdown’ thread sends message to all other servers a copy the server’s database, to all other servers on the list of all known running servers.
Every 60 seconds the updater
- SE-Server searches for additional local servers.
- SE-Server announces its presence to other servers.
- Performs maintenance on the list of all know running servers, removing duplicates instances of itself, loop back addresses and inactive servers.
- Requests copies of the databases of all know running servers, and merges it into the server’s own database.
Mark: 1st – 84%
Computer SystemsII SearchEngine Server-Client by Gwilym Newton is licensed under a Creative Commons Attribution-Share Alike 2.0 UK: England & Wales License.
Based on a work at personal.vacau.com.