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

Remote Invocation - Add attributes support to remote invocation result [SPR-15633] #20192

Closed
spring-projects-issues opened this issue Jun 7, 2017 · 2 comments
Labels
in: web status: declined type: enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jun 7, 2017

Tomer Arbel opened SPR-15633 and commented

Spring's remote invocation infrastructure allows adding serializable attributes on a remote request in org.springframework.remoting.support.RemoteInvocation.
As the javadoc explains:

This is very useful for adding additional invocation data without having to subclass RemoteInvocation. (RemoteInvocation#addAttribute(...))

While this is supported on the remote request side, the response side does not support that.
Meaning, if there is a need to add data to the remote response, org.springframework.remoting.support.RemoteInvocationResult must be subclassed to contain the extra data.

I suggest adding attributes support to org.springframework.remoting.support.RemoteInvocationResult to match the capabilities of org.springframework.remoting.support.RemoteInvocation.


1 votes, 2 watchers

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jun 7, 2017

Tomer Arbel commented

An example for a use case:

  1. App1 on ServerA calls a cluster of App2 servers.
  2. An implementation of org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(RemoteInvocation) adds an attribute requestingServer=ServerA.
  3. App2 cluster routes the request to App2 on ServerE.
  4. An implementation of com.plimus.platform.remoting.RemoteInfoHttpInvokerServiceExporter.invoke(RemoteInvocation, Object) retrieves the requestingServer attribute and writes it to log.
    (All above is currently supported, all below requires this improvement)
  5. An implementation of org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocation, Object) (on ServerE) adds a response attribute respondingServer=ServerE.
  6. ServerA receives the response from ServerE, retrieves the responsingServer attribute and writes it to log.

@spring-projects-issues spring-projects-issues added type: enhancement in: web labels Jan 11, 2019
@rstoyanchev
Copy link
Contributor

@rstoyanchev rstoyanchev commented Nov 8, 2021

Closing since remoting support has been dropped for 6.0 in #27422.

@rstoyanchev rstoyanchev added the status: declined label Nov 8, 2021
@rstoyanchev rstoyanchev removed this from the General Backlog milestone Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web status: declined type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants