threefoldtech / rmb-rs

RMB implementation in rust
Apache License 2.0
3 stars 1 forks source link

file upload support on new rmb #103

Open muhamadazmy opened 1 year ago

muhamadazmy commented 1 year ago

The new rmb can support file upload as follows:

The UID is then can be used to pass to other services running behind rmb.

muhamadazmy commented 1 year ago

Specifications

The idea behind this feature is:

Peer file upload support

Only peers that are started with --upload-dir accepts file upload calls, hence a peer can choose if it can accept a upload call or not.

All peers though can accept requests to upload files from their local services. Hence the local peer will try to upload the file, and the remote peer can either accept or reject this request based on its configuration.

On accepting a local rmb.file.upload call with the path of the file the local rmb will spawn a routine to do the upload as follows:

muhamadazmy commented 1 year ago

Already started a new branch support-built-in-fn that already has some clean up of the code.