-
Notifications
You must be signed in to change notification settings - Fork 5
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
KOJO-217 | Start of Usage Patterns guide #118
base: master
Are you sure you want to change the base?
Conversation
--- | --- | --- | ||
can_work_in_parallel | | | ||
cron_expression | | | ||
schedule_limit | | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of expressing this as a quick reference table. If we transpose the rows we can add all the patterns so they can be viewed side-by-side to compare them easier:
pattern | can_work_in_parallel | cron_expression | schedule_limit |
---|---|---|---|
static schedule | false | 0 0 * * * | 1 |
continuous singleton | false | * * * * * | 1 |
delagated linear clone | true | * * * * * | 10 |
dynamically scheduled | true | null | null |
|
||
### Continuous Singleton | ||
|
||
This pattern is for situations where you need to do some work continuously, and having a single process is sufficient compute for keeping up with the work (e.g. polling something for changes and then processing those changes). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be useful to include a visual diagram of each pattern something like
Made this with https://plantuml.com/activity-diagram-beta and put linked it as an image via https://github.com/Zingam/UML-in-Markdown
|
||
#### Kojo Runtime API Interactions | ||
|
||
None. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would go in here normally?
- happy path:
->requestCompleteSuccess()->applyRequest()
- error path:
->requestCompleteFailed()->applyRequest()
- DLC Patten
->schduleNewJob($job)
?
I went back on forth on how best to present this stuff, let me know which parts you like and what you dislike, and I'll do it for other example patterns