Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Updated docs #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 16 additions & 1 deletion Readme.md → README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
# AEA Storj File Uploader

## Intro

This agent is responsible for doing an automatic upload of files to the decentralized storage grid StorJ using their S3 compatible gateway.

The following list briefly explains the steps which the agent takes:

- Once this agent is started, it tries to create a new bucket on StorJ if it isn't created already.
- After the bucket is ready (it already exists, or it is created) the agent sets up the storj handler and behaviour
- Starts listening to the upload directory (`src/storj_agent/upload_dir`)
- Once a file is ready in the directory the storj_file_transfer protocol fires a message to the StorJ connection
- The message is processed and the file is uploaded to StorJ
- The agent generates a publicly available URL for the file uploaded

This flow is visualized in [Strategy Flow](strategy_flow.md).

## Prerequisites

To setup the project, make sure you have the latest verson of pipenv first:
To setup the project, make sure you have the latest version of pipenv first:
```
pip install -U pipenv
```
Expand Down
2 changes: 2 additions & 0 deletions docs/demo.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## Demo
For this demo we used the S3 Compatible Gateway for StorJ. *Note that there are connection variables that you need to provide in the .env file to run this agent successfully with StorJ. Check the Readme for more*.
This agent is available under `src/storj_agent`.

You are probably already running the agent in one of your terminals. To further test out and demo the agent, you can just add a file to the `upload_dir` directory and watch for the agent's output in the terminal and the StorJ gateway URL for your publicly available file.

Expand Down
22 changes: 3 additions & 19 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
# STORJ AEA For Uploading FIles Through the S3 Compatible Gateway

This agent is responsible for doing an automatic upload of files to the decentralized storage grid StorJ using their S3 compatible gateway.

The following list briefly explains the steps which the agent takes:

- Once this agent is started, it tries to create a new bucket on StorJ if it isn't created already.
- After the bucket is ready (it already exists or it is created) the agent sets up the storj handler and behaviour
- Starts listening to the upload directory (`src/storj_agent/upload_dir`)
- Once a file is ready in the directory the storj_file_transfer protocol fires a message to the StorJ connection
- The message is proccessed and the file is uploaded to StorJ
- The agent generates a publicly available URL for the file uploaded

This flow is visualized in *Strategy Flow*.

For this demo we use the S3 Compatible Gateway for StorJ. *Note that there are connection variables that you need to provide in the .env file to run this agent successfully with StorJ. Check the Readme for more*.
This agent is available under `src/storj_agent`.
# Protocols

### `eightballer/storj_file_transfer:0.1.0` Connection

Expand All @@ -23,8 +7,8 @@ The main task of this connection is to connect and mediate the file transfers to

### `eightballer/storj_file_uploader:0.1.0` Skill

Very simple behaviour where the agent reads and searializes the file that needs to be uploaded into an Envelope with bytes content.
Very simple behaviour where the agent reads and serializes the file that needs to be uploaded into an Envelope with bytes content.

### `eightballer/file_storage:0.1.0` Protocol

This protocol is in place to allow for communication between the different components of the agent, in this case between the above mentioned connection and skill.
This protocol is in place to allow for communication between the different components of the agent, in this case between the above-mentioned connection and skill.
2 changes: 1 addition & 1 deletion docs/prerequisites.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Prerequisites

To setup the project, make sure you have the latest verson of pipenv first:
To setup the project, make sure you have the latest version of pipenv first:
```
pip install -U pipenv
```
Expand Down