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

Keep the JSON RPC server running until the client asks to close it #6189

Open
maisarissi opened this issue Feb 22, 2025 · 1 comment
Open
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:feature New experience request

Comments

@maisarissi
Copy link
Contributor

maisarissi commented Feb 22, 2025

Is your feature request related to a problem? Please describe the problem.

As part of our efforts of creating a npm package that is wrapper on top of our JSON RPC server that can be used by others, we should consider keep the server running until the client asks to close it and here are the reasons why:

  1. Performance improvement
    Both TypeSpec and TTK are going to take a dependency on the npm package to perform API plugin generation. Considering a recurrent flow where the user wants to create a declarative agent with plugin, searches for a public API in Kiota's catalog, creates a DA with a plugin, than adds more 1 or 2 plugins to it for different APIs this would mean that for every Kiota call, a new JSON RPC server would start, run the desired command, and close the server. Keeping the server running until the client asks to close it would give us a better perf.
  2. Telemetry
    Although we can get a better performance, the most significant improvement by this feature is around telemetry. Every time a new server is started by client we can create a session id and within that session id we can identify all the different calls an specific user is doing for a specific scenario. So considering the scenario above, we would know that a user has searched for a public API, then created a DA with a plugin and then added a few more plugins to it before the session was closed. This can help us identify the user flow and any existing gaps, and answer questions like "Is there a friction point where one is dropping the flow"?

With that, here are a few things we need to consider:

  • If there is already a server running and the same client asks to run another server, what we do? Close the first one and opens a new one? Is there a way for us to identify whether we should reuse the existing server based on source/user? Something else?
  • If the client never asks to close it, what we do? We could add for example a timeout and decide to close the server after X time without interactions. Any other ideas?
  • Can we leverage that for the Kiota VS Code extension as well?
  • Any other thoughts @baywet @thewahome @calebkiage ?
@maisarissi maisarissi added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:feature New experience request labels Feb 22, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Feb 22, 2025
@maisarissi
Copy link
Contributor Author

Related to #6083

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:feature New experience request
Projects
Status: Needs Triage 🔍
Development

No branches or pull requests

1 participant