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

feat: respond with active task types within heartbeat #21

Open
erhant opened this issue May 23, 2024 · 3 comments
Open

feat: respond with active task types within heartbeat #21

erhant opened this issue May 23, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@erhant
Copy link
Member

erhant commented May 23, 2024

Currently the heartbeat response is simply a signed UUID. We should also return the active task types as an array of strings, i.e. ['synthesis', 'taskfoobar'].

@erhant erhant added the enhancement New feature or request label May 23, 2024
@erhant
Copy link
Member Author

erhant commented Jun 3, 2024

This may wait for more updates on Admin node-side of things

@erhant erhant changed the title Respond with active task types within heartbeat feat: respond with active task types within heartbeat Jun 4, 2024
@erhant
Copy link
Member Author

erhant commented Jun 6, 2024

Doing this will actually help solve the issue of #34 as follows:

Each worker will have their own busy lock that they can read or write from, e.g. SynthesisBusy or SearchBusy. For example, consider the flow:

  1. Node is not busy at all, it responds to heartbeat for two tasks AAA, BBB with the type of provider that it runs.
  2. Admin node selects Node for task AAA, and sends it.
  3. Node becomes AAABusy = true but still BBBBusy = false.
  4. When a heartbeat is made, the Node responds with only BBB because it is not busy with that.

Now the thing is, what if the node can't process AAA and BBB at the same time? E.g. they both use Ollama so they cant be processed in parallel. For this case, the node will also return the provider details within the heartbeat, telling the admin AAA-Ollama and BBB-Ollama.

Admin knows that it cant be doing both at the same time, so it will only respond with one task.

@erhant
Copy link
Member Author

erhant commented Jun 17, 2024

With #51 the only active task type is that of the workflow. So instead, we will return metadata related to models.

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

1 participant