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

Would like RsrService hooks to execute code before and after message send #116

Open
ericwinger opened this issue Jun 8, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@ericwinger
Copy link
Member

After a client service sends a message to remoteSelf, the server invokes that method and returns the result object. However, there are times when additional code needs to run after the method has completed to prepare the result object for transport back to the client, cleanup state, or for tracking. That work might be necessary after a variety of different messages are sent.

Example - The developer might like to know how many times a remote service is invoked regardless of which message is sent to the service.

It would be helpful to have a preMessageInvocation and postMessageInvocation hook in RsrService to do things like this.

@ericwinger ericwinger added the enhancement New feature or request label Jun 8, 2021
@kurtkilpela kurtkilpela self-assigned this Feb 8, 2022
@kurtkilpela
Copy link
Member

I'm hesitant to do this. If an error happens in either the pre or post message, what should happen? Should RSR abort and report on that error? In the post case, should it report on that error even though it successfully got a return value from the original message send?

I'm going to close this for now unless a compelling case comes up and we have reasonable semantics.

@kurtkilpela kurtkilpela closed this as not planned Won't fix, can't repro, duplicate, stale Oct 29, 2024
@ericwinger
Copy link
Member Author

The possibility of an error shouldn't preclude the addition of custom hooks. I'd like to leave this open unless there is a compelling technical reason not to do it. It doesn't have to be done anytime soon unless a specific need arises.

@ericwinger ericwinger reopened this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants