org.mashupbots.socko.processors
A processor that handles downloading of static files.
It receives StaticFileRequest messages.
It performs HTTP compression and also uses If-Modified-Since header for caching.
This processor contains lots of disk IO (blocking code). Please run it with a router and in its own Akka PinnedDispatcher (a thread per actor) or BalancingDispatcher.
PinnedDispatcher
BalancingDispatcher
For example:
router = actorSystem.actorOf(Props[StaticFileProcessor] .withRouter(FromConfig()).withDispatcher("myDispatcher"), "myRouter")
Configuration in application.conf:
application.conf
myDispatcher { executor = "thread-pool-executor" type = PinnedDispatcher } akka { event-handlers = ["akka.event.slf4j.Slf4jEventHandler"] loglevel=DEBUG actor { deployment { /myRouter { router = round-robin nr-of-instances = 5 } } } }
Only takes StaticFileRequest messages.
A processor that handles downloading of static files.
It receives StaticFileRequest messages.
It performs HTTP compression and also uses If-Modified-Since header for caching.
This processor contains lots of disk IO (blocking code). Please run it with a router and in its own Akka
PinnedDispatcher(a thread per actor) orBalancingDispatcher.For example:
router = actorSystem.actorOf(Props[StaticFileProcessor] .withRouter(FromConfig()).withDispatcher("myDispatcher"), "myRouter")Configuration in
application.conf:myDispatcher { executor = "thread-pool-executor" type = PinnedDispatcher } akka { event-handlers = ["akka.event.slf4j.Slf4jEventHandler"] loglevel=DEBUG actor { deployment { /myRouter { router = round-robin nr-of-instances = 5 } } } }