SyncLink is a Network File System (NFS) designed to facilitate seamless file management across multiple clients. The system supports core operations like creating, reading, updating, deleting, and listing files and directories. With support for up to 50 clients, SyncLink enables efficient handling of file operations across distributed storage servers.
-
Create: Allows clients to create files and folders.
- Client Side: Connects to the Network Manager (NM), prompts the user for action, sends a Create Request, and processes the response.
- NM Side: Receives the Create Request, forwards it to the Storage Server (SS), manages CREATE_BACKUP requests, and sends a response back to the client.
- SS Side: Initializes the server, checks the root folder, registers paths, handles CREATE requests, and responds to NM.
-
Read: Provides clients with the ability to read file content.
-
Update: Facilitates updating the content of files and folders.
-
Delete: Enables the deletion of files and folders.
-
List: Lists the files and folders within a specified directory.
-
Info: Retrieves additional information about files.
-
Clients [50]: Supports up to 50 clients, allowing for directory mounting, reading, writing, file information retrieval, creation, deletion, and copying of files/directories between storage servers.
-
Other Features: Full support for multiple clients performing concurrent operations.
- SS_Root_0: Contains the primary files and folders.
- SS_Root_1: Contains additional files and folders, possibly for backup or distribution.
- Include
requests.hfrom the Common folder. - Use the
send_<request_type>_requestfunction.
- Include
requests.hfrom the Common folder. - Create a Request object.
- Use the
receive_requestfunction. - Check the
request_typeattribute to determine the request type and access the corresponding content.
- Include
responses.hfrom the Common folder. - Use the
send_responsefunction.
- Include
responses.hfrom the Common folder. - Use the
receive_responsefunction.
Each request includes a header, which is structured as follows:
- Request/Response Type: 1 byte (char)
- Payload Length: 8 bytes (uint64_t)
The payload immediately follows the header.
To create a file named a.txt:
- Header:
type='C', length=5 - Payload:
"a.txt"