Hacker News new | ask | show | jobs
by lobster_johnson 3539 days ago
This looks nice, but I wish it would just use Launchd under the hood.

Launchd is solid and full-featured:

* Good process management (failure retries with backoff)

* Supports watching folders

* Decent command-line client for when you want to script or work fast in the shell

* Supports starting daemons on login

* Can start/stop based on whether certain things (network, paths, mounts, etc.) are up/down

* Supports calendar-based scheduling (replaces cron)

* Can redirect logging

* Can enforce resource limits (RAM, CPU, I/O, number of processes etc.) + nice level

I run all my daemons (Homebrew apps as well as personal development stuff) under Launchd, and I would love a convenient menu-bar GUI like this.

8 comments

> Launchd is solid and full-featured

No, it's a train wreck of bad design, lack of backwards compatibility and sharp edges:

* Tracks PIDs only, so make sure that your process doesn't double fork (as many unix daemons do by default) or it'll lose track of them.

* No real documentation from Apple (man page is useless). The best resource is http://launchd.info.

* No feedback to commands: launchctl doesn't give any useful output about whether a command worked or not.

* Even something as simple as disabling a daemon may require manually editing one of the many `overrides.plist` XML files somewhere on the system.. though check your OS version because this changed between 10.9 and 10.10 without notice.

* ...I could go on.

Due to the chronic lack of documentation, many operations are totally trial and error. In fact, it is so bad that there's a market for a GUI tool (LaunchControl) which, to its credit, does manage to make launchd less painful than a trip to the dentist.

The only feature it adds that sysv didn't have is socket activation, and it doesn't do anything that xinetd didn't.

http://www.soma-zone.com/LaunchControl/

Makes it easy to set up your own launchd entries and manage existing ones, both user and system. I set up an rsync script to sync my photos with my NAS when I'm on my home wifi automatically.

I like it so much I bought it. There is no registration or serials or copy protection (IOW paying is optional) but after using it for a few weeks I felt like the asking price of $10 was more than justified for the utility I received from this utility.

Not too bad, but it could do with a more modern UI. The fact that it doesn't add all of the user's launch daemons to the "quick launch" menu by default is a bit of a missed opportunity.
But launchd can also be a pain in the ass -- just ask anybody who tried to make a sandboxed app with a helper tool. Launchd is poorly documented once you go beyond the basics. Some things that should be simple are almost impossible, eg. trying to find out where a job with a certain label is coming from. Some parts of macOS (eg. ServiceManagement) use hidden, undocumented interfaces to launchd, and if something goes wrong with them there's no way to fix it except create a new user account. And for no reason at all that stuff changes with new releases of macOS.

I understand why some people may prefer a simpler tool.

Sure, Launchd isn't perfect. But this tool is about simple process management. It doesn't need to touch the difficult, undocumented parts.
Interesting. Initially I chose to use helper tool to run sudo commands. After wrapping all those poorly-documented Authorization/ServiceManagement/XPC C APIs into Swift 3, I was like, sh*t, lemme just use askpass. Also, many of those APIs are deprecated in newer version of macOS and it's unclear that when Apple will remove them. That said, I can see the HUGE benefits of using launchd under the hood.
1. This tool is not something I'd use but if I were a casual user I'd appreciate it not changing my system configuration. Chances are if I want something like Marathono I don't want to be bothered with launchd. Also, if I delete the app I don't want to be left with "zombie" processes that I don't understand how to stop.

2. I love lunchy [1] (now ported to Go [2]), it's a simple launchctl wrapper that you can install with brew cask.

1: https://github.com/eddiezane/lunchy

2: https://github.com/sosedoff/lunchy-go

I created an issue for this proposal: https://gitlab.com/marathono/marathono/issues/6
Another cool feature could be to link up with Homebrew services. Redis/ES/nginx/etc are mostly installed through brew, and 'brew services' provides a convenient shortcut to status/restart/stop/view status of those apps.

Having Marathono popup function as a proxy for Homebrew-managed services would give me a single dashboard for my development daemons, including infrastructure and my own app codes.

Good idea. You could track the status of this feature at https://gitlab.com/marathono/marathono/issues/9
> Redis/ES/nginx/etc are mostly installed through brew

Consider using Docker/Docker Compose for this. It then becomes as easy as defining the image name and version, pulling it, and then starting the container. No brew, no version conflicts, it just works.

Absolutely, Docker makes these services easy to deploy. Unfortunately I'm the only one on the team using it - everyone else is deeply entrenched with Brew, hence I'm asking for them.

In defence of the team, the Docker value prop on macOS is fundamentally undermined by the broken shared volumes. Folders that are shared with the hosts are still unusably slow for larger projects, so we can't use them (docker-sync makes it better, but adds another layer of complexity). Further, a lot of tooling and IDEs still expect local files and a local interpreter for step-debugging. So if the files are on the host, and so is node/php, then docker adds no dev value for app-level work. CI, yes, local dev - not so much. From there, it's a slippery slope - if I already have app stuff on the host, might as well install infrastructure stuff too because it doesn't really change so why should I deal with another virtualisation layer. It'll be an uphill battle until Docker volumes work at native speeds on mac out of the box.

Lingon is a GUI for managing Launchd, but does not have a menubar widget.

https://www.peterborgapps.com/lingon/

Yes, I used it a long time ago. It was very buggy then, probably better now. Not free, though, and as you say, no menu bar support.
Lingon is also useful for alerting you when installers and updaters change your Launchd tasks.
"LaunchControl" is another commercial GUI around launchd. It's pretty comprehensive and has an optional menubar presence. It also has some cool contextual hints and automatic fix suggestions that show up while editing/debugging the launchd jobs.

http://www.soma-zone.com/LaunchControl/

I've never actually used it, but http://www.soma-zone.com/LaunchControl/ might be what you are looking for.