Escolar Documentos
Profissional Documentos
Cultura Documentos
● Cache Invalidation
● Concurrency
● Solved well by RDBMS
– Until it's not
– Then huge pain
Scaling & Distribution == Hard
● Smart Caching
– Discrete entities
– Per entity cache strategies
● e.g. Social Networks
Workers
● Typed/Type-safe
● Messages deposited in mailbox
● Worker scheduled
● Single message processed at a time
● Lifecycle: create/unfreeze/freeze/destroy
● case class Follow(who: UserId) extends UserMsg
Async/Immutable Messages
● for {
user < WorkerMgr.find(UserId(user))
frst = r.param("first").asInt openOr 0
cnt = r.param("count").asInt openOr 20
timeline < (OutsideOfWorker on user ask
GetTimeline(frst,cnt) future).value
} yield timeline.asJson
Inter-worker Transactions
● Test: in memory
● Single Node: H2 & Filesystem
● Multiple Node
– Messages: RabbitMQ
– Transactions: ZooKeeper
– SQL: H2 & Cassandra
● Same Worker & Client code
Worker & Client code the same
● http://stambecco.org
● @goat_rodeo
● http://groups.google.com/group/goat-rodeo/
Questions?
Thanks!!