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

Gracefully stopping agents & Timeouts #16

Open
taazza opened this issue Nov 18, 2009 · 6 comments
Open

Gracefully stopping agents & Timeouts #16

taazza opened this issue Nov 18, 2009 · 6 comments

Comments

@taazza
Copy link

taazza commented Nov 18, 2009

Two questions

  1. When a nanite agent timeouts - Is there a way to detect it with code? Also sometimes the agents come back alive after a long running task. We want to strike a balance between number of agents vs timeouts. Any suggestions/ideas?
  2. Also is there an inbuilt way to gracefully stop agents? Something like nanite-agent --token "test" stop --force-after 60 seconds

I did read an email from mattmatt a while ago. Thoughts?

@roidrage
Copy link
Collaborator

  1. There's callbacks available for timeout, register and unregister in the mapper, the RDoc for Mapper#start has all the info available.
  2. Planned feature for me, since we need something similar. I'd like to get some Unix-y stuff like Unicorn has into Nanite so that you can gracefully shutdown and bring up new agents in the meantime.

@taazza
Copy link
Author

taazza commented Nov 18, 2009

Regarding the first issue is this functionality available outside of the mapper? That would be ideal. How does the nanite-admin get a hold of it?

Just curious how do you deal with creating new agents to scale? Time-outs impacts that decision for us big time.

@roidrage
Copy link
Collaborator

That functionality is only available in the mapper. If you need to react on it with some other means I'd say the best way is to fire off a new request to a management agent.

@taazza
Copy link
Author

taazza commented Nov 23, 2009

I am assuming management agent is a different agent that you have only for triggering off processes/agents. Could you pls elaborate? Right now we are using only the mapper & the general purpose agents to take care of tasks.

@roidrage
Copy link
Collaborator

A management agent is an agent that you implement, its only difference from your other agents could be that it fires up new agents on your systems. Imagine a setup where each machine runs a management agent and a couple of working agents. You can push a task to the management agent whenever you want to fire up new working agents or to kill some of them. It's nothing Nanite offers at the moment, but I thought about it and it sure would be a nice feature to have. Until then, that'd be my idea of automating the process.

@taazza
Copy link
Author

taazza commented Nov 23, 2009

We have been exactly thinking around these lines! Would be a great nanite feature. I guess you have to get the mapper to listen to hook and fire off a request to this agent (& hope & pray that this agent is running ;)). Right now the array issue is the one thats killing us. Will have to get that fixes before we get to this one. I will keep you posted.

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

2 participants