samedi 9 mai 2015

Best practices in mixining Actors with traditional Classes

Actors are good at programming multithreading and asynchronous tasks, but there are a lot of scenarios when we don't need them, and it's just an overhead vs method invoke.

Sample

case class ConnectionToServer(
tcpConnection: ActorRef,
protocolVersion: Int,
address: String,
startedAt: DateTime,
user: User
)

I could put all "constants" in tcpConnection add messages to get them.

Can you point me to patterns and best practices how to mix together actors with traditional OOP approaches.

Aucun commentaire:

Enregistrer un commentaire