-
Notifications
You must be signed in to change notification settings - Fork 61
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
Refactor server communication to JSON-RPC #990
Refactor server communication to JSON-RPC #990
Conversation
@bhufmann regarding these two points in the description:
The plan would be to make the Is there anything that would speak against this rename and redesign from your perspective? Otherwise, i would also open the contribution on tsp-typescript-client and adjust this PR. In the meantime you could already check out this PR as it would basically only be interface changes and the implementations will not change. |
Thanks for the contribution. I'm a bit stretch with time at the moment for the review and test, and hence I had to backlog it. Having said that, one team member will look into the impact on the latency so that we have an idea what the additional communication step adds for the visualization of large(r) data. |
theia-extensions/viewer-prototype/src/common/trace-server-connection-status.ts
Outdated
Show resolved
Hide resolved
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.
Thanks for this promising effort, well appreciated! Some comments for me as well, herein.
packages/react-components/src/components/abstract-xy-output-component.tsx
Outdated
Show resolved
Hide resolved
theia-extensions/viewer-prototype/src/browser/trace-viewer/trace-viewer-contribution.ts
Show resolved
Hide resolved
This commit adds a study on the impact of the JSON-RCP patch on the Theia Front End - Back End - Trace Server communication speed. Relates to eclipse-cdt-cloud#990. Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
This commit adds a study on the impact of the JSON-RCP patch on the Theia Front End - Back End - Trace Server communication speed. Relates to eclipse-cdt-cloud#990. Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
This commit adds a study on the impact of the JSON-RCP patch on the Theia Front End - Back End - Trace Server communication speed. Relates to eclipse-cdt-cloud#990. Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
This commit adds a study on the impact of the JSON-RPC patch on the Theia Front End - Back End - Trace Server communication speed. Relates to eclipse-cdt-cloud#990. Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
@marco-miller I consumed the changes of eclipse-cdt-cloud/tsp-typescript-client#83 and rearranged the commits to hopefully make it easier to review. Your comments of your earlier review should also be incorporated as well as the naming discussions. |
Thanks for this. I recently changed focus at work, so leaving this follow-up and review to our other reviewers listed here. Cheers. |
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.
I'll continue with reviewing from Marco. Thanks for the updates.
I did some testing and the main feature is working well. However, I found some issues during testing. Could you please investigate this? I'll continue with this PR once updated.
theia-extensions/viewer-prototype/src/common/trace-server-connection-status.ts
Outdated
Show resolved
Hide resolved
theia-extensions/viewer-prototype/src/node/trace-server-connection-status-backend-impl.ts
Show resolved
Hide resolved
theia-extensions/viewer-prototype/src/browser/trace-server-connection-status-client-impl.ts
Outdated
Show resolved
Hide resolved
theia-extensions/viewer-prototype/src/node/trace-server-url-provider-impl.ts
Show resolved
Hide resolved
This commit adds a study on the impact of the JSON-RPC patch on the Theia Front End - Back End - Trace Server communication speed. Relates to eclipse-cdt-cloud#990. Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
This commit adds a study on the impact of the JSON-RPC patch on the Theia Front End - Back End - Trace Server communication speed. Relates to #990. Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca>
Contributed on behalf of STMicroelectronics
Use the newly introduced types of tsp-typescript-client. The type of TspClient becomes ITspClient. The constructor for the base implementation becomes HttpTspClient. Contributed on behalf of STMicroelectronics
TspClient Proxy: Provide an implementation of the ITspClient called `TheiaRpcTspProxy`. The implementation forwards all calls to a JSON RPC proxy called `TheiaClientProxy`. Responses are then mapped to a `TspClientResponse`. On the backend the `TheiaClientProxy` returns a lazyTspClient. The lazyTspClient returns a `HttpTspClient` (default implementation). Trace Server url provider: The implementation of the provider was moved to the backend. This way the env variable can be read out directly. For the port preference a proxy mechanism was added. Changes to the preference are sent via JSON RPC and handled by the url provider. Trace Server connection status: The implementation was moved to the backend. Frontends can register themselves on the backend. Each registered frontend will be pinged when the status has changed. Misc: Use `ITspClient` instead of `TspClient` for types, as `TspClient` is deprecated. Fixes eclipse-cdt-cloud#976 Contributed on behalf of STMicroelectronics
Fix yarn.lock changes. Fix ConnectionStatus RPC communication: - Properly register client. - Save the last status to apply on newly added clients. - Remove clients that disconnect. - Only render on client when the view is visible. Rename setClient to addClient. Contributed on behalf of STMicroelectronics
Also fix a small issue with the preferences. Contributed on behalf of STMicroelectronics
6655b6e
to
b5b68e1
Compare
Marco is available for a second review. I will delegate to another committer.
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.
It looks good to me. Thank you very much for the contribution!
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.
This chain improves the code by making communications simpler. I very much approve it.
Thanks Simon!
Update to newest tsp-typescript-client next version
To consume the new types introduced with eclipse-cdt-cloud/tsp-typescript-client#83.
Invoke the yarn clean script before running the prepare script.
Make sure all imports are from
lib
instead ofsrc
.Update types of base package and react-components
Use the newly introduced types of tsp-typescript-client.
The type of TspClient becomes ITspClient.
The constructor for the base implementation becomes HttpTspClient.
Refactor server communication to JSON-RPC
TspClient Proxy:
Provide an implementation of the ITspClient called
TheiaRpcTspProxy
.The implementation forwards all calls to a JSON RPC proxy called
TheiaClientProxy
.Responses are then mapped to a
TspClientResponse
.On the backend the
TheiaClientProxy
returns a lazyTspClient.The lazyTspClient returns a
HttpTspClient
(default implementation).Trace Server url provider:
The implementation of the provider was moved to the backend.
This way the env variable can be read out directly.
For the port preference a proxy mechanism was added.
Changes to the preference are sent via JSON RPC and handled by the url provider.
Trace Server connection status:
The implementation was moved to the backend.
Frontends can register themselves on the backend.
Each registered frontend will be pinged when the status has changed.
Misc:
Use
ITspClient
instead ofTspClient
for types, asTspClient
is deprecated.Fixes #976
Contributed on behalf of STMicroelectronics