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

Refactor the Rpc support #5902

Closed
21 tasks done
etorreborre opened this issue Sep 6, 2023 · 0 comments
Closed
21 tasks done

Refactor the Rpc support #5902

etorreborre opened this issue Sep 6, 2023 · 0 comments
Assignees

Comments

@etorreborre
Copy link
Member

etorreborre commented Sep 6, 2023

The ockam_command crate contains some support to make RPC calls to a node. However this RPC support is also used to make local calls to a NodeManager.

The purpose of this story is to remove the Embedded mode from the Rpc struct so that local calls are made directly.
At the minimum this supposes to:

  • remove the integrating printing of response from the Rpc client
  • simplify the Rpc API and directly return typed values when possible (at the moment, the Rpc API exposes too many details about the processing of a response)
  • possibly revisit the necessity of a RpcBuilder (Maybe merge it within the Rpc struct)
  • simplify the creation of a Rpc into 2 distinct cases: "embedded" and "background"
  • make specific RPC clients for accessing: the controller, the project node, the authority node
  • create typed interfaces for each of those clients depending on their capabilities (for example the Controller can manage projects)
    • Projects
    • Spaces
    • Subscriptions
    • Invitations
    • Enrollment
  • use the typed interfaces everywhere possible
  • remove unused code using the old RpcClient
  • fix the examples involving credentials
  • fix the support for creating tickets in one case
  • simplify the relationship between NodeManagerWorker and NodeManager (all the logic should be in the NodeManager)
  • put back the Connection support for creating secure channels
  • pass the unit tests
  • pass the local bats tests
  • document and comment
  • pass the Orchestrator bats tests
@etorreborre etorreborre self-assigned this Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant