You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.
I just found this project, it seems interesting. After I read payfile.proto, I have following comments/suggestions:
a) I suppose the protocol should work like request/response; single client->server message should trigger one server->client response. It seems that DownloadChunk(num_chunks=3) will trigger three Data() messages coming out of the server, which breaks the request/response "rule". I suggest to change "optional Data data = 6;" to "repeated Data data = 6;" so one DownloadChunk message will trigger exactly one Data response.
b) "chunk_size" should me a property of File message, not Manifest. Chunk size may be relevant to File itself (it is probably a function of file size), server may also store given File parsed in chunks on filesystem, to prevent disk seeks on client request.
c) price per chunk is currently "int32", Although 24 BTC per chunk seems to be enough now, I would prefer "uint32" or even better "uint64". Not all altcoins costs hundreds of USD each...
Thanks,
Marek
The text was updated successfully, but these errors were encountered:
Thanks for the feedback! The intention behind not having a strict req/response model was latency ... so you can tune the trust/latency tradeoff according to your device. Unfortunately because of how protobufs work, parsing a big Data message means loading it all into RAM unless you write special code to do SAX style parsing.
But yeah at some point it'd make sense to switch it to p2proto or some other library that offers simple request/response communication, and strip out the custom code for that.
The chunk size thing needs to be rethought indeed. I put the whole thing together in about two weekends so, not a huge design effort went in :)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi Mike,
I just found this project, it seems interesting. After I read payfile.proto, I have following comments/suggestions:
a) I suppose the protocol should work like request/response; single client->server message should trigger one server->client response. It seems that DownloadChunk(num_chunks=3) will trigger three Data() messages coming out of the server, which breaks the request/response "rule". I suggest to change "optional Data data = 6;" to "repeated Data data = 6;" so one DownloadChunk message will trigger exactly one Data response.
b) "chunk_size" should me a property of File message, not Manifest. Chunk size may be relevant to File itself (it is probably a function of file size), server may also store given File parsed in chunks on filesystem, to prevent disk seeks on client request.
c) price per chunk is currently "int32", Although 24 BTC per chunk seems to be enough now, I would prefer "uint32" or even better "uint64". Not all altcoins costs hundreds of USD each...
Thanks,
Marek
The text was updated successfully, but these errors were encountered: