Keep the JSON RPC server running until the client asks to close it #6189
Labels
status:waiting-for-triage
An issue that is yet to be reviewed or assigned
type:feature
New experience request
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:
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.
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:
The text was updated successfully, but these errors were encountered: