NosotrosNueces / utcs-uptime

Let's keep a database of everybody's uptime!
https://nosotrosnueces.github.io/utcs-uptime/
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Backgrounding `w` #4

Closed jeversmann closed 9 years ago

jeversmann commented 9 years ago

After reading through the features of a few scheduling libraries, I propose adding agenda to the app to work out scheduling for the requests to each server in a configurable way. Agenda will want Mongo, which gives us something towards #3, although we were expecting to use Mongo anyway.

jeversmann commented 9 years ago

This was pulled into master a while ago, but follow-up question:

Should Agenda run as part of the server or as a separate process? They currently need to be run separately.

JDongian commented 9 years ago

lol can we makefile it, i.e. make start make test make reload I would like that. Perhaps the node way is to do it with npm, i.e. npm start npm test npm reload Since we already have npm test.

jeversmann commented 9 years ago

We're not gonna makefile it. Apparently you can't put arbitrary scripts into npm like that (npm db didn't work for me) but what I'm asking is if the server process should handle the jobs as well, less memory/code overhead and fewer failure points/logs to read.

JDongian commented 9 years ago

yes. Modular better. Just have the server check that the thing is running, and error if the data service is not running.

jeversmann commented 9 years ago

yes

You say that, but then disagree with me.

We don't benefit from modularity if we put unnecessary dependencies between the two like that check, which would prevent us from something like splitting the work across machines. I want to stop having separate modules and get rid of our strange implicit dependency on the other service, since I don't plan to split across machines anyway.

JDongian commented 9 years ago

I was only considering modularity in that the data pulling code would be physically separate from the data handling code. If you want to assume that the data pulling code is always running, that's fine.