shotgunsoftware/shotgunEvents — Issue #18: Running set of plugins per project
Author: cmihaly
Created: 2012-01-09 06:56:13+00:00
State: open

We are currently using our own trigger framework (very similar to this, and I am looking into switching) We have a LOT of trigger activity. Often, the triggers can get swamped and we can get several hours backlogged into the triggers. This can be a big problem when triggers that update states in the entities or other entities are delayed and users see discrepencies.

So, one item we wanted to thing about, which is related to multi processing approach, is that the triggers are pretty independent per project. Has anyone set this up so that each project can run simultaneously?

I was thinking that either:
1). The network could be configured to run for a project. Right now I do not think this is possible? So, I was thinking of maybe adding the ability have it spawn a process for each project and each process would run its own event loop through the shotgun events dispatching that project's events to that processes copy of the plugins.
2) Setting up the trigger so that it has one event loop. Plugins could register that they are per project, and if so, a process would be created per project and events would be queued to that process from the event loop. One would have to use a queue to avoid one project hanging the loop. This makes recovery a bit trickier though. This would be a more involved modification to this sw

Ideas?