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

Use binary message RPC protocol for plugin API #41

Closed
wants to merge 2 commits into from

Conversation

tortmayr
Copy link

@tortmayr tortmayr commented Jun 3, 2022

What it does

Refactors the plugin RPC protocol to make use of the new message-rpc introduced with eclipse-theia#11011/eclipse-theia#11228.

  • Refactor plugin-ext RpcProtocol API to reuse the new message-rpc protocol

    • Remove custom RPC message encoding and handling reuse message-rpc
    • Implement QueuingChannelMultiplexer that queues messages and sends them accumulated on the next process.tick (replaces the old Multiplexer
      implementation)
    • Refactors proxy handlers and remote target handlers
    • Use Channel instead of MessageConnection for creating new instances of RPCProtocol
    • Refactor RpcMessageEncoder/RpcMessageDecoder to enable overwritting of already registered value encoders/decoders.
    • Add mode property to base RpcProtocol to enable switching from a bidirectional RPC protocol to a client-only or server-only variant.
  • Implement special message encoders and decoders for the plugin communication. (Replacement for the old ObjectTransferrer JSON replacers/revivers)

  • Adapt HostedPluginServer and HostedPluginClient API to send/receive messages in binary format instead of strings. This enables direct writethrough of the binary messages received from the hosted plugin process.

  • Adapt hosted-plugin-process and plugin-host to directly send binary messages via IpcChannel/BinaryMessagePipe

  • Remove incorrect (and unused) notification proxy identifiers and instantiation

    • NotificationExt was instantiated in the main context
    • There were unused notification proxy identifiers for main and ext in the wrong contexts

Part of eclipse-theia#10684
Fixes eclipse-theia#9514

Co-authored-by: Lucas Koehler lkoehler@eclipsesource.com
Contributed on behalf of STMicroelectronics

How to test

Review checklist

Reminder for reviewers

The commit fixes a minor typo in the `description` field for the `StrictSSL` cli option.

Signed-off-by: Prajwal Borkar <prajwalborkar5075@gmail.com>
@tortmayr tortmayr force-pushed the plugin-rpc-v2 branch 3 times, most recently from 390e06d to 9a15846 Compare June 3, 2022 12:59
Refactors the plugin RPC protocol to make use of the new message-rpc introduced with eclipse-theia#11011/eclipse-theia#11228.
- Refactor plugin-ext RpcProtocol API to reuse the new message-rpc protocol
  - Remove custom RPC message encoding and handling reuse message-rpc
  - Implement `QueuingChannelMultiplexer` that queues messages and sends them accumulated on the next process.tick (replaces the old Multiplexer 
    implementation)
   - Refactors proxy handlers and remote target handlers
   - Use `Channel` instead of `MessageConnection` for creating new instances of RPCProtocol
   - Refactor `RpcMessageEncoder`/`RpcMessageDecoder` to enable overwritting of already registered value encoders/decoders. 
   - Add mode property to  base `RpcProtocol` to enable switching from a bidirectional RPC protocol to a client-only or server-only variant.
- Implement special message encoders and decoders for the plugin communication. (Replacement for the old `ObjectTransferrer` JSON replacers/revivers)
- Adapt `HostedPluginServer` and `HostedPluginClient` API to send/receive messages in binary format instead of strings. This enables direct writethrough of the binary messages received from the hosted plugin process.
- Adapt `hosted-plugin-process` and `plugin-host` to directly send binary messages via  `IpcChannel`/`BinaryMessagePipe`

- Remove incorrect (and unused) notification proxy identifiers and instantiation
  - NotificationExt was instantiated in the main context
  - There were unused notification proxy identifiers for main and ext in the wrong contexts

Part of eclipse-theia#10684
Fixes eclipse-theia#9514

Contributed on behalf of STMicroelectronics

Co-authored-by: Lucas Koehler <lkoehler@eclipsesource.com>
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

Successfully merging this pull request may close these issues.

Performance of vscode.workspace.fs.readDirectory(Uri) is worse by *100 compared to vscode
2 participants