title: Scala factory pattern and concurency
body: <p>Hoping for some help with understanding scala further.</p>
  
  <p>I often see this being presented as a factory pattern:</p>
  
  <pre><code>trait Animal 
  private class Dog extends Animal 
  private class Cat extends Animal
  
  object Animal {   
      def apply(kind: String) = kind match {
         case "dog" =&gt; new Dog()
         case "cat" =&gt; new Cat()   
      } 
  }   
  Animal("dog")
  </code></pre>
  
  <p>I am wondering what this means as far as concurency, given the use of an object. Is using a factory pattern such as this "good enough" when servicing many clients? Could the factory be a pool of actors being accessed round-robin? Is there a better futures-based approach? I would like to avoid factory patterns becoming bottlenecks in designs where there is a lot of short-lived Animal instances being created.</p>
  
  <p>Or am I just misguided worrying about the factory being a bottleneck?</p>