-
Notifications
You must be signed in to change notification settings - Fork 94
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
shared-state: provide compressed cgi-bin endpoints #911
shared-state: provide compressed cgi-bin endpoints #911
Conversation
Codecov Report
@@ Coverage Diff @@
## master #911 +/- ##
==========================================
- Coverage 76.41% 76.38% -0.03%
==========================================
Files 47 47
Lines 3934 3934
==========================================
- Hits 3006 3005 -1
- Misses 928 929 +1
Continue to review full report at Codecov.
|
Second option sounds good. |
I think we could choose 1st option with Accept and Content-Type http headers , and OPTIONS requests, as an standard mechanism |
Do you see how without adding additional requests per request or maintaining a state per peer and adding at least one more request in the flow? |
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.
Seems a good idea to me, for the future I agree on following the libremesh tradition (so we keep it lightwight) providing upgrade path instead of retro-compatibility.
About the code do I understand well that you forgot to delete a couple of lines from the former code?
packages/shared-state/files/www/cgi-bin/shared-state-multiwriter
Outdated
Show resolved
Hide resolved
No, what I had in mind was using an additional OPTION request. Now that I understand the "upgrade path" proposal I also think that it's the best option. |
Add compression support to the public synchronization endpoints so that the data is transmitted and received using gzip when appending ?gzip to the URL query-string.
f4ee585
to
75b53d5
Compare
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.
Thanks @spiccinini !
I've run the following test:
|
For me whatever works is ok :) |
right but the idea is to minimize issues, even if it is not fully compatible if the shared db does not work while you are upgrading the mesh then it will be harder for the community. So for this at least for me it is important. |
Add compression support to the public synchronization endpoints so that the data is transmitted and received using gzip when
gzip
is part of the URL query-string.Why? mainly to help shared-state syncing when there is a bad quality link (low signal, too crowded airspace, etc) reducing the amount of packets that have to be transmitted. Also this leads to reduced bandwidth usage.
This change in its own does not change the current behaviour (uncompressed) but allows to use this feature in the future. There are two main possible mechanisms with different backwards compatibility policy:
I am more inclined to do the 2nd option as the first option not only adds code complexity but also runtime overhead and/or runtime complexity. What do you think?