Akka Essentials
Formats:
save 15%!
save 37%!
Free Shipping!
| Also available on: |
|
- 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
Book Details
Language : EnglishPaperback : 334 pages [ 235mm x 191mm ]
Release Date : October 2012
ISBN : 1849518289
ISBN 13 : 9781849518284
Author(s) : Munish K. Gupta
Topics and Technologies : All Books, Java, Open Source
Table of Contents
PrefaceChapter 1: Introduction to Akka
Chapter 2: Starting with Akka
Chapter 3: Actors
Chapter 4: Typed Actors
Chapter 5: Dispatchers and Routers
Chapter 6: Supervision and Monitoring
Chapter 7: Software Transactional Memory
Chapter 8: Deployment Ready
Chapter 9: Remote Actors
Chapter 10: Management
Chapter 11: Advanced Topics
Index
- Chapter 1: Introduction to Akka
- Background
- Microprocessor evolution
- Concurrent systems
- Container-based applications
- Actor Model
- Akka framework
- Actor systems
- What is an actor?
- Fault tolerance
- Location transparency
- Transactors
- Akka use cases
- Summary
- Chapter 2: Starting with Akka
- Application requirements
- Application design
- Start development
- Prerequisites
- Java
- Eclipse
- Maven
- Scala
- Akka
- Java application
- Creating the Akka Maven project
- Defining message classes
- Defining actor classes
- Defining the execution class
- Scala application
- Defining message classes
- Defining actor classes
- Defining the execution class
- Summary
- Chapter 3: Actors
- Actors
- Defining an actor
- Creating actors
- Actor with default constructor
- Actor with non-default constructor
- Creating an actor within an actor hierarchy
- Messaging model
- Sending messages
- Fire and forget messages – tell()
- Send and receive messages – ask()
- Receiving messages
- Replying to messages
- Forwarding messages
- Stopping actors
- Killing actors
- Actor lifecycle monitoring
- HotSwap
- Summary
- Chapter 4: Typed Actors
- What are typed actors?
- Defining an actor
- Creating actors
- An actor with a default constructor
- An actor with a non-default constructor
- Messaging model
- Sending messages
- Fire and forget messages
- Send and receive messages
- Stopping actors
- Actor lifecycle monitoring
- Lifecycle callbacks
- Receiving messages
- Supervisor strategy
- Creating an actor hierarchy
- Dispatchers and routers
- Using dispatchers
- application.conf
- Using routers
- Summary
- Chapter 5: Dispatchers and Routers
- Dispatchers
- Dispatcher as a pattern
- Executor in Java
- Dispatchers in Akka
- Types of dispatcher
- Dispatcher
- Pinned dispatcher
- Balancing dispatcher
- Calling thread dispatcher
- Types of mailboxes
- Dispatcher usage
- Routers
- Router usage
- Router usage via application.conf
- Router usage for distributed actors
- Dynamically resizing routers
- Custom router
- Summary
- Chapter 6: Supervision and Monitoring
- Let It Crash
- Actor hierarchy
- Supervision
- Supervision strategies
- One-For-One strategy
- All-For-One strategy
- Lifecycle monitoring
- Fault tolerance
- Summary
- Chapter 7: Software Transactional Memory
- Transaction management
- What is software transactional memory?
- Coordinated transactions
- Money transfer between two accounts
- Transactor
- Money transfer between two accounts – take two
- Agents
- Creating agents
- Updating agent values
- Reading agent values
- Stopping agents
- Summary
- Chapter 8: Deployment Ready
- Testing your Akka application
- Writing the first unit test with TestActorRef
- Access to the underlying actor reference
- Testing actor behavior
- Testing exception scenarios
- Integration testing with TestKit
- EchoActor testing
- ForwardingActor testing
- SequencingActor testing
- SupervisorActor testing
- Remote actors testing
- Managing application configuration using Akka extensions
- Deployment mode
- Microkernel
- Summary
- Chapter 9: Remote Actors
- Distributed computing
- Actor path
- Remote actors
- Creating the remote node application
- Creating the local node application
- Creating remote actors programmatically
- Message serialization
- Creating your own serialization technique
- Remote events
- Summary
- Chapter 10: Management
- Application monitoring
- Typesafe console
- Typesafe console modules
- Trace
- Analyze
- Query
- Typesafe console
- Graphical dashboard
- System overview
- Node
- Dispatchers
- Actors
- Tags
- Errors
- Limitations
- JMX and REST interfaces
- RESTful API
- JMX
- Summary
- Chapter 11: Advanced Topics
- Durable mailboxes
- Akka support
- Dispatcher usage
- FileDurableMailboxStorage
- Actors and web applications
- Installing play
- Creating the first HttpActors application
- Launching the console
- Integrating actors with ZeroMQ
- Publisher-subscriber connection
- Usage
- Request-reply connection
- Usage
- Router-dealer connection
- Usage
- Push-pull connection
- Usage
- Summary
Munish K. Gupta
Code Downloads
Download the code and support files for this book.
Submit Errata
Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.
Errata
- 4 submitted: last submission 22 Jan 2013Page 63: Typo
Find the line "In all of the preceding cases, we created the actor as a top-level Actor object managed directly by ActorSystem."
This line should be changed to "In all of the preceding cases, we created the actor as a top-level Actor object
managed directly by ActorSystem under the guardian actor, /user."
Page 62: Typo
Find the line "The instantiated actor is held using ActorRef. ActorRef provides an immutable and serial able handle to the underlying actor."
The words "serial able" should be changed to "serializable".
Page 62: Typo
Find the line "The ActorRef classes can be shared among other actors by passing them as messages."
This should be changed to "The ActorRef instance can be shared among other actors by passing them as messages."
Page 62: Typo
Find the line "The Props object accepted the Actor class object, which needed to instantiated and started."
This should be changed to "The Props object accepts the Actor class object, and instantiates and starts the Actor."
Sample chapters
You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.
- Scale up and out your applications using dispatchers and remoting
- Build fault tolerance within your application
- Handle transactions within your application
- Unit test your Akka applications
- Integrate your Akka applications with existing enterprise systems using Zeromq
- Monitor the health of your Akka application
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.
This is a step-by-step guide where each chapter will teach you a concept by explaining it with clear and lucid examples– each chapter can be read independently.
This book is aimed at developers, architects who are building large distributed concurrent and scalable applications using Java/Scala. The book assumes knowledge of Java/JEE concepts but no knowledge of Actor model is assumed.

