Implementing a Remote File Service
--------------------------------------------------------------------------------
Instructions
This assignment requires extensive network programming skills. You need to implement a stateless remote file service
--------------------------------------------------------------------------------
Problem Statement
Write a remote file server program that supports the following file operations:
creat() Creates a file
open() Opens a file
seek() Seeks to a specific offset in a file
read() Reads from an already open file
write() Writes to an already open file
close() Closes a file
unlink() Deletes a file
--------------------------------------------------------------------------------
Client
For the client side, you should provide a library that an application can link to access the files at the server. The library should implement the following interfaces:
int u_init()
int u_creat(char * path, int mode)
int u_open(char *path, int flag, int mode)
int u_lseek(int fd, int offset, int whence)
int u_read(int fd, char * buf, int count)
int u_write(int fd, char *buf, int count)
int u_close(int fd)
int u_unlink(char *path)
u_init() should do the connection setup and any initialization at the client side. Rest of the functions have the same semantics as normal file system operations.
Server
The server should be implemented as a multi-threaded daemon process. One of the threads will be just waiting in a loop for client requests to arrive at a UDP port. Once the requests arrive, it will queue the request in a task queue and return to listening. One or more 'worker' threads will be waiting for tasks to appear in the queue. When tasks arrive, they will pick them up one by one and execute them, and return the result to the client.
(Why is multi-threading required? If you implement this in stages, implement a single-threaded sequential server first, which gets a request, processes the request, returns the results and then goes back to listening for requests. Compare the performance of this with the multithreaded one.)
Extra Credit: Implement some kind of caching scheme and pre-fetching at the server that will improve the performance of the server. Hint For UDP/socket programming, refer to "Unix Network Programming" by Richard Stevens or other similar books on Advanced Unix/network programming.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Complete ownership and distribution copyrights to all work purchased.
## Platform
Unix envronment must be coded in c language
## Deadline information
This assignment must be unique to me. Must have comments, coder cannot accept any duplicate assignment