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

Support for Multiple Connections and Built-in dbresolver & Sharding for ORM and SQL Modules #300

Open
mak-alex opened this issue Nov 11, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@mak-alex
Copy link

Description:
We’d like to request support for multiple database connections across both the ORM and SQL modules in Yokai. This feature is crucial for complex projects that rely on multiple database instances or require specific query routing to different connections. Built-in support for dbresolver and sharding in both modules would elevate Yokai, enabling it to efficiently handle high-load distributed systems and complex data architectures.

Requested Features:

  1. Multiple Connections Support for ORM and SQL Modules:
  • Enable configuration and usage of multiple database connections in both ORM and SQL modules.

  • Allow seamless switching between connections within a single application context, so specific models or queries can utilize different databases as needed.

  1. dbresolver Integration in Both Modules:
  • Implement built-in dbresolver capabilities to manage automatic read-write splitting and load balancing among replicas.
  • Ensure compatibility with both ORM and SQL modules to cover various use cases.
  1. Sharding Support:
  • Add sharding capabilities, allowing data to be distributed across multiple databases with both ORM and SQL modules.
  • Provide flexible sharding logic, customizable for different project needs.

Why This is Needed:
Many complex projects, particularly those that are data-intensive, require multiple database connections and dynamic query routing. Built-in dbresolver and sharding functionality would make Yokai’s ORM and SQL modules more powerful, ensuring better scalability, reduced latency, and improved load handling.

Suggested Implementation:
Consider implementing these features as part of the core ORM and SQL modules or as an optional extension that seamlessly integrates into Yokai’s ecosystem.

@ekkinox ekkinox self-assigned this Nov 11, 2024
@ekkinox ekkinox added the enhancement New feature or request label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants