Skip to content
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

Consumer class creates an EmBER+ message that exceeds 1024 bytes #57

Open
Dylrak opened this issue Dec 3, 2019 · 0 comments
Open

Consumer class creates an EmBER+ message that exceeds 1024 bytes #57

Dylrak opened this issue Dec 3, 2019 · 0 comments

Comments

@Dylrak
Copy link

Dylrak commented Dec 3, 2019

Here follows an image of a message where the issue arises:
EmberGlow1680ByteMessage
The Consumer calls GetDirectory on all subnodes in this image, marked in red:
EmberGlow1680ByteMessageTree
Here follows the log file:
20191203_101213_UTC.txt

The bug in question arises whenever I try to call Consumer.CreateAsync() with the ChildrenRetrievalPolicy set to All. Using Glow Analyzer Proxy, I have been able to determine that the Consumer tries to send an EmBER+ message of over 1680 bytes long containing GetDirectory requests of over 44 nodes to the Provider (event number “6”, line 1716 in the log file). The Provider only answers with 27 nodes (processing only 1680/44×27=1031 bytes worth of GetDirectory requests), leading me to believe that the message construed by the Consumer exceeds the maximum set by the EmBER+ protocol. The same happens with a message of 1488 bytes, where 39 GetDirectory requests are only met with 27 nodes (meaning the provider only processes 1488/39×27=1030 bytes of data).

Looking at the EmBER+ documentation, on page 73 it says the following: “To avoid packets that may be too large for a provider or consumer with lower memory capabilities, the payload size of an Ember+ packet is limited to 1024 bytes. Due to framing overhead, the actual maximum length of an Ember+ packet is 1290 bytes.”

This means that the Consumer class creates an EmBER+ message that is too long for the Provider to read.
My suggestion for solving this is to split a GetDirectory request message up in two or more messages whenever it is going to exceed 1024 bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant