akash-network / akash-network/console

Split api into chain related/unrelated apps

Open
#344 2 comments 1 reaction 1 assignee View on GitHub

@ygrishajev is already working on this.

Since Sep 3, 2024.

P3
Dominant language
TypeScript
Stars
264
Forks
94
Avg merge
18h 49m
Merged PRs (30d)
297

Description

Problem Statement

Our current API architecture consolidates both chain-specific features and unrelated functionalities (e.g., user management) into a single API. This creates ambiguity and complicates our deployment process, resulting in the following environments:

  1. staging - mainnet
  2. staging - sandbox
  3. production - mainnet
  4. production - sandbox

While this structure works for chain-specific logic, it introduces unnecessary complexity for non-chain-specific functionalities, such as user management.

Proposal

To resolve this, we propose splitting the current API into two distinct projects:

  • Chain-specific API: Focused on features related to the blockchain.
  • General API: Handling non-chain-specific logic like user management.
Deployment Strategy
  • General API:
    • Deploy to 2 environments (staging, production).
  • Chain-specific API:
    • Deploy to 4 environments (staging-mainnet, staging-sandbox, production-mainnet, production-sandbox).
Tasks
  • Split out the chain-specific logic into a separate app.
  • Deploy the chain-specific app to the staging environment.
  • Test the functionality of the new chain-specific app.
  • Remove the chain-specific logic from the existing API.
Benefits

This change will:

  • Reduce ambiguity in our API architecture.
  • Simplify deployments and management of non-chain-specific features.
  • Provide clearer separation of concerns, making the system more maintainable.
Additional Considerations
  • Ensure that existing deployments remain functional during the transition.
  • Plan for a smooth migration to the new architecture with minimal downtime.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.