You are previewing Reactive Messaging Patterns with the Actor Model: Applications and Integration in Scala and Akka.
O'Reilly logo
Reactive Messaging Patterns with the Actor Model: Applications and Integration in Scala and Akka

Book Description

USE THE ACTOR MODEL TO BUILD SIMPLER SYSTEMS WITH BETTER PERFORMANCE AND SCALABILITY

Enterprise software development has been much more difficult and failure-prone than it needs to be. Now, veteran software engineer and author Vaughn Vernon offers an easier and more rewarding method to succeeding with Actor model. Reactive Messaging Patterns with the Actor Model shows how the reactive enterprise approach, Actor model, Scala, and Akka can help you overcome previous limits of performance and scalability, and skillfully address even the most challenging non-functional requirements.

Reflecting his own cutting-edge work, Vernon shows architects and developers how to translate the longtime promises of Actor model into practical reality. First, he introduces the tenets of reactive software, and shows how the message-driven Actor model addresses all of them–making it possible to build systems that are more responsive, resilient, and elastic. Next, he presents a practical Scala bootstrap tutorial, a thorough introduction to Akka and Akka Cluster, and a full chapter on maximizing performance and scalability with Scala and Akka.

Building on this foundation, you’ll learn to apply enterprise application and integration patterns to establish message channels and endpoints; efficiently construct, route, and transform messages; and build robust systems that are simpler and far more successful.

Coverage Includes

  • How reactive architecture replaces complexity with simplicity throughout the core, middle, and edges

  • The characteristics of actors and actor systems, and how Akka makes them more powerful

  • Building systems that perform at scale on one or many computing nodes

  • Establishing channel mechanisms, and choosing appropriate channels for each application and integration challenge

  • Constructing messages to clearly convey a sender’s intent in communicating with a receiver

  • Implementing a Process Manager for your Domain-Driven Designs

  • Decoupling a message’s source and destination, and integrating appropriate business logic into its router

  • Understanding the transformations a message may experience in applications and integrations

  • Implementing persistent actors using Event Sourcing and reactive views using CQRS

  • Find unique online training on Domain-Driven Design, Scala, Akka, and other software craftsmanship topics using the for{comprehension} website at forcomprehension.com.

    Table of Contents

    1. About This eBook
    2. Title Page
    3. Copyright Page
    4. Dedication
    5. Contents
    6. Foreword
    7. Preface
      1. Who This Book Is For
      2. What Is Covered in This Book
      3. Conventions
    8. Acknowledgments
    9. About the Author
    10. Chapter 1. Discovering the Actor Model and the Enterprise, All Over Again
      1. Why Enterprise Software Development Is Hard
      2. Introducing Reactive Applications
        1. Responsive
        2. Resilient
        3. Elastic
        4. Message Driven
      3. Enterprise Applications
      4. Actor Model
        1. Origin of Actors
        2. Understanding Actors
      5. The Actor Way Is Explicit
      6. What Next?
    11. Chapter 2. The Actor Model with Scala and Akka
      1. How to Get Scala and Akka
        1. Using Typesafe Activator
        2. Using sbt
        3. Using Maven
        4. Using Gradle
      2. Programming with Scala
        1. A Condensed Scala Tutorial
      3. Programming with Akka
        1. Actor System
        2. Implementing Actors
        3. Supervision
        4. Remoting
        5. Clustering
        6. Testing Actors
        7. The CompletableApp
      4. Summary
    12. Chapter 3. Performance Bent
      1. Transistors Matter
      2. Clock Speed Matters
      3. Cores and Cache Matter
      4. Scale Matters
      5. Multithreading Is Hard
      6. How the Actor Model Helps
        1. Dealing with False Sharing
      7. The Patterns
    13. Chapter 4. Messaging with Actors
      1. Message Channel
      2. Message
      3. Pipes and Filters
      4. Message Router
      5. Message Translator
      6. Message Endpoint
      7. Summary
    14. Chapter 5. Messaging Channels
      1. Point-to-Point Channel
      2. Publish-Subscribe Channel
        1. Local Event Stream
        2. Distributed Publish-Subscribe
      3. Datatype Channel
      4. Invalid Message Channel
      5. Dead Letter Channel
      6. Guaranteed Delivery
      7. Channel Adapter
      8. Message Bridge
      9. Message Bus
      10. Summary
    15. Chapter 6. Message Construction
      1. Command Message
      2. Document Message
        1. Managing Flow and Process
      3. Event Message
      4. Request-Reply
      5. Return Address
      6. Correlation Identifier
      7. Message Sequence
      8. Message Expiration
      9. Format Indicator
      10. Summary
    16. Chapter 7. Message Routing
      1. Content-Based Router
      2. Message Filter
      3. Dynamic Router
      4. Recipient List
      5. Splitter
      6. Aggregator
      7. Resequencer
      8. Composed Message Processor
      9. Scatter-Gather
      10. Routing Slip
      11. Process Manager
      12. Message Broker
      13. Summary
    17. Chapter 8. Message Transformation
      1. Envelope Wrapper
      2. Content Enricher
        1. Immutable DoctorVisitCompleted
        2. Should the AccountingEnricherDispatcher Be Local?
      3. Content Filter
      4. Claim Check
      5. Normalizer
      6. Canonical Message Model
        1. Actor Systems Require a Canon
      7. Summary
    18. Chapter 9. Message Endpoints
      1. Messaging Gateway
      2. Messaging Mapper
      3. Transactional Client/Actor
        1. Transactional Client
        2. Transactional Actor
      4. Polling Consumer
        1. Resource Polling
      5. Event-Driven Consumer
      6. Competing Consumers
      7. Message Dispatcher
      8. Selective Consumer
      9. Durable Subscriber
      10. Idempotent Receiver
        1. Message De-duplication
        2. Design Messages with Identical Impact
        3. State Transition Renders Duplicates Harmless
      11. Service Activator
      12. Summary
    19. Chapter 10. System Management and Infrastructure
      1. Control Bus
      2. Detour
      3. Wire Tap
      4. Message Metadata/History
      5. Message Journal/Store
      6. Smart Proxy
      7. Test Message
      8. Channel Purger
      9. Summary
    20. Appendix A. Dotsero: An Akka-like Toolkit for .NET
      1. Dotsero Actor System
      2. Actors Using C# and .NET
      3. Dotsero Implementation
      4. Summary
    21. Bibliography
    22. Index
    23. Code Snippets