-
Notifications
You must be signed in to change notification settings - Fork 82
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
Allow Connect to existing enigma connection #528
Comments
Hey @konne! Thanks for the suggestion, it looks interesting and we have discussed similar approaches before. There are a few tricky things we need to figure out:
There are ways around these issues for sure, we'll just have to be careful to not break existing behaviour (and prioritize the feature, of course). |
Hey @peol, thanks for the longer discussion. |
I have a couple use cases in Qlik Sense client where I would like to hook in existing enigma session inside of an extension to prevent unnecessary rerenderings because of needless fired Validated or Changed events. An Interceptor would be a very good solution, right before the deltaResponseInterceptor here. There are (probably) some hacky ways to do already but would prefer an official way.. |
@ralfbecher If you connect a new websocket to an existing session you'll cause invalidations in the other websocket anyway, but maybe I'm misunderstanding you? We are currently looking into how to properly expose the enigma.js instance/configuration inside the Sense client; there may be changes needed in this library for that to happen, but it's unlikely (it's more of an implementation detail inside the Sense client). |
@peol yes, I didn't meant a new websocket connect but rather a hook into the existing session. |
@ralfbecher I have discussed that feature already in a longer session. The tricky point is the delta mode and that the new enigma don't know the history of the objects. |
@konne that's why I wanted to hook into an existing enigma instance and session.. |
As you know you create an enigma session by |
Description
Issues like #304 and #218 are more complex. Why not implement a new connect to that allows to have an existing enima.js connection as parameter.
So that you can have your own scoped enigma with Mixins, Interceptors and shemas without a conflict,.. but no new websocket connection, because the existing websockt connection is shared.
Some config like delta, url, createwebsocket are just ignored because they are used from the base connection.
There is only one tricky point. If the connection is a sharedConnection the requestID have to be fetched from the main enigma connection and not generated from the own enigma class.
a sample would be:
The text was updated successfully, but these errors were encountered: