8 ms·
Zero dependencies seems like a weird selling point, especially since it depends on Clap, Tokio, a Rust compiler... A neat project, though. I think that this is
by matthews2 2y ago
Zero dependencies seems like a weird selling point, especially since it depends on Clap, Tokio, a Rust compiler...
A neat project, though. I think that this is best solved in the application itself (e.g. your server starts but returns HTTP errors while the database is unavailable), but being able to retrofit this behaviour into any existing application seems useful. Feels like something very similar should be built into tools like docker-compose.
- thenonameguy 2y agoThe IMO superior https://github.com/F1bonacc1/process-compose https://github.com/F1bonacc1/process-compose project has this built in, while allowing to manage regular programs that don't require containers. See: https://f1bonacc1.github.io/process-compose/health/?h=port#readiness-probe https://f1bonacc1.github.io/process-compose/health/?h=port#r...
- 40183933 2y agoI have systemd manage my containers and system processes. Are there any benefits to process-compose over just using systemd?
- thenonameguy 2y agoIt works on MacOS/Windows, unlike systemd. Therefore it's well suited for development environment setups for polyglot teams. https://devenv.sh/ https://devenv.sh/ is one example that uses it to do just that.
- cholindo 2y ago`process-compose` is a "scheduler and orchestrator". `is_ready` only checks for services to be ready so it seems great when you want to start the services by other means and wait for them to be avialabe (for example, services started in another node of a cluster).
- stavepan 2y agoInteresting project, I was not familiar with that. Thanks for letting me know :)
- SteveNuts 2y agoColloquially a lot of people understand “zero dependencies” to mean “you don’t have to deal with pip/virtualenv/npm/yarn” BS. So, a static binary.
- pkulak 2y agoI took the statement to imply no runtime dependencies, as no compile-time dependencies doesn’t really make sense.
- stavepan 2y agoRegarding zero dependencies, I meant that it is a static binary and does not need any external tools to be installed. For example, some alternatives require netcat to be installed.
- stavros 2y agoThis is fine, and what I understood from "zero dependencies", that I can drop it in a directory and it'll just work. As far as I'm concerned, this complaint is moot.
- felsokning 2y ago> Zero dependencies seems like a weird selling point, especially since it depends on Clap, Tokio, a Rust compiler... Came here to make the same comment. 0 dependencies would mean/infer (at least, to me) a lack of any dependencies but that doesn't seem to be the case[1]. There are 30 matches for the word `dependencies`. [1] - https://github.com/Stavrospanakakis/is_ready/blob/main/Cargo.lock https://github.com/Stavrospanakakis/is_ready/blob/main/Cargo...
- stavros 2y agoWhen you see someone advertise a tool to put in your containers to do something, why are you immediately thinking "no compile-time dependencies", rather than "no runtime dependencies"?
- felsokning 2y ago> When you see someone advertise a tool to put in your containers to do something... The title claims "0 dependencies", not "0 runtime dependencies" nor "0 compile-time dependencies". In other words, the word dependencies - by itself - is encompassing both runtime and compile-time dependencies. Think of reading the title at face-value - but as if someone else had written it, with no exposure to your project, its use-case, behaviour, etc. - before it was read.
- stavros 2y agoSomeone else did write it, and I didn't have any exposure to the project, use case, behaviour, etc, before I read it.
- felsokning 2y agoAh, thought you were the OP. That's my bad. The "dependencies" point still stands, though, in that the term - generally - encompasses both.
- 2y ago
- tommasoamici 2y ago>Feels like something very similar should be built into tools like docker-compose. In docker compose you can use `depends_on` [0] to define dependencies between containers and by default it will wait until a dependent container is "ready". But you can also use a more verbose syntax to wait until a container is "healthy", as defined by its own healthcheck. services: web: depends_on: db: condition: service_healthy db: image: postgres [0] https://docs.docker.com/compose/compose-file/05-services/#depends_on https://docs.docker.com/compose/compose-file/05-services/#de...
- stavepan 2y agoThat's true. For example, in the case of PostgreSQL, there is already a tool called pg_isready [0] to do this inside a healthcheck as you described. services: postgres-db: image: postgres healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] application: image: image depends_on: postgres-db: condition: service_healthy However, this is not the case for other databases/services. [0] https://www.postgresql.org/docs/current/app-pg-isready.html https://www.postgresql.org/docs/current/app-pg-isready.html