Akka and cake pattern
问题 I'm confused how to ensure that my Actors have the appropriate dependencies using the cake pattern. I'm still getting to grips with this, and I can't find any examples anywhere. I'm basically just looking for a tutorial/resource to follow. Cheers, Chris. 回答1: Actors as dependency: trait DBComponent { def db: ActorRef // no compile time guarantees type K type V object DBActor { case class Put(key: K, value: V) case class Get(key: K) } class DBActor { import DBActor._ val db = scala.collection