Distributed File System HARD Solution



In this assignment, you will be building a Distributed File System using the Linux inotify API

There are various Python/Java libraries that also extend the inotify API for usage in other programming languages.

The inotify API tracks changes to a given folder and can be used to update any changes made to files present in a folder. Use inotify to track changes on a given folder on a client machine & sync any/all changes to a main server using ssh or sockets.

The server doesn’t save any files. It just acts as a transit hub.

Whenever, a client machine syncs some files to the server, the server looks up the file type (eg.

.pdf, .mp3, .doc, .txt, .py)and sends it (again via ssh or sockets)to any 1 of given N storage nodes. The copy on the server is deleted and only an index is updated with the list of files present & what storage node they’re saved on. You can use Unix system calls to perform any of these given operations.

When the user tries to re-download a file they’ve saved on the Distributed File System, they should be able to query the server and get the list of files saved. Then they can send a request for a particular file to the server, which will then retrieve the file from the relevant storage node & return it to the user.

For the case of this Assignment, you can set this up using 1 laptop as a client machine, 1 laptop as a server and 1 laptop (running multiple sockets) as storage nodes (as different folders)

In case your team doesn’t have 3 members, just make the storage nodes on the same machine as the client (but use a different socket for the client & the storage nodes)

An example of such a system is given on the next page.

Additionally, for this assignment, we will have 2 progress check-in sessions before the actual submission date. One will be on 30th of April and the other will be on 3rd May.

This is to make sure you’re making constant progress towards the assignment as well as to answer any doubts you might have.

Since the deadline will be very close to finals week, please note there may be no options for an extension at the end.

# : You will also have the option to demo your final code before the 6th in case you have exams. Reach out in advance in case you want to figure this time slot out.

OS PA-2 | Page 2