-
Notifications
You must be signed in to change notification settings - Fork 98
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
APISIX-38 Allow async plugins #313
base: main
Are you sure you want to change the base?
Conversation
thx for your contribution, nice job welcome to review and leave comments if you are good at Java |
I think I have a decent level, so I could get a shot at it. Question is more about the time though ;) |
Hello all, TL;DR
|
@chibenwa should this PR be ready (not draft)? |
Hello Apisix community, Any update about this? |
E2E test case failed pls fix them at first |
Please point me to a doc telling how to run them locally because as explained in my email, and above in the PR the CI environment is broken. I did run locally |
Personal bet: The piece of code is so old that we might actually just need to Though I failed at locating cCI scripts in the ci folder nor in the e2e folder |
The docker worklow needs to be edited: https://github.com/apache/apisix-java-plugin-runner/actions/runs/12392272043/workflow I cannot do this within the scope of the PR, admin rights on the repo are needed to do so. @membphis can you get a shot at this? |
you can send me the patch, then I will help you to submit the PR thx |
I found this file location ^^ And the bet was correct. I'll write an example and a bit of doc. |
@membphis I think this could be merged... |
Please answer these questions before submitting a pull request
Why submit this pull request?
Bugfix (for crazy dudes like I who wants Apisix to run run Redis queries... Blocking the event loop IS a bug. In user code but that's a major source of bugs!)
New feature provided
Improve performance (for crazy dudes like I who wants Apisix to run run Redis queries...)
Related issues https://issues.apache.org/jira/projects/APISIX/issues/APISIX-38
Bugfix
CF #264
The lack of asyn support in this plugin is a major showstopper for doing anything complex.
Turns out I need to call a Redis DBs as part of an OIDC logout workflow cf
And I need to avoid blocking on the event loop. The current semantic do not allow for this!
CF my first try in linagora/tmail-backend#1412
New feature or improvement
It turns out that callback based APIs are trivial to adapt to asynchronous code.
What we just need is wrap the "write to the client" stuff in the callback. We thus implement the write as a terminal filter. Which gives asynchrony capability for free.
Possible drawbacks:
Next step