Skip to content
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

REQ plugin #60

Open
alexgleason opened this issue Aug 1, 2023 · 1 comment
Open

REQ plugin #60

alexgleason opened this issue Aug 1, 2023 · 1 comment

Comments

@alexgleason
Copy link
Contributor

I haven't fully thought this through yet, but I sometimes wish I could hook into client requests. Like, to be able to get ["REQ", ...] and potentially change the filter or response, or trigger side-effects. Maybe AUTH could even be implemented in a req plugin.

I still don't know if this is even a good idea yet, but I figured I'd drop it in case it strikes anyone else who might be having similar ideas.

@hoytech
Copy link
Owner

hoytech commented Aug 7, 2023

Hey, yeah this is a cool idea and would open up a lot of use-cases. You might even be able to do AUTH with it, as you suggest.

However, I'm considering the performance implications of this. Handling the REQ messages is on the critical path for all read requests, so the user-specifiable code would need a very low overhead to not impact relay performance. I think the way we do the write policy plugins would not work here, except for low-traffic relays.

I'm not totally sure what the answer is, but I think eventually we'll want to figure something out about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants