-
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
[WIP] Integrate new message-rpc prototype into core messaging API (extensions) #10809
[WIP] Integrate new message-rpc prototype into core messaging API (extensions) #10809
Conversation
d85ec88
to
c5dc1b3
Compare
c5dc1b3
to
82e6f2c
Compare
getWriteBuffer(): WriteBuffer { | ||
const result = new ArrayBufferWriteBuffer(); | ||
const httpUrl = this.createHttpWebSocketUrl('/services'); | ||
if (this.useHttpFallback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole HTTP fallback shouldn't be required anymore?
We're using socket.io
which should handle this natively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Yes this file is a remainder from the initial message-rpc PoC code drop and should be removed
Signed-off-by: Thomas Mäder <[email protected]>
…tensions) Integrates the new message-rpc prototype into the core messaging API (replacing vscode-ws-jsonrpc). This has major impacts and the Messaging API as we no longer expose a `Connection` object (which was provided by vscode-ws-jsonrpc) and directly rely on the generic `Channel` implementation instead. Note: This is a WIP PR that is not ready to be reviewed yet and contains a lot of temporary hacks and workarounds (e.g. commenting out of *.spec.ts* files that have compilation errors) and is currently only working in browser-applications. It's intention is to present the current state of eclipse-theia#10684 to interested parties. Contributed on behalf of STMicroelectronics. Closes eclipse-theia#10684
53f0198
to
ff7f4f8
Compare
- Refactor the message encoders of the new message-rpc protocol to improve overall performance. - Align main websocket creation: Implement `ẀebSocketMainChannel` class which is responsible for establishing the main websocket connection between frontend and backend. Use a `IWebSocket` wrapper so that the class can be reused in the frontend and backend runtimes and is independent of the actual library used for creating the websocket. - Improve rpc protocol error handling. In particular ensure that remote call errors are properly decoded to `ResponseErrors`. - 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 Uint8 arrays. - 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. Note: This is a WIP PR that is not ready to be reviewed yet as some concepts are not cleaned up yet or fully implemented (e.g. electron support & debug adapter protocol support) It's intention is to present the current state of eclipse-theia#10684 to interested parties. Contributed on behalf of STMicroelectronics.
ff7f4f8
to
6bcf872
Compare
@tortmayr still WIP? |
@tsmaeder Yes, still a little bit of code cleanup to do and testing to ensure that everything works as expected electron. |
@tortmayr do you mind joining the technical meeting on Wednesday in order to sync up our respective WIPs? I have been re-writing a few core APIs related to messaging, and I'd like to go over some of those changes with you to see if anything needs to be changed either here or on my side. |
@paul-marechal No at all, I'm happy to join the technical meeting on Wednesday. Could provide me with a link to your WIP so that I can have a look at it beforehand? |
@tortmayr here's the very wip branch. It builds but doesn't run yet. I rewrote our proxies to hook themselves to some e8b5605#diff-0e651b8d4ece117f58140576d68cb6a86b4ed1cb2c52057850b8dae52045c935R28-R34 Whenever you do I want to go over some other details during the call and see if some of the other abstractions will benefit you as well or not. |
This WIP PR has served its purpose as I now have opened the actual PR: #11011 |
What it does
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. In addition, the error handling and lifecycle management is improved.
vscode-ws-jsonrpc
protocol. This has major impacts and the Messaging API as we no longer expose aConnection
object (which was provided by vscode-ws-jsonrpc) and directly rely on the genericChannel
implementation instead.A performance test suite has been executed to mesaure the improvements gained by this change (See #10684 (comment) for more details).
Note: This is a WIP PR that is not ready to be reviewed yet and contains a lot of temporary hacks and workarounds (e.g. commenting out of .spec.ts files that have compilation errors). It is currently only working in the browser-context as the electron-ipc connection provider is not fully adopted to the new protocol yet.
It's intention is to present the current state of #10684 to interested parties.
Contributed on behalf of STMicroelectronics.
Closes #10684
How to test
Review checklist
Reminder for reviewers