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

Hermes management, API specification and implementation (bootstrap) #843

Closed
8 tasks
ancazamfir opened this issue Apr 23, 2021 · 2 comments · Fixed by #955
Closed
8 tasks

Hermes management, API specification and implementation (bootstrap) #843

ancazamfir opened this issue Apr 23, 2021 · 2 comments · Fixed by #955
Assignees
Labels
E: gravity External: related to Gravity DEX I: logic Internal: related to the relaying logic
Milestone

Comments

@ancazamfir
Copy link
Collaborator

ancazamfir commented Apr 23, 2021

Crate

relayer

Summary

Define the architecture for hermes operation management and implement it. Specify the initial APIs and implement a demo sample.

Problem Definition

Current hermes operation is defined via the configuration file loaded at startup, cannot be changed programmatically or reloaded dynamically.

Proposal

  • Write a specification for the required APIs, including:

    • query, add, delete chain configuration
    • query, add, delete(or disable) relaying policy elements (e.g. “relay between chains A and B”, “relay on connection X for chain A”, etc.). This is evolving but at minimum specify the ones currently supported.
    • all queries currently supported by the CLIs: keys, clients, connections, channels, packets
    • all operations supported by the CLIs (mainly create/ update client, connections and channels)
  • Decide on a client/ server architecture, be it REST or other, based on the above.

  • Server implementation and the APIs for query, create and update client.

Acceptance Criteria

Ability to interact with hermes via the agreed APIs and architecture to query, create, update clients.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@ancazamfir ancazamfir added this to the 05.2021 milestone Apr 23, 2021
@ancazamfir ancazamfir modified the milestones: 05.2021, 04.2021 Apr 28, 2021
@ancazamfir ancazamfir modified the milestones: 04.2021, 06.2021 Apr 28, 2021
@romac romac changed the title Hermes management, API specification and implementation - bootstrap Hermes management, API specification and implementation (bootstrap) Apr 28, 2021
@andynog
Copy link
Contributor

andynog commented Apr 29, 2021

I can work with @romac and others to evaluate from the technical side what's the best framework/crate to use for a REST API if we're going with that.

@andynog andynog added I: logic Internal: related to the relaying logic E: gravity External: related to Gravity DEX labels Apr 29, 2021
@andynog
Copy link
Contributor

andynog commented Apr 30, 2021

Things to consider for HTTP server crate:

Had a discussion with @romac and here are things we need to consider:

  • Do we need Async/Await support?
  • Assumption this will be a REST API
  • Need Middleware support (e.g. auth, logging, telemetry, rate-limiting, caching)?
  • What are the Performance requirements (reqs/sec?)
  • Is the REST crate maintained / lots of maintainers / starts ?
  • What's the footprint, number of dependencies ?
  • Can we add it as via a feature in the relayer cli crate?
  • Does it support OpenAPI/Swagger docs?
  • How do we make it to interact with the relayer crate?
  • Are there big Serialize/Deserialize efforts required to support API request/response?

Next steps:

  • Investigate crates
  • Create feature/comparison matrix

Options:

Non-async:

Async:

@adizere adizere assigned greg-szabo and unassigned adizere and andynog May 11, 2021
@adizere adizere modified the milestones: 06.2021, 05.2021 May 11, 2021
@greg-szabo greg-szabo mentioned this issue May 19, 2021
10 tasks
@ancazamfir ancazamfir modified the milestones: 05.2021, 06.2021 May 25, 2021
@ancazamfir ancazamfir modified the milestones: 06.2021, 07.2021 Jun 7, 2021
@adizere adizere modified the milestones: 07.2021, 08.2021 Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E: gravity External: related to Gravity DEX I: logic Internal: related to the relaying logic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants