Replies: 6 comments 9 replies
-
Solution 2 - The negotiatorThis solution might have better performance, but has a The idea is in this design RMB will has more active rule in upload process. Both local and remote RMB need to negotiate the upload before it's established: Requirements
Implementation
{
"service": "<remote side specific service unique for the remote service>",
"path": "/path/to/local/file/to/upload",
}
Cons of this design
Pros
|
Beta Was this translation helpful? Give feedback.
-
what if we have something like this |
Beta Was this translation helpful? Give feedback.
-
Solution 3 - The New ProtocolOkay, may be it's better to take a step back and rethink the entire protocol of RMB.
Requirement
Solution.
Now, how does this solve the issue? well it solve it by being more efficient.
Cons
Pros
|
Beta Was this translation helpful? Give feedback.
-
dear friends, we did not ask for a redesign at this stage, we don't have the time for it performance at this stage is not the main concern main requirements are
some remarks
if we make it a permanent connection we get other issues (websockets or tcp)
|
Beta Was this translation helpful? Give feedback.
-
if we wanna re-design we need to use different requirements
ofcourse there are things we could do more efficiently like symmetric encryption but I don't think the cost right now is worth the hastle the current ask can be done very easily, if we don't overengineer |
Beta Was this translation helpful? Give feedback.
-
This can be closed now since it's not relevant anymore to current system since rmb has been rewritten to phase out relying on yggdrasil. The new protocol is binary in nature (between peers) which can support efficient file uploads. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Requirements
There is a new requirement to support uploading files to remote destinations. This might be problematic now with the current protocol duo to the following limitations
This all makes it very inefficient to uploading binary files with the current protocol specs. Since for each file, the following will have to be done
offset
in each message (another piece of metadata that need to be included in the message)So it's obvious that the current protocol specifications out of the box is not good enough for this kind of transfer. Hence we discussing here all the possible "solutions" that can be implemented:
Solution 1 - The naive
This solution does not require any changes. Only requires implementing a service that runs on the remote rmb where the files need to be updated. The service will just implement 3 methods to handle
open
request, takes onlyfile
as a parameter, this file can either bepath
,name
orid
based on the requirements. This can also be empty (and the server decide what to name the file or where to store it) this is all according to the service operation and requirements.open
calls then return anupload-id
write
call, takes (upload-id, "data") as arguments, the method then (using the upload-id) append the data to the current open file.close
call, takes (upload-id), terminates the upload. Then takes whatever action is needed on the file.open
,write
repeatedly with the upload-id returned byopen
for each chunk of the fileclose
after all write call are complete.This solution while can be implemented now with no protocol changes, is obvious very inefficient, since for each call, an entire rmb messages is created, signed, encoded, and wired over http to remote destination, where it gets verified, unwrapped, and pushed to the service for processing.
Beta Was this translation helpful? Give feedback.
All reactions