![]() ![]() SystemD is a process manager that you don't need to install (okay, this is true only if you use Ubuntu or Debian - but it is true for me), and it's the best thing about it. In this case, you get all the pros, and almost no cons :) So, I definitely use Docker, but I prefer to use it for other guys projects, to run it on my server, or for my projects which are pretty stable and has multiple developers working on it. This is a precious gift when you work in a team, but for sole developer in a side project, this is not always needed, and remember: you have to pay for Docker with your time and context switching, and I felt that it was regularly breaking my flow in smaller projects. The main selling point of Docker is that it allows you to build 100% reproducible environment. VS code remote mitigates this, but not completely, it is still not perfect for active development. I also don't like the fact that Docker eats a lot of CPU on my fresh Macbook 16" even when it does nothing. I've spent tens of hours on Docker recently, and I really like the concept, I use it in production pretty successfully, too, but it definitely requires a lot of time and context switching to write Dockerfiles, build images and test everything - this is getting especially tough when you switch back and forth between 3-4 small projects which quickly evolve. I use Docker for a lot of things, but its cognitive overhead is significant. If you want to quickly prototype and daemonize small JS script this is an overkillĪ lot of people say that PM2 is not needed anymore because of Docker. It is a separate world of complexity and overhead.Generic: can daemonize your node.js process or your database.Huge momentum: everyone is dockerizing everything now.Is very powerful and has separate ecosystem.DockerÄocker is definitely not a process manager, and is a too big topic for this post, but it solves a lot of things that we used to solve using process managers, in a beautiful way, so take a look at it when you have time (a spare week. (UPD Aug 2021: my current favorite is now PM2. You don't need big performance for this kind of software, at the same time developer ergonomics of Supervisor is just great. Mostly because it's generic enough to work with Laravel and node.js processes at the same time, has basic logging out of the box, and has multiple processes setup, too. Not very trendy on Github (because it is boring, right?).Python (great language but not exactly performant).feature-rich but in a good way - no excess or paid features.generic: useful not just for node.js - official way to daemonize Laravel queues.I would say you should use it if you develop only node apps and you liked forever.js brutal simplicity. But I know some developers use if for production as well. I use nodemon every day, but not for production purposes, since its main purpose is to do reload when you save a file, so your code changes are applied to living process. This is not exactly intended to be used in production.Unix-like simplicity: does one thing and does it right.This is a very good solution if you develop only node.js apps, like a lot of features out of the box, and are okay that it way try to monetize on you. ![]() Is actively monetized so the solution includes paid features.Big amount if features sometimes mean more cognitive overhead to run when you need super-basic setup, also more moving parts and higher chance that something may break.Zero downtime reload feature is a big one!.This is probably not a good solution for new projects, though it's pure JS and is pretty minimal, which I like. README of the project recommends to use pm2 or nodemon. During my development career I used a lot of different solutions to daemonize processes (mostly, node.js scripts), and I decided to do a quick writeup with very short description of each approach to help fellow developers to choose. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |