Closed ajb closed 10 years ago
Yes, good idea. I've added katon touch
in v0.6.4.
What does it touch?
touch ~/.katon/hosts/<app_name>.json
katon is monitoring these files and reloads server configuration. It should be noted though that the server is stopped and you need to make a request to get it started (same behavior as katon rm && katon add ...
)
I see. In that case I would suggest picking a more appropriate name for this command, such as "restart" or "kill".
There are two common touch abstractions:
restart.txt
), the developer touches that file to restart the serverBoth are "touch" abstraction because you're expected to either touch a file, or write code that responses to a file that's touched. In both cases "touch" describes what it does.
In Katon's case, however, "touch" doesn't describe what it does, but how it does it. And that's why I think the name is inadequate. I care to know what the command does. Whether it uses file touching, or signals, or sockets, those are just implementation details.
You can tell when it's the right abstraction if the command name remains the same (e.g. katon kill
) even as the implementation changes from using one mechanism to another (e.g. from touch to signal).
As for what would be a better name, if I understand it correctly, this command effectively kills the server, so that would be the most appropriate name.
:+1: assaf
On Mon, Oct 13, 2014 at 12:09 PM, Assaf Arkin notifications@github.com wrote:
I see. In that case I would suggest picking a more appropriate name for this command, such as "restart" or "kill".
There are two common touch abstractions:
- The server is watching a file (e.g. restart.txt), the developer touches that file to restart the server
- The developer's own code is watching files for changes (typically reload server), something else is expected to touch one of these files
Both are "touch" abstraction because you're expected to either touch a file, or write code that responses to a file that's touched. In both cases "touch" describes what it does.
In Katon's case, however, "touch" doesn't describe what it does, but how it does it. And that's why I think the name is inadequate. I care to know what the command does. Whether it uses file touching, or signals, or sockets, those are just implementation details.
You can tell when it's the right abstraction if the command name remains the same (e.g. katon kill) even as the implementation changes from using one mechanism to another (e.g. from touch to signal).
As for what would be a better name, if I understand it correctly, this command effectively kills the server, so that would be the most appropriate name.
— Reply to this email directly or view it on GitHub https://github.com/typicode/katon/issues/39#issuecomment-58914922.
Adam Becker 510.928.9111 @AdamJacobBecker
similar to
touch tmp/restart.txt
in pow, orpowder restart
in powder.