官术网_书友最值得收藏!

Chapter 2. Simplifying Concurrent Programming with Actors

Before we get started on our refactoring journey (which I promise will start in earnest in Chapter 3, Curing Anemic Models with Domain-Driven Design), it makes sense to refresh ourselves on the actor model and Akka's implementation of it. We will tear down the walls and reframe our house with new programming techniques, but Akka's actors will always be the foundation to that house. Even though some of the newer aspects of Akka (such as Streams and HTTP) abstract up one level from directly using actors, the actor is still a core building block of those frameworks. As such, we should have a solid understanding of what an actor is and how they fit into the world of concurrent programming. We'll even do a little bit of refactoring work in this chapter as we have some bad actor debt (the SalesOrderManager) to clean up first. Here are the things you can expect to learn in this chapter:

  • The origins of the actor model and how Akka originated from it
  • What concurrency and parallelism are, and how you can use Akka actors to achieve them
  • The different types of Dispatchers and Mailboxes in Akka and what use cases each one is good for
  • How to employ Akka's FSM feature to simplify the coding of complex workflows
  • The different types of automated testing within the testing pyramid
  • How to test your Akka actors
主站蜘蛛池模板: 古浪县| 武强县| 庆安县| 紫阳县| 驻马店市| 太谷县| 双牌县| 临潭县| 叙永县| 石家庄市| 五家渠市| 微山县| 河东区| 漳浦县| 蒙自县| 榆树市| 克拉玛依市| 辛集市| 鹿泉市| 渑池县| 南川市| 疏勒县| 祁阳县| 湟中县| 三亚市| 德兴市| 沛县| 青铜峡市| 古丈县| 土默特左旗| 通道| 湟中县| 班玛县| 沙田区| 宁陵县| 平顶山市| 安仁县| 阳东县| 盐山县| 蒙自县| 原阳县|