ceros/ShareJS — pull request #11 by MattSurabian (2013-12-11 21:26:14+00:00)
Title: ShareJS Daemon

The ShareJS daemon is now installed by chef as our ShareJS service. This means all of our existing recipes to interact with ShareJS are now controlling the daemon. When ShareJS throws an uncaught exception the process is considered to be in a brittle and dirty state, best practice is to exit the process and relaunch it, which is what our forever-monitor daemon pattern is doing. The daemon is configured via an options file created by chef to write and remove a pulse file, this allows the daemon's interactions with ShareJS to be displayed in RightScale.

## Testing Notes

- Ensure that when a ShareJS error occurs (this branch has them rigged up to happen randomly with a 1 in 10 chance on any given ShareJS connection to the studio or previewer. Just keep refreshing until you see the infinite spinner. Confirm that on refresh (or a few as it's possible to hit multiple failures in a row) sharejs eventually reconnects without a manual restart of ShareJS
- Confirm that above failures and restarts show up on the sharejs_pulse graph in rightscale. The graph data may be delayed by up to a minute but everything should show up.