Akka cookbook make your application fast, concurrent, and reactive through exciting recipes
Learn how to use the Akka framework to build effective applications in Scala About This Book Covers a discussion on Lagom—the newest launched Akka framework that is built to create complex microservices easily The recipe approach of the book allows the reader to know important and independent concep...
Otros Autores: | , |
---|---|
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Birmingham, England ; Mumbai, [India] :
Packt Publishing
2017.
|
Edición: | 1st edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630219906719 |
Tabla de Contenidos:
- Cover
- Copyright
- Credits
- About the Authors
- About the Reviewer
- www.PacktPub.com
- Customer Feedback
- Table of Contents
- Preface
- Chapter 1: Diving into Akka
- Introduction
- Creating an Akka Scala SBT project from scratch
- Getting ready
- How to do it...
- Creating and understanding ActorSystem
- Getting ready
- How to do it...
- How it works...
- Why we need ActorSystem
- Defining the actor's behavior and state
- Getting ready
- How to do it...
- How it works...
- There's more...
- Sending messages to actors
- Getting ready
- How to do it...
- How it works...
- There's more...
- Asking for a result from an actor
- How to do it...
- How it works...
- There's more...
- Communication between actors
- Getting ready
- How to do it...
- How it works...
- There's more...
- Creating a custom mailbox for an actor
- Getting ready
- How to do it...
- How it works...
- Prioritizing messages that an actor receives
- Getting ready
- How to do it...
- How it works...
- Creating a control-aware mailbox for an actor
- Getting ready
- How to do it...
- How it works...
- Become/unbecome behavior of an actor
- Getting ready
- How to do it...
- How it works...
- Stopping an actor
- Getting ready
- How to do it...
- How it works...
- Chapter 2: Supervision and Monitoring
- Introduction
- What is fault tolerance?
- What is a component?
- How Akka fits in between all of them?
- Creating child actors of a parent actor
- Getting ready
- How to do it...
- How it works...
- Overriding the life cycle hooks of an actor
- How to do it...
- How it works...
- Sending messages to actors and collecting responses
- How to do it...
- How it works...
- Understanding OneForOneStrategy for actors
- How to do it...
- How it works...
- Understanding AllForOneStrategy for actors
- How to do it.
- How it works...
- Monitoring an actor life cycle using DeathWatch
- How to do it...
- How it works...
- Chapter 3: Routing Messages
- Introduction
- Where to use routers
- Creating a SmallestMailboxPool of actors
- Getting ready
- How to do it...
- How it works...
- Creating a BalancingPool of actors
- Getting ready
- How to do it...
- How it works...
- Creating a RoundRobinPool of actors
- Getting ready
- How to do it...
- How it works...
- Creating a BroadcastPool of actors
- Getting ready
- How to do it...
- How it works...
- Creating a ScatterGatherFirstCompletedPool of actors
- Getting ready
- How it works...
- Creating a TailChoppingPool of actors.
- Getting ready
- How it works...
- Creating a ConsistentHashingPool of actors
- Getting ready
- How to do it...
- How it works...
- Creating a RandomPool of actors
- Getting ready
- How to do it...
- How it works...
- Sending specially handled messages to routers
- Getting ready
- How to do it...
- How it works...
- Creating a dynamically resizable pool of actors
- Getting ready
- How to do it...
- Chapter 4: Using Futures and Agents
- Introduction
- Using a future directly for a simple operation
- Getting ready
- How to do it...
- How it works...
- Using futures with actors
- Getting ready
- How to do it...
- How it works...
- Using futures inside actors
- Getting ready
- How to do it...
- How it works...
- Using for-comprehensions for futures
- Getting ready
- How to do it...
- How it works...
- Handling callback on futures
- Getting ready
- How to do it...
- How it works...
- Creating a simple parallel application using futures
- Getting ready
- How to do it...
- How it works...
- Reducing a sequence of futures
- Getting ready
- How to do it...
- How it works...
- Reading and updating agents
- Getting ready.
- How to do it...
- How it works...
- Composing agents monadically
- Getting ready
- How to do it..
- How it works...
- Chapter 5: Scheduling Actors and Other Utilities
- Introduction
- Scheduling an operation at a specified interval
- Getting ready
- How to do it…
- How it works…
- Scheduling an actor's operation at a specified interval
- Getting ready
- How to do it…
- How it works…
- Canceling a scheduled operation of the actor
- Getting ready
- How to do it…
- How it works…
- Creating a circuit breaker to avoid cascading failure
- Getting ready
- How to do it…
- How it works…
- How to introduce logging with actors
- Getting ready
- How to do it…
- How it works…
- Writing unit test for actors
- Getting ready
- How to do it…
- How it works…
- Packaging and deploying the Akka standalone application
- Getting ready
- How to do it…
- How it works…
- Packaging and deploying Akka application inside a Docker container
- Getting ready
- How to do it…
- How it works…
- Configurating Akka applications
- Getting ready
- How to do it…
- How it works…
- Chapter 6: Akka Persistence
- Introduction
- Preparing an actor for persistence
- Getting ready
- How to do it…
- How it works…
- Recovering the state of an actor
- Getting ready
- How to do it…
- How it works…
- Safely shutting down a persistent actor
- Getting ready
- How to do it…
- How it works…
- Reducing recovery time using snapshots
- Getting ready
- How to do it…
- How it works…
- Creating a persistence FSM model
- Getting ready
- How to do it…
- How it works…
- Persisting the state to LevelDB
- Getting ready
- How to do it…
- How it works…
- Persisting the state to Cassandra
- Getting ready
- How to do it…
- How it works…
- Persisting the state to Redis
- Getting ready
- How to do it…
- How it works….
- Understanding event sourcing
- Getting ready
- How to do it…
- How it works…
- Handling failure in event sourcing
- Getting ready
- How to do it…
- How it works…
- Using persistence query
- Getting ready
- How to do it…
- How it works…
- Persistence query for LevelDB
- Getting ready
- How to do it…
- How it works…
- Chapter 7: Remoting and Akka Clustering
- Introduction
- Enabling Akka applications for remoting
- Getting ready
- How to do it...
- How it works...
- Creating remote actors on different machines
- Getting ready
- How to do it...
- How it works...
- Looking up remote actors from different machines
- Getting ready
- How to do it...
- How it works...
- Deploying remote actors programmatically on different nodes
- Getting ready
- How to do it...
- How it works...
- Scaling out your application using remote actors
- Getting ready
- How to do it...
- How it works
- Creating a chat-based application using remote actors
- Getting ready
- How to do it...
- How it works...
- Enabling Akka clustering for your project
- Getting ready
- How to do it...
- How it works...
- Using Distributed Publish-Subscribe in the cluster
- Getting ready
- How to do it...
- How it works...
- Cluster Sharding
- Getting ready
- How to do it...
- How it works...
- Sharing data between nodes in an Akka cluster
- Getting ready
- How to do it...
- How it works...
- Creating a singleton actor across clusters
- Getting ready
- How to do it...
- How it works...
- See also
- Chapter 8: Akka Streams
- Introduction
- Creating simple Akka Streams
- Getting ready
- How to do it...
- How it works...
- How to transform streams and consume them
- Getting ready
- How to do it...
- How it works...
- Creating stream sources, flows, and sinks
- Getting ready
- How to do it...
- How it works.
- Custom stream processing
- Getting ready
- How to do it...
- How it works...
- Error handling in Akka streams
- Getting ready
- How to do it...
- How it works...
- Pipelining and parallelizing streams
- Getting ready
- How to do it...
- How it works...
- Working with streaming I/O
- Getting ready
- How to do it...
- How it works...
- Integrating streams with Akka actors
- Getting ready
- How to do it...
- How it works...
- Working with graphs
- Getting ready
- How to do it...
- How it works...
- Processing RabbitMQ messages with Akka streams
- Getting ready
- How to do it...
- How it works...
- Integrating Akka Streams with Kafka using Reactive Kafka
- Getting ready
- How to do it...
- How it works...
- Chapter 9: Akka HTTP
- Introduction
- Creating a minimal HTTP server using Akka HTTP
- Getting ready
- How to do it...
- How it works...
- Consuming Akka HTTP services using a client-side API
- Getting ready
- How to do it...
- How it works...
- Writing routing DSL for HTTP servers
- Getting ready
- How to do it...
- How it works...
- Understanding the configuration of Akka HTTP
- Getting ready
- How to do it...
- How it works...
- Marshaling and unmarshaling data
- Getting ready
- How to do it...
- How it works...
- Encoding and decoding data
- Getting ready
- How to do it...
- How it works...
- Understanding directives
- Getting ready
- How to do it...
- How it works...
- Exception handling
- Getting ready
- How to do it...
- How it works...
- Uploading a file using Akka HTTP
- Getting ready
- How to do it...
- How it works...
- Building JSON support with Akka HTTP
- Getting ready
- How to do it...
- How it works...
- XML support with Akka HTTP
- Getting ready
- How to do it...
- How it works...
- Chapter 10: Understanding Various Akka patterns
- Introduction.
- The Master Slave work pulling pattern.