Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
8b5f395
initial commit with basicfs
RohanPhadnis Jun 12, 2024
9c1f6be
added readme
RohanPhadnis Jun 13, 2024
260f53e
parsing CL args
RohanPhadnis Jul 11, 2024
810e18a
added text placeholder for mod file
RohanPhadnis Jul 11, 2024
3059d98
fixed deprecated software errors
RohanPhadnis Jul 11, 2024
d6915b1
removed logging and replaced builtin min
RohanPhadnis Jul 12, 2024
485d980
updated readme
RohanPhadnis Jul 12, 2024
32a68ef
added testing clause
RohanPhadnis Jul 12, 2024
99502c6
added print statements for debugging
RohanPhadnis Jul 12, 2024
c566181
ignoring readat error
RohanPhadnis Jul 12, 2024
ac39145
added abstraction files for testing
RohanPhadnis Jul 13, 2024
834ec54
added CL flags
RohanPhadnis Jul 13, 2024
af26f35
added readdir operation
RohanPhadnis Jul 13, 2024
b7ac88b
Merge pull request #1 from RohanPhadnis/feature_abstraction
RohanPhadnis Jul 13, 2024
25d2379
added s3fs prototype
RohanPhadnis Jul 18, 2024
af939e2
increased abstractability by removing file dependance and adding expl…
RohanPhadnis Jul 18, 2024
61cb3c5
Merge pull request #2 from RohanPhadnis/feature_grpc
RohanPhadnis Jul 18, 2024
0e560e4
added client-side comms
RohanPhadnis Jul 19, 2024
f2877c1
working remotefs
RohanPhadnis Jul 19, 2024
3f7d5d5
Merge pull request #3 from RohanPhadnis/feature_grpc
RohanPhadnis Jul 19, 2024
2c01db1
updated readme
RohanPhadnis Jul 19, 2024
fb4a179
Merge pull request #4 from RohanPhadnis/feature_grpc
RohanPhadnis Jul 19, 2024
4f51c23
added read-write lock logic
RohanPhadnis Jul 25, 2024
416859f
copied remotefs files for safe-remotefs
RohanPhadnis Aug 24, 2024
fc6b3df
finished untested safe remote fs
RohanPhadnis Aug 25, 2024
656cec1
client map allocation bugfix
RohanPhadnis Aug 29, 2024
b00706c
debugging pointer errors
RohanPhadnis Aug 29, 2024
6e4e68a
debugging memory issues
RohanPhadnis Aug 29, 2024
0eeb104
debugging
RohanPhadnis Aug 29, 2024
a4a07c8
debugging set info deadlocks
RohanPhadnis Aug 29, 2024
379e9bc
bugfix
RohanPhadnis Aug 29, 2024
1d218d1
request write bugfix
RohanPhadnis Aug 29, 2024
fd508e2
debugging write request
RohanPhadnis Aug 29, 2024
a3b9944
debugging write request
RohanPhadnis Aug 29, 2024
27e293f
added documentation
RohanPhadnis Oct 4, 2024
32a20ea
bugfix
RohanPhadnis Jan 7, 2025
e54159f
updated filesystem + SFTP untested implementation
RohanPhadnis Aug 17, 2025
c4a5a0b
debugging
RohanPhadnis Aug 19, 2025
c87624d
Merge pull request #5 from RohanPhadnis/feature_mftfs_refactor
RohanPhadnis Aug 19, 2025
a72fee2
latest go.mod
RohanPhadnis Aug 19, 2025
27ba869
bfs expanded
RohanPhadnis Aug 19, 2025
2c109b5
added missing methods
RohanPhadnis Aug 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -1213,4 +1213,10 @@ python-sdk/samples/env/*
python-sdk/venv/*
python-cli/venv/*
python-cli/mft_cli/poetry.lock
plugins/*
plugins/*


# mft-fs gitignores
mft-fs/mftfs_data/
mft-fs/mount
mft-fs/root
22 changes: 22 additions & 0 deletions mft-fs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use the latest Ubuntu image
FROM ubuntu:latest

# Install necessary packages
RUN apt-get update && apt-get install -y \
fuse \
kmod \
wget \
curl \
git \
build-essential

# Download and install Go v1.22.3
RUN wget https://go.dev/dl/go1.22.3.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.22.3.linux-amd64.tar.gz && \
rm go1.22.3.linux-amd64.tar.gz

# Set up Go environment
ENV PATH="/usr/local/go/bin:${PATH}"
ENV GOPATH="/go"
ENV PATH="${GOPATH}/bin:${PATH}"

187 changes: 187 additions & 0 deletions mft-fs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
<h1>MFT-FS</h1>

<hr>

MFT-FS is a FUSE-based extension to Airavata MFT. It provides the abstraction that unifies the different file I/O protocols into one filesystem.

<strong>The Problem:</strong>
<img src="images/problem.png">

<br>

<strong>The Solution:</strong>
<img src="images/solution.png">

<hr>

<h3>Operating System Filesystem (OSFS)</h3>

This was more of a learning/testing implementation. It creates a filesystem mount which provides implementations for each fileystem method. However, the implementation has identical behavior to the native filesystem of the computer. It is merely a filesystem that mimics the operating system's filesystem.

<hr>

<h3>Remote Filesystem (RemoteFS)</h3>

<img src="images/single_client.png">

This filesystem uses gRPC to exchange data between a client and a server. In this filesystem, the client has the FUSE mount running. The client's FUSE mount invokes FUSE operations remotely, using gRPC. Thus, all of the operations performed on the client will modify the server's operating system.

Note: RemoteFS is NOT threadsafe. Multiple clients reading and writing concurrently can cause race conditions and inconsistency.

<hr>

<h3>Safe Remote Filesystem (SafeRemoteFS)</h3>

<img src="images/many_clients.png">

This filesystem adds the safety layers on top of the remote filesystem. It uses a Concurrent Reads, Exclusive Writes (CREW) model. Prior to reading/writing a file, the client must request to read/write. This is a blocking operation. The server only grants access to the client when there are no writers. If a client is reading/writing, it is guaranteed that no other client can write at the same time. After a client is done reading/writing, it must send an acknowledgement.

<hr>

<h3>Instructions for RemoteFS</h3>

RemoteFS is a Filesystem supported over a gRPC-based TCP connection.

The following instructions assume Go v1.20.x and FUSE are installed on the system.

<ol>
<li><div>

Code can be installed using

```shell
git clone https://github.com/RohanPhadnis/airavata-mft.git
```

Perform all the steps below from the <code>airavata-mft/mft-fs</code> directory.
</div></li>

<li>
<div>
To get the <code>go.mod</code> file ready, use the following command:

```shell
cat gomod.txt > go.mod
```
</div>
</li>

<li>
<div>
To install all dependencies, run the following two commands:

```shell
go mod tidy
go install ./...
```
</div>
</li>

<li>
<div>
Before running, ensure you have the <code>mount</code> and <code>test</code> directories in the <code>main</code> directory.

```shell
mkdir mount
mkdir root
```
</div>
</li>

<li>
<div>
To run the server, use the command:

```shell
go run ./remotefs/servermain/server_main.go --rootDirectory ./root
```

This will run the server locally to interface with the FUSE client.

</div>
</li>

<li>
<div>
To run the client, allow the server to run in a terminal session. Open a new terminal and type:

```shell
go run ./remotefs/clientmain/client_main.go --mountDirectory ./mount
```
</div>
</li>

<li><div>
<strong>Important Final Step:</strong> Enjoy and report any bugs!
</div></li>
</ol>

<hr>

<h3>Instructions for OSFS</h3>

OSFS is a Filesystem Mount which uses the local operating system to interface with FUSE.

The following instructions assume Go v1.20.x and FUSE are installed on the system.

<ol>
<li><div>

Code can be installed using

```shell
git clone https://github.com/RohanPhadnis/airavata-mft.git
```

Perform all the steps below from the <code>airavata-mft/mft-fs</code> directory.
</div></li>

<li>
<div>
To get the <code>go.mod</code> file ready, use the following command:

```shell
cat gomod.txt > go.mod
```
</div>
</li>

<li>
<div>
To install all dependencies, run the following two commands:

```shell
go mod tidy
go install ./...
```
</div>
</li>

<li>
<div>
Before running, ensure you have the <code>mount</code> and <code>test</code> directories in the <code>main</code> directory.

```shell
mkdir mount
mkdir root
```
</div>
</li>

<li>
<div>
To run the project, use the command:

```shell
go run ./main/main.go --mountDirectory ./mount --rootDirectory ./root
```

This will mount the pass-through functions on the <code>./mount</code> directory. All operations will be computed and performed on <code>./root</code>

</div>
</li>

<li><div>
<strong>Important Final Step:</strong> Enjoy and report any bugs!
</div></li>
</ol>
Loading