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

askForWork() performance over WAN #19

Open
nponeccop opened this issue Dec 11, 2015 · 3 comments
Open

askForWork() performance over WAN #19

nponeccop opened this issue Dec 11, 2015 · 3 comments

Comments

@nponeccop
Copy link
Collaborator

Now the sequence is:

-> PRE_SLEEP
<- NOOP
-> GRAB_JOB

But to compensate for latency it is better to GRAB_JOB as soon as possible - when job.end() is called. Even before the result is sent, as it could be large so sending it takes significant time.

@iarna
Copy link
Owner

iarna commented Dec 12, 2015

This sounds totally reasonable.

@amv
Copy link
Collaborator

amv commented Dec 21, 2015

I think this is a good idea.

However it got me thinking: If I want to spin up a worker to do exactly one work (and exit afterwards), what would be the proper code to execute?

Would this change affect this code?

Context: The reason I am asking is the possible rise of the AWS Lambda -style execution model where an isolated container is spun up for each function invocation.

@nponeccop
Copy link
Collaborator Author

I think it's better to have separate API for one-off workers, similar to EventEmitter.once. E.g. registerWorkerOnce

nponeccop pushed a commit to nponeccop/abraxas that referenced this issue May 15, 2016
nponeccop pushed a commit to nponeccop/abraxas that referenced this issue May 15, 2016
nponeccop pushed a commit to nponeccop/abraxas that referenced this issue May 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants