0%

Book Description

A practical step-by-step guide to learn and build Akka's Actor-based, distributed, concurrent, and scalable Java Applications

  • Build large, distributed, concurrent, and scalable applications using the Akka’s Actor model
  • Simple and clear analogy to Java/JEE application development world to explain the concepts
  • Each chapter will teach you a concept by explaining it with clear and lucid examples– each chapter can be read independently

In Detail

Developers/Architects need to manage the fine balance between the ever increasing load and ever decreasing response latency. Applications need to be designed for Internet scale, which means you need to be skilled in building large distributed, scalable, and concurrent applications. Whether you are building the next Facebook or working for a Fortune 500 organization, you need to be ready to design scalable, concurrent, and fault-tolerant applications. Akka is a toolkit and runtime for building highly concurrent, distributed, and fault-tolerant event-driven applications on the JVM.

"Akka Essentials" will show you the current challenges with Java Scalability and concurrency model and how Akka’s Actor Model can help you design and build applications that are inherently scalable and fault-tolerant. Whether you are building new applications or want to refactor an existing application, you will learn the right techniques to build and scale up in no time.

Table of Contents

  1. Akka Essentials
    1. Akka Essentials
    2. Credits
    3. About the Author
    4. Acknowledgement
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. The driving force of Akka's Actor Model
      2. What this book covers
      3. What you need for this book
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Introduction to Akka
      1. Background
        1. Microprocessor evolution
        2. Concurrent systems
        3. Container-based applications
        4. Actor Model
        5. Akka framework
          1. Actor systems
          2. What is an actor?
            1. State
            2. Behavior
            3. Mailbox
            4. Actor lifecycle
          3. Fault tolerance
          4. Location transparency
          5. Transactors
      2. Akka use cases
      3. Summary
    9. 2. Starting with Akka
      1. Application requirements
      2. Application design
      3. Start development
        1. Prerequisites
          1. Java
          2. Eclipse
          3. Maven
          4. Scala
          5. Akka
        2. Java application
          1. Creating the Akka Maven project
          2. Defining message classes
            1. MapData.java
            2. WordCount.java
            3. ReduceData.java
            4. Result.java
          3. Defining actor classes
            1. MapActor.java
            2. ReduceActor.java
            3. AggregateActor.java
            4. MasterActor.java
          4. Defining the execution class
            1. MapReduceApplication.java
        3. Scala application
          1. Defining message classes
          2. Defining actor classes
            1. MapActor.scala
            2. ReduceActor.scala
            3. AggregateActor.scala
            4. MasterActor.scala
          3. Defining the execution class
            1. MapReduceApplication.scala
      4. Summary
    10. 3. Actors
      1. Actors
      2. Defining an actor
      3. Creating actors
        1. Actor with default constructor
        2. Actor with non-default constructor
        3. Creating an actor within an actor hierarchy
      4. Messaging model
        1. Sending messages
          1. Fire and forget messages – tell()
          2. Send and receive messages – ask()
        2. Receiving messages
        3. Replying to messages
        4. Forwarding messages
      5. Stopping actors
      6. Killing actors
      7. Actor lifecycle monitoring
      8. HotSwap
      9. Summary
    11. 4. Typed Actors
      1. What are typed actors?
      2. Defining an actor
      3. Creating actors
        1. An actor with a default constructor
        2. An actor with a non-default constructor
      4. Messaging model
        1. Sending messages
          1. Fire and forget messages
          2. Send and receive messages
      5. Stopping actors
      6. Actor lifecycle monitoring
        1. Lifecycle callbacks
        2. Receiving messages
        3. Supervisor strategy
      7. Creating an actor hierarchy
      8. Dispatchers and routers
        1. Using dispatchers
          1. application.conf
        2. Using routers
      9. Summary
    12. 5. Dispatchers and Routers
      1. Dispatchers
        1. Dispatcher as a pattern
        2. Executor in Java
        3. Dispatchers in Akka
        4. Types of dispatcher
          1. Dispatcher
          2. Pinned dispatcher
          3. Balancing dispatcher
          4. Calling thread dispatcher
        5. Types of mailboxes
        6. Dispatcher usage
          1. Thread pool executor
          2. Fork join executor
      2. Routers
        1. Router usage
        2. Router usage via application.conf
        3. Router usage for distributed actors
        4. Dynamically resizing routers
        5. Custom router
      3. Summary
    13. 6. Supervision and Monitoring
      1. Let It Crash
        1. Actor hierarchy
      2. Supervision
      3. Supervision strategies
        1. One-For-One strategy
        2. All-For-One strategy
      4. Lifecycle monitoring
      5. Fault tolerance
      6. Summary
    14. 7. Software Transactional Memory
      1. Transaction management
        1. What is software transactional memory?
      2. Coordinated transactions
        1. Money transfer between two accounts
      3. Transactor
        1. Money transfer between two accounts – take two
      4. Agents
        1. Creating agents
        2. Updating agent values
        3. Reading agent values
        4. Stopping agents
      5. Summary
    15. 8. Deployment Ready
      1. Testing your Akka application
        1. Writing the first unit test with TestActorRef
        2. Access to the underlying actor reference
        3. Testing actor behavior
        4. Testing exception scenarios
        5. Integration testing with TestKit
          1. EchoActor testing
          2. ForwardingActor testing
          3. SequencingActor testing
          4. SupervisorActor testing
        6. Remote actors testing
      2. Managing application configuration using Akka extensions
      3. Deployment mode
        1. Microkernel
      4. Summary
    16. 9. Remote Actors
      1. Distributed computing
        1. Actor path
      2. Remote actors
        1. Creating the remote node application
          1. Creating the local node application
          2. Creating remote actors programmatically
      3. Message serialization
        1. Creating your own serialization technique
      4. Remote events
      5. Summary
    17. 10. Management
      1. Application monitoring
      2. Typesafe console
        1. Typesafe console modules
          1. Trace
            1. Trace configuration
          2. Analyze
            1. Running analyze module
          3. Query
            1. Running query module
          4. Typesafe console
            1. Running Typesafe console
      3. Graphical dashboard
        1. System overview
          1. Node
        2. Dispatchers
          1. Actors
          2. Tags
          3. Errors
        3. Limitations
      4. JMX and REST interfaces
        1. RESTful API
        2. JMX
      5. Summary
    18. 11. Advanced Topics
      1. Durable mailboxes
        1. Akka support
          1. Dispatcher usage
          2. FileDurableMailboxStorage
      2. Actors and web applications
        1. Installing play
        2. Creating the first HttpActors application
        3. Launching the console
      3. Integrating actors with ZeroMQ
        1. Publisher-subscriber connection
          1. Usage
        2. Request-reply connection
          1. Usage
        3. Router-dealer connection
          1. Usage
        4. Push-pull connection
          1. Usage
      4. Summary
18.224.44.108