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

Create a resource pool #180

Open
arnecls opened this issue Jul 19, 2017 · 0 comments
Open

Create a resource pool #180

arnecls opened this issue Jul 19, 2017 · 0 comments

Comments

@arnecls
Copy link
Contributor

arnecls commented Jul 19, 2017

There are a lot of resources that could be shared between producers and/or even consumers.
E.g. if there are 3 kafka based plugins, we have 3 connections to each broker while one would be sufficient. Same goes for any other resource like files, network sockets, etc.

Implement and design a concept where resources of any kind can be added and retrieved from a central resource registry.

  • It must be threadsafe
  • Cleanup of used resources must be possible across plugins (e.g. via reference counting)
  • We don't need a "general resource" type, as the type of the resource is defined by the plugin.

As for the last point: we could try to create something like a general resource by trying to find a general interface, but this is overkill and will create more problem than it solves. The registry should be treated like a cache, not as a hub to enable writing a generic producer or consumer.

@arnecls arnecls added this to the v0.6.0 milestone Jul 19, 2017
@arnecls arnecls removed this from the v0.6.0 milestone Jul 19, 2019
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