Here is the senario:
We have a site running on NodeJS. Periodically, we pull some data from internet, analyze it, and update a MySQL Database.
My questions are:
- What is the best practice to create a Linux daemon? gcc? Can I do it in PHP or other languages?
- Since NodeJs will be accessing to the same Database, how can we create mutex?
- How can we manage the daemon? For example If the daemon crashes, we want to restart it automatically.