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 #42

Closed
wants to merge 11 commits into from
Closed

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

@tortmayr tortmayr force-pushed the plugin-rpc-v2 branch 2 times, most recently from 6eb943b to 037f099 Compare June 3, 2022 13:29
@tortmayr tortmayr force-pushed the plugin-rpc-v2 branch 4 times, most recently from b2be158 to d58af42 Compare June 3, 2022 14:06
@tortmayr tortmayr force-pushed the plugin-rpc-v2 branch 5 times, most recently from 0d32810 to d1fe95b Compare June 9, 2022 09:18
vince-fugnitto and others added 10 commits October 27, 2022 14:24
The commit fixes `unstage all` to properly reset the index rather than
report errors or discard changes.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
* docs: update changelog for `v1.31.1`

The commit updates the `changelog` for the `v1.31.0` release to
highlight notable new features, fixes, and any potential breaking
changes. The change also includes misc typo fixes.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
)

The commit adds unit tests for `GitScmProvider.unstageAll` to confirm that unstaging works correctly.

Signed-off-by: Vivien Jovet <vivien.jovet@torocloud.com>
The commit adds an entry for the `unstage all` fix in the `1.31.0`
changelog.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
The commit upgrades `socket.io` to fix a known critical vulnerability with `socket.io-parser`.

CVE: https://security.snyk.io/vuln/SNYK-JS-SOCKETIOPARSER-3091012

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
The commit includes the following changes:
- upgrades `lerna`
- upgrades `mocha` including our config files
- upgrades `minimatch`

The main reason of the upgrade was to fix known vulnerabilties and
benefit from the newer mocha version.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
The commit adds a note regarding the `socket.io-parser` resolution in
our migration guide for downstream adopters.

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
@tortmayr tortmayr force-pushed the plugin-rpc-v2 branch 3 times, most recently from 768950c to 2b4016e Compare November 8, 2022 17:26
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 `BatchingChannel` 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
@sdirix
Copy link
Member

sdirix commented Nov 16, 2022

Merged upstream with eclipse-theia#11261

@sdirix sdirix closed this Nov 16, 2022
AlexandraBuzila added a commit that referenced this pull request Jul 29, 2024
sgraband added a commit that referenced this pull request Jul 30, 2024
Added a view for displaying all the configured llamafiles.
Configured llamafiles can be started and killed.
One llamafile can be set as active, then being used in the chat.
The chat integration is currently hardcoded to use the active llamafile language model.
This should be changed as soon as the chat integration has a dropdown to select the language model (#42).
A follow up will be created to describe the next steps.
@sgraband sgraband mentioned this pull request Jul 30, 2024
1 task
sgraband added a commit that referenced this pull request Jul 30, 2024
Added a view for displaying all the configured llamafiles.
Configured llamafiles can be started and killed.
One llamafile can be set as active, then being used in the chat.
The chat integration is currently hardcoded to use the active llamafile language model.
This should be changed as soon as the chat integration has a dropdown to select the language model (#42).
A follow up will be created to describe the next steps.
sgraband added a commit that referenced this pull request Jul 30, 2024
Added a view for displaying all the configured llamafiles.
Configured llamafiles can be started and killed.
One llamafile can be set as active, then being used in the chat.
The chat integration is currently hardcoded to use the active llamafile language model.
This should be changed as soon as the chat integration has a dropdown to select the language model (#42).
A follow up will be created to describe the next steps.
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
5 participants