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

Worker processes connect to store instead of broker #37

Open
turicas opened this issue Feb 25, 2013 · 3 comments
Open

Worker processes connect to store instead of broker #37

turicas opened this issue Feb 25, 2013 · 3 comments

Comments

@turicas
Copy link
Contributor

turicas commented Feb 25, 2013

Pros

  • We won't need to pickle and unpickle objects to pass from worker process to broker process (so we can pass to store unpicklable objects and it'll be)

Cons

  • If we use a database in the store, it'll be flooded by lots of collections (one per worker instead of one per broker)
  • Needs to take care about the wrapper code so the worker can't access the store code/objects directly
@israelst
Copy link

Is there any test about this connection flood?

what is demanding this change?

@turicas
Copy link
Contributor Author

turicas commented Feb 26, 2013

Currently, no tests (just thoughts).
We'll add corpus workers on PyPLN (currently we only have workers for documents) and the amount of data passed from the broker to the worker process will increase in one or two power factors (maybe more, in some cases). So, in this case, maybe the best thing to do is to do not pickle and unpickle this huge amount of data between the process (it can slow down the execution of the job -- we don't want to have this process of 'communicating' between broker and worker to be the bottleneck of the system).
Obviously, we need some benchmarks to check if it is really necessary -- my opinion is that it will be necessary and the best solution will be leave the user to choose between using workers or broker to communicate with the store, so probably it'll be a option passed to broker.

@israelst
Copy link

I get it

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

2 participants