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

RFC: Consumer Command API #101

Open
schmichael opened this issue Jan 27, 2015 · 0 comments
Open

RFC: Consumer Command API #101

schmichael opened this issue Jan 27, 2015 · 0 comments

Comments

@schmichael
Copy link
Contributor

Metafora consumers may want to accept commands from sources other than their coordinator such as:

  • Signals
  • Builtin HTTP handler
  • RPC for cluster management

There's really no reason why the Coordinator has to be the only way to receive commands, so there's 2 approaches for accepting commands from:

  1. Create a Consumer#Command(cmd Command) error API that submits a command via the cmdChan (or is it safe to just call Consumer#handleCommand directly?).
  2. Create a separate Commander interface from the Coordinator interface and provide an adapter to multiplex multiple commander interfaces together to support commands from multiple sources.

The first option is easier for users, but the second option is more flexible.

Workaround

In the mean time metafora apps can simply submit commands to their coordinators for the consumer to pick up. This is a senseless roundtrip whose only benefits are the simplicity of a single code path for command processing.

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