-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Brahma-fi/ft-readme
readme changes
- Loading branch information
Showing
3 changed files
with
92 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
## Architecture | ||
|
||
### Core Components | ||
|
||
#### Executor Interface | ||
|
||
The primary interface for implementing custom strategies: | ||
|
||
```go | ||
type Executor interface { | ||
Execute(ctx context.Context, req *entity.ExecuteTaskReq) (*entity.ExecuteTaskResp, error) | ||
} | ||
``` | ||
|
||
#### Runtime Components | ||
|
||
- **Temporal Scheduler**: Manages schedule creation and trigger handling | ||
- **Activity Executor**: Handles strategy execution and lifecycle management | ||
- **State Manager**: Maintains execution state and handles persistence | ||
- **Error Handler**: Implements retry mechanisms and failure recovery | ||
|
||
### Implementation Requirements | ||
|
||
#### Strategy Development | ||
|
||
1. Implement the `Executor` interface | ||
2. Process incoming `ExecuteTaskReq` | ||
3. Return execution results via `ExecuteTaskResp` | ||
|
||
#### System Integration | ||
|
||
- Strategies are automatically registered with Temporal | ||
- Schedules are created based on subscription configurations | ||
- Execution is triggered according to defined intervals | ||
|
||
### Managed Components | ||
|
||
#### Scheduling | ||
|
||
- Schedule creation and management | ||
- Trigger processing and distribution | ||
- Execution window management | ||
|
||
#### Execution | ||
|
||
- Activity lifecycle management | ||
- State persistence | ||
- Error handling and retries | ||
- Result processing | ||
|
||
#### Resource Management | ||
|
||
- Workload distribution | ||
- Execution throttling | ||
- Resource allocation | ||
|
||
### Design Considerations | ||
|
||
#### Strategy Implementation | ||
|
||
- Implement atomic, single-responsibility strategies | ||
- Utilize provided context for execution control | ||
- Handle edge cases within strategy implementation | ||
- Return structured responses via `ExecuteTaskResp` | ||
|
||
#### Performance | ||
|
||
- Strategies are executed as Temporal activities | ||
- Built-in support for parallel execution | ||
- Automatic resource scaling |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.