I have an actor-based system that performs periodic, cpu-intensive data ingests as well as serves RESTful endpoints. I'm using Akka actors to signal/control the various stages of the ingest process, and Spray (which is of course built on Akka) to serve my restful endpoints.
My problem is this: When the ingest kicks off it consumes most of the CPU, starving the RESTful endpoints until its done.
What's the best way to lower the priority of the ingest? Right now the ingest and the Spray module share the same ActorSystem, but they could be separated if that helps the solution.