-
Notifications
You must be signed in to change notification settings - Fork 6
adding compress mode and checksum, as also split of symbol #59
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
sidebar_position: 8 | ||
--- | ||
|
||
# Compress Mode | ||
|
||
In the compress mode the object and member identifier are replaced with unique integer values. This will done automatically by the code generator, if enabled. The compress mode will shorten the message size as also reduce the time to compare identifiers on client and service side. For example a property change message will be reduced from 1 integer, 2 strings and 1 json value to 3 integers and 1 json value. | ||
|
||
``` | ||
[ PROPERTY_CHANGE, "org.demos.Echo", "message", "foo"] | ||
// 1 is the object id of "org.demos.Echo" | ||
// 2 is the member id of "message" | ||
[ PROPERTY_CHANGE, 1, 2, "foo"] | ||
``` | ||
|
||
The generated code will use the integer values for the object and member identifiers. To make this work and more reliable a checksum on a module level is introduced. The checksum is a hash value of the module content and will be used to verify the remote object is the same as the local object, to avoid using the wrong object or object version. | ||
|
||
The link message will carry an additional checksum value. | ||
|
||
``` | ||
[ LINK, 1, CHECKSUM ] | ||
``` | ||
|
||
There is no handshake messages, to ensure both client and services are in compress mode, this needs to be ensured during the deployment. If the client and service are not in the same mode, the link will fail, as the object identifier will not match. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be much work to extend the link message to also sync the mode? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exchanging the protocol version would also help reduce problems. |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify this, will it be really integers or will it be integers wrapped in strings?
[ PROPERTY_CHANGE, 1, 2, "foo"]
or[ PROPERTY_CHANGE, "1", "2", "foo"]
Depending on the answer we should also adapt the protocol to use integer based functions params.
Otherwise we can just use one method for both modes.