-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Remove RapidJSON from Envoy #4705
Comments
@mattklein123 WDYT? |
(CC @jmarantz who reminded me we can do this now ;) ) |
Sure, though I'm not sure we want to start ripping anything out until we wait a bit and see if anyone complains about v1 being gone? (Note also that RapidJSON is used for v1 schema) |
FWIW, JWT auth filter still use it. |
@lizan I think any users can be converted fairly mechanically to using protobuf, since they can just switch to using |
Also CC @aa-stripe in the context of #4693 |
In that case, I need to switch this repo: https://github.com/google/jwt_verify_lib |
@qiwzhang ack. I think if we can at least try and avoid any new users of RapidJSON we can make this easier. @qiwzhang do you think it's reasonable to rewrite to using Struct + Protobuf<->JSON? If this turns out to be too much of a pain, or there are other advantages of RapidJSON (better formatting, better error messages), we can stick with status quo. |
I can try, it should not be that difficult. |
admin interface that displays stats in json format still uses it |
@ramaraochavali yeah, but that should be possible to convert. I think everything internal to Envoy should not be a huge problem, it's more sticky with external deps though. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions. |
This PR will remove rapidjson from jwt_verify_lib. |
Looks like the Zipkin tracer has become a user of RapidJSON as well |
@yanavlasov any chance you can take a look at this? It's in the bucket of "reducing our external dependencies". |
FYI this will be much easier when all of the v1 code/schemas are deleted, which I think can finally happen once 1.12.0 is cut. |
I'll take this one. When is 1.12.0 being released?
…On Mon, Sep 2, 2019 at 9:15 PM Matt Klein ***@***.***> wrote:
FYI this will be much easier when all of the v1 code/schemas are deleted,
which I think can finally happen once 1.12.0 is cut.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4705?email_source=notifications&email_token=ABQQXW6OOEFPEBQ43PG6JO3QHW3EDA5CNFSM4F3G2SVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5WXTUY#issuecomment-527268307>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQQXWZEH3AC5ZFJLJXQT33QHW3EDANCNFSM4F3G2SVA>
.
|
@yanavlasov EOQ |
An update on this. It's not sufficient to switch RapidJSON to iterative parsing FWIW, since the Json There should be no new uses of RapidJSON, or Once we cut 1.12.0 and v1 is gone, we can move forward with this. |
Now that 1.12.0 has been cut, we can move ahead with this. @derekargueta are you planning to remove the remainder of the v1 JSON sites? That's probably the first step. |
@htuch done :) |
Did rapidjson perform better than the current protobuf json parser for access logging? I would love to get rid of rapidjson as well. I think maybe improving json formatted access logging could be done orthogonally, it seems like protocol buffer json parsing is a little nitty with what is fast (e.g. ListValue's are slow). Another high performance alternatives is the gRPC JSON parser, but I don't see any benchmarks for it online. |
Another option would be https://github.com/nlohmann/json ? I remember @htuch said it has been tested internally? |
Actually that would be the most ideal from our perspective!! |
Given that we no longer use JSON schema, any of our JSON needs should be very simple, so I think any supported/fast library is fine! |
I skimmed the But if we get these guarantees through another library as well, I'm all for it. On a side note, it's lame that the qps drops so much when using json logging :( |
Yes, |
Sounds like a plan! I'm guessing it will be very straightforward to swap. |
I'm in general agreement, but could someone walk through the formalities of answering the questions in https://github.com/envoyproxy/envoy/blob/master/DEPENDENCY_POLICY.md#new-external-dependencies? Since this is an new dependency, we'd like to make sure we walk through this checklist. |
CC @moderation |
Sure! I'll give it a shot.
Where this was lacking:
|
Thanks @asraa, that's really thorough. I think this scores relatively high on our criteria, @envoyproxy/dependency-shepherds WDYT? |
SGTM! |
SGTM too |
This has been replaced by nlohmann/json envoyproxy#4705 Unfortunately this library cannot be removed entirely because it is used by opencensus-cpp. We continue to load it here because upstream they do not pin the dependency to a specific version, which could lead to random failures as that library is updated upstream. Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
Now that v1 has been officially deprecated and is on track for removal in the near future, we shouldn't need RapidJSON anymore. All JSON parsing and printing should be possible via the protobuf library. This will simplify dependencies and reduce the trusted compute base.
The text was updated successfully, but these errors were encountered: