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

Clear way to use one aggregator in multiple pools #61

Open
skipor opened this issue Jul 30, 2017 · 0 comments
Open

Clear way to use one aggregator in multiple pools #61

skipor opened this issue Jul 30, 2017 · 0 comments

Comments

@skipor
Copy link
Contributor

skipor commented Jul 30, 2017

Usually, even when using multiple instance pools, wanted to use one Aggregator for them.
Now, phout aggregator solving this problem in not clear way: aggregator config passed to all needed places, but underhood only aggregator created, but many Run routines started. And seems, that there are some bugs in this non clear implementation.

I propose add explicit mechanism to use one aggregator in multiple pools.
How I think it should be looking in config:

pools:
  - ...
    aggregator: 
      type: master
      # key: some_key # "default" by default, so should not be typed when only master created.
      config:
        type: phout
        ....
  - ...
    aggregator:
      - type: slave
       # key: some_key # "default" by default, so should not be typed when only master created.

Master and slaves use one global registry, where found each other config key.
Only master runs real aggregator background routine, and it's context should not be canceled until master and all slaves context cancel. Context values passed from master context.

Slave aggregator instance should just block until context cancel, or master subroutine finished

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

No branches or pull requests

1 participant