Design Challenges - Trole
Lately I've been working on Trole, which meant: Test Role. It's like a bridge troll that let's properly vetted pass by. It needs a little work so it doesn't just eat everything that it doesn't let by and get too fat to perform it's job.
Allow me to explain all of what Trole actually does.
Trole will verify signatures and contracts and allow an authorized party to upload files across it's bridge.
It also will put completed files into IPFS and verify it's CID matches the signature. It needs some help in making sure these incomplete or unverified files get removed, or the bridge won't have space left for traffic.
It needs to know when verification expires, so it's IPFS files can be unpinned, and space freed for more paid content.
It handles partial upload, so if you are uploading a larger file and it gets interrupted, it can be resumed.
It needs to make it's space data available so it can be properly utilized in network traffic conditions.
It needs to know if it's operator has declined to store a file, or wants to store more files... only from blockchain attestations.
It can be a contract mediator that will build upload channels based on any factors, and verify the users are part of the file system.
Most of these processes are implemented, what remains is fine tuning of these processes to ensure a node doesn't run out of memory. Also important, is that this software will run on any architecture... as it's currently limited to linux distros.
This likely means it will be dockerized. Possible containing other software from the SPK suite, or bundled right along with IPFS.
One of the quickest ways to get a handle on what Trole is doing is looking at it's dependencies. I'm been moving away from postgres, with the following remaining.
- hiveio/dhive: Makes Hive Calls
- busboy: Deciphering HTTP requests and facilitating resume-able uploads
- cors: Allowing the bridge to be accessed from any website
- crypto: Generating keypairs and managing user friendly installs
- dotenv: Easy way to config the environment
- express: The webserver part
- fs-extra: Manages the File System
- hive-tx: Builds and signs transactions about file management
- ipfs-api: Manages IPFS
- node-fetch: Talks mostly to SPK APIs
Part of the spk-js that I'm writing also has to interact with Trole, in various places.
Hopefully I'll be able to go over some of the progress with these two packages at our Thursday meeting.
That Name, but I see what it does.
Is there a trole toll, to pin files to the IPFS hole?
I've never heard about a trole before but you've got a nice explanation
My question is what does the name mean? 👀
Just let me have my 1 spark of genius :p