-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Improvements & tweaks of the RPC system #12368
Comments
How would you rework them? Aren't they exactly capturing the mapping of rpc messages to general objects?
What's the goal here? I'd rather not introduce an abstraction if we don't abstract over at least two cases. |
The goal here is to enable easy reuse of the proxy functionality in combination with other rpc protocol implementations. The JsonRpcProxyFactory in theory is already implemented in a way to support this. It uses a In fact the ProxyFactory just uses the interface RpcServer{
sendRequest<T>(method: string, args: any[]): Promise<T>
sendNotification(method: string, args: any[]): void
} that is implemented by the
How would you rework them? Aren't they exactly capturing the mapping of rpc messages to general objects? Yes they are. However, one could argue that is mapping is the responsibility of the |
@tsmaeder After further working on this issue and reconsideration I agree with your initial statement and I have removed the items in question from the bullet list. |
Updates the outdated documentation for setting up RPC services by - Removing any notion of the old vscode json-rpc protocol. The neutral term RPC is used instead - Replacing the outdated loggingServer example with a current version of the taskServer - Removing sections of the documentation that are now obsolete because the underlying framework code has been reworked Note: he code snippets are based on eclipse-theia/theia#12581. So this PR is blocked until the referenced PR is approved and merged (the last section Part of eclipse-theia/theia#12368
Updates the outdated documentation for setting up RPC services by - Removing any notion of the old vscode json-rpc protocol. The neutral term RPC is used instead - Replacing the outdated loggingServer example with a current version of the taskServer - Removing sections of the documentation that are now obsolete because the underlying framework code has been reworked Note: he code snippets are based on eclipse-theia/theia#12581. So this PR is blocked until the referenced PR is approved and merged (the last section Part of eclipse-theia/theia#12368
* Update RPC documentation Updates the outdated documentation for setting up RPC services by - Removing any notion of the old vscode json-rpc protocol. The neutral term RPC is used instead - Replacing the outdated loggingServer example with a current version of the taskServer - Removing sections of the documentation that are now obsolete because the underlying framework code has been reworked Note: he code snippets are based on eclipse-theia/theia#12581. So this PR is blocked until the referenced PR is approved and merged (the last section Part of eclipse-theia/theia#12368
The new RPC system has been in test now for a quite a while and some minor issues have
been identified that could be fixed or tweaked:
Issues:
NotificationMessage
type requires aid
property. However, this property does not serve any purpose and could be removed (it is only needed to match request-responses but not for notifications)API improvements:
TheRpcMessageEncoder
/Decoder
interfaces could be reworked. In fact they are generic object encoders and not necessarily have to be used to encode/decode RPC messages.TheJsonRpcProxyFactory
could be improved to work with arbitrary rpc-protocol implementations. Instead of directly referencing the TheiaRpcProtocol
type it could use a generic wrapper interface for sending requests & notifications. This would make it easier to use the Proxy infrastructure with other protocols like vscode-json-rpc or gRPC.JsonRpcProxyFactory
Documentation:
JsonRpcProxyFactory
and related types has not been updated an is still referencing the old vscode-jsonrpc protocol. Ideally we would also rename and drop toRpc*
(e.g. RpcProxyFactory) because the underlying protocol is no longer json-rpc. Rpc is more generic and will also work if we decide to change the underlying protocol in the future.json-rpc
documentation should also be double checked to ensure that it`s up to dateThe text was updated successfully, but these errors were encountered: