-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Practically) remove message size limit #69
Comments
Proposed formal definition:
|
Alternate, potentially more dense, more CPU-heavy proposal:
|
Proposal one saves ~11 bytes per standard message. Proposal two saves ~13 bytes per standard message. The key difference is that proposal two scales better. It means that a message is denser if you send a single large packet, and several small ones. This is especially the case for things like the |
Proposal 3:
One problem that this does not address is that in some C and Javascript environments, they cannot reach even the 4GiB limit. For instance, the C99 standard defines size_t must hold at least 16 bits. This is definitely not the 32 that we need there. Additionally, node.js has a maximum Buffer size of 2 GiB. A proposal needs to be made which addresses these local implementation inconsistencies. As it stands now, the Python implementation (and possibly also the Golang one) is the only one that keeps this part of the standard valid across all environments. This proposal should be extendible to reach such a position, but I do not at the moment know how. |
That problem, outlined more clearly, is as follows. C/C++/Obj C:
Javascript:
My first thoughts are:
|
I'll be closing this issue to split it into its appropriate parts. They will link back to here. |
Proposal: add 1 byte to size header which describes the length of the size header and packet header. New structure would be roughly:
For automated messages this saves ~11 bytes each. It also expands the possible message size/packet length from 2564-1 to 256255-1.
The question is, does this render a sufficiently large increase in complexity that it's not worth it? For instance, this means that
struct
will no longer work for the purpose. This will have lots of effects on how fast/slow the program becomes, and it may not be worth it.Strangely, this may make the Javascript side easier, as it forces me to remove a dependency.
The text was updated successfully, but these errors were encountered: