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

Integrate new message-rpc prototype into core messaging API (extensions) #11011

Merged
merged 1 commit into from
May 25, 2022

Commits on May 25, 2022

  1. Integrate new message-rpc prototype into core messaging API (extensions)

    Refactors and improves the prototype of a faster JSON-RPC protocol initially contributed by @tsmaeder (See also eclipse-theia#10781).
    The encoding approach used in the initial POC has some performance drawbacks when encoding plain JSON objects. We refactored the protocol to improve the performance for JSON objects whilst maintaining the excellent performance for encoding objects that contain binary data. 
    
    Integrates the new message-rpc prototype into the core messaging API (replacing vscode-ws-jsonrpc).
    This has major impacts on the Messaging API as we no longer expose a  `Connection` object (which was provided by vscode-ws-jsonrpc) and directly rely on a generic transport `Channel` implementation instead. 
    
    - Introduce `Channel` as the main transport concept for messages (instead of the dedicated `Connection` from vscode-jsonrpc)
    - Replace usage of  `vscode-ws-jsonrpc` with a custom binary RPC protocol.
    - Remove 'vscode-ws-jsonrpc' depdency from "@theia/core/shared".
    - Refactor all connection providers to use the new binary protocol.
    - Ensure that the `RemoteFileSystemProvider` API uses  `Uint8Arrays` over plain number arrays. This enables direct serialization as buffers and reduces the overhead  of unnecessarily converting from and to `Uint8Arrays`.
    - Refactor terminal widget and terminal backend contribution so that the widgets communicates with the underlying terminal process using the new rpc protocol.
    - Rework the IPC bootstrap protocol so that it uses a binary pipe for message transmission instead of the `ipc` pipe which only supports string encoding.
    - Extend the `JsonRpcProxyFactory` with an optional `RpcConnectionFactory` that enables adopter to creates proxies with a that use a custom `RpcProtocol`/`RpcConnection`.
    
    The plugin API still uses its own RPC protocol implementation. This will be addressed in a follow-up PR. (See eclipse-theia#11093)
    
    Contributed on behalf of STMicroelectronics.
    Closes eclipse-theia#10684
    Co-authored-by: Thomas Mäder <[email protected]>
    tortmayr committed May 25, 2022
    Configuration menu
    Copy the full SHA
    a7977c5 View commit details
    Browse the repository at this point in the history