-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
[WiP] Shorten URL for explore #3795
Comments
We mentioned a temporary solution at the meeting, @fabianmenges what did you use for compression? lz-strings? |
I tried to use This is what I did in the swivel
And the in the url generation in
I didn't make any adaptions to the python side (for Swivel). |
I am concerned whether this won't clutter up the url table fairly quickly. Or did I miss a point here? Wouldn't it suffice to store the query parameters in the cache backend? Of course, the cache timeout for these entries should then be set to quite a long time, though... |
@rumbin I have same concern. I store this key in url table because I want to same some Fabian and Max had a suggestion: we compress all form_data from front-end, and send compressed string as a request parameter. I assume in server-side we still need to I saw we had a |
Currently Superset uses stateful url for explore chart. We append all query parameters in GET request. When user open a slice, or change one control to make a new query, Superset make a new GET request. Superset also provided a shorten url function, but this shorten url is only generated per user request (click a button from UI). Recently we see many failed requests within airbnb, when GET request's parameters are too many too long, which cause chrome browser throw 400 Bad Request error.
I am trying to provide a solution for this problem:
For each explore view request, we generate a cache_key for it, which is the MD5 hash of sorted query parameters. The slice/explore URL will be like:
http://localhost:8088/superset/explore/table/313/92bb019eda2cfb5ffc8a33cb7bae733f
Currently we already stored form_data as part of cache content with cache_key.
Server-side parses cache_key to get parameters, and pass it to front-end as part of bootstrap data.
In front-end, when user interact with controls, or update markdown slice, the arbitrary amount of query parameters, as well as the content of Markdown slice, will be POST to the server in the body of the request message. see [explore/dashboard] use POST instead of GET to fetch
explore_json
#2886.When generating dashboard bootstrap data, we should use shorten format as slice URL.
Explore view will still accept query parameters in GET request. These url parameters will be merged with parameters hash.
The text was updated successfully, but these errors were encountered: