Code Monkey home page Code Monkey logo

Comments (5)

typicode avatar typicode commented on August 24, 2024

Yes, good idea. I've added katon touch in v0.6.4.

from katon.

assaf avatar assaf commented on August 24, 2024

What does it touch?

from katon.

typicode avatar typicode commented on August 24, 2024

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 ...)

from katon.

assaf avatar assaf commented on August 24, 2024

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.

from katon.

ajb avatar ajb commented on August 24, 2024

👍 assaf

On Mon, Oct 13, 2014 at 12:09 PM, Assaf Arkin [email protected]
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
#39 (comment).

Adam Becker
510.928.9111
@AdamJacobBecker

from katon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.