Akka Essentials


Akka Essentials
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
$25.49
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
$49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • 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 : English
Paperback : 334 pages [ 235mm x 191mm ]
Release Date : October 2012
ISBN : 1849518289
ISBN 13 : 9781849518284
Author(s) : Munish K. Gupta
Topics and Technologies : All Books, Application Development, Java, Open Source

Table of Contents

Preface
Chapter 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

                        Munish K. Gupta is a Senior Architect working for Wipro Technologies. Based in Bangalore, India, his day-to-day work involves solution architecture for applications with stringent non-functional requirements (NFRs), Application Performance Engineering, and exploring the readiness of cutting-edge, open source technologies for enterprise adoption. He advises enterprise customers to help them solve performance and scalability issues, and implement innovative differentiating solutions to achieve business and technology goals. He believes that technology is meant to enable the business, and technology by itself is not a means to an end. He is very passionate about software programming and craftsmanship. He is always looking for patterns in solving problems, writing code, and making optimum use of tools and frameworks. He blogs about technology trends and Application Performance Engineering at http://www.techspot.co.in and about Akka at http://www.akkaessentials.in
                        Sorry, we don't have any reviews for this title yet.

                        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

                        - 5 submitted: last submission 30 May 2013

                        Page 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."

                        Errata page 63: Typo
                        The following paragraph – The instantiated actor is held using ActorRef. ActorRef provides an immutable and serial able handle to the underlying actor. In essence, ActorRef encapsulates the actor and only supports the passing of messages to the actor. Each actor can access internally its local instance reference through the self field. The ActorRef classes can be shared among other actors by passing them as messages.

                        Can be rephrased as
                        The instantiated actor reference is held using an ActorRef. Question arises - Why use an ActorRef? In essence, ActorRef encapsulates the actor and only supports the passing of messages to the underlying actor. ActorRef provides an immutable and serializable handle to the underlying Actor. Each actor can access internally its local instance reference through the self field. ActorRef can support different kind of actors – local actors, remote actors, router actors and forthcoming cluster actors. ActorRef reference can be shared with other actors by passing the same as message.

                         

                        Sample chapters

                        You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                        Frequently bought together

                        Akka Essentials +    iPhone with Microsoft Exchange Server 2010: Business Integration and Deployment =
                        50% Off
                        the second eBook
                        Price for both: €36.65

                        Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                        What you will learn from this book

                        • 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

                        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.

                        Approach

                        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.

                        Who this book is for

                        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.

                        Code Download and Errata
                        Packt Anytime, Anywhere
                        Register Books
                        Print Upgrades
                        eBook Downloads
                        Video Support
                        Contact Us
                        Awards Voting Nominations Previous Winners
                        Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                        Resources
                        Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software