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

Project Orch: Comprehensive Orchestrator Revamp for Scalability and Resilience #14

Open
1 task done
eenthiran opened this issue Mar 8, 2025 · 0 comments
Open
1 task done

Comments

@eenthiran
Copy link
Owner

Is there an existing issue?

  • I have searched the existing issues

Motivation

The current orchestrator codebase has grown organically and now faces challenges with scalability, extensibility, and resilience. As we expand our blockchain L2 capabilities, we need a more robust architecture that can handle increased load, support multiple cloud providers, and recover gracefully from failures.

The existing code structure lacks clear separation of concerns, making it difficult to maintain and extend. Error handling is inconsistent, and there's tight coupling between components that should be independent.

This revamp will address these issues by implementing a clean, layered architecture with proper abstraction boundaries and well-defined interfaces between components.

Request

We need to restructure the orchestrator codebase following the new architecture outlined in RESTRUCT.md. The new structure follows a layered approach:

[Controller] -> [Service] -> [Client] -> [Resource / External Service]

The project structure will be:

crates/
├── orchestrator/            # Command Center
│   ├── src/
│   │   ├── error/           # Error Handling Units
│   │   ├── config/          # Application Parameters
│   │   ├── metadata/        # Metadata Management Units
│   │   ├── resource/        # Resource Management Units
│   │   ├── client/          # External Service Clients
│   │   ├── core/            # Domain Entities and Logic
│   │   ├── service/         # Business Layer
│   │   ├── controller/      # API and Worker Management
│   │   ├── utils/           # Universal Toolkit Collection
│   │   ├── setup.rs         # Initialization Setup
│   │   └── main.rs          # Application Entry Point

This revamp will be broken down into the following subtasks, each with its own issue:

  1. Error Handling System [MD]
  2. Configuration Management [MD]
  3. Resource Management [LG]
  4. Client Layer Implementation [LG]
  5. Core Domain Logic [LG]
  6. Service Layer Implementation [LG]
  7. Controller Layer Refactoring [MD]
  8. Metadata Management [MD]
  9. Utilities and Helpers [SM]
  10. Setup and Initialization [MD]
  11. Testing Framework [LG]
  12. Documentation and Examples [MD]

Solution

The solution is to implement the new architecture as outlined in the Project Orch overview document. We will:

  1. Start with foundational components (error handling, configuration)
  2. Implement core domain logic and entities
  3. Build resource and client layers for external interactions
  4. Develop service layer for business operations
  5. Refactor controller layer for API and workers
  6. Add utilities, metadata, and setup components
  7. Implement comprehensive testing and documentation

Each component will be developed with clear interfaces, proper error handling, and comprehensive tests. We'll use dependency injection to ensure components are loosely coupled and easily testable.

The estimated timeline for this project is 8-12 weeks, depending on team capacity and priorities.

Success criteria:

  • Improved code organization and maintainability
  • Better separation of concerns
  • Increased test coverage
  • Comprehensive documentation
  • Improved scalability and performance
  • Enhanced resilience and error handling

Are you willing to help with this request?

Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant