-
Notifications
You must be signed in to change notification settings - Fork 11
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
Some extra features? #3
Comments
Yes, I am working on these two, but do not have any specific timeframe yet. |
Waiting for ForgETS as well :P, would be nice to try it, even if its not ready (if its planned to.be open source). |
Better late than never.... Metadata is a trickier question, I still don't have a performant enough implementation. But there is a solution for that, with full scope monitoring. Effectively we run a few more processes monitoring groups, and those processes attach necessary metadata. |
I used a hack for metadata where the scope was the metadata, and the query became a direct ETS lookup. I think it was mentioned on OTP issue tracker as well. worker = :physical_node_X
:pg.join({PGInferenceWeight, worker.uuid, jobWeight}, self())
def inference_job_weight(worker_uuid) do
:ets.select(:pg, [{
{{PGInferenceWeight, worker_uuid, :"$1"},:"$2",:_},
[],
[{{:"$1", :"$2"}}]
}])
|> Enum.reduce(0, fn({weight, pids},acc)->
acc + weight*length(pids)
end)
end Example is: We have a physical worker node that does AI inference, and it can run more than 1 inference in parallel. Because different types of inference take different amount of resources, and we know cost upfront, we assign weight to each. We can join PG group + query then sum the weights and if cum_weight >= 1 not queue further inferences on that node. About ForgETS, we coded this up https://github.com/xenomorphtech/mnesia_kv. Its missing distributed functionality (so far company not fortunate enough to reach the scale needed) which ideally would be |
We are using the same technique (encoding sharding/partitioning in the Group Name), but one thing that is missing from |
This would be nice to make it |
What are your thoughts on join/leave subscriptions and allowing metadata with the registration?
The text was updated successfully, but these errors were encountered: