万本电子书0元读

万本电子书0元读

顶部广告

Akka Cookbook电子书

售       价:¥

7人正在读 | 0人评论 9.8

作       者:Héctor Veiga Ortiz,Piyush Mishra

出  版  社:Packt Publishing

出版时间:2017-05-26

字       数:52.8万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
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 concepts of Scala and Akka in a seamless manner ? Provides a comprehensive understanding of the Akka actor model and implementing it to create reactive web applications Who This Book Is For If you are a Scala developer who wants to build scalable and concurrent applications, then this book is for you. Basic knowledge of Akka will help you take advantage of this book. What You Will Learn ? Control an actor using the ContolAware mailbox ? Test a fault-tolerant application using the Akka test kit ? Create a parallel application using futures and agents ? Package and deploy Akka application inside Docker ? Deploy remote actors programmatically on different nodes ? Integrate Streams with Akka actors ? Install Lagom and create a Lagom project In Detail Akka is an open source toolkit that simplifies the construction of distributed and concurrent applications on the JVM. This book will teach you how to develop reactive applications in Scala using the Akka framework. This book will show you how to build concurrent, scalable, and reactive applications in Akka. You will see how to create high performance applications, extend applications, build microservices with Lagom, and more. We will explore Akka's actor model and show you how to incorporate concurrency into your applications. The book puts a special emphasis on performance improvement and how to make an application available for users. We also make a special mention of message routing and construction. By the end of this book, you will be able to create a high-performing Scala application using the Akka framework. Style and approach This highly practical recipe-based approach will allow you to build scalable, robust, and reactive applications using the Akka framework.
目录展开

Title Page

Copyright

Akka Cookbook

Credits

About the Authors

About the Reviewer

www.PacktPub.com

Customer Feedback

Preface

What this book covers

What you need for this book

Who this book is for

Sections

Getting ready

How to do it…

How it works…

There's more…

See also

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

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

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

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

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

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

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

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

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

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

Understanding Various Akka patterns

Introduction

The Master Slave work pulling pattern

Getting ready

How to do it...

How it works...

Ordered termination of actors

Getting ready

How to do it...

How it works...

Shutdown patterns in Akka

Getting ready

How to do it...

How it works...

Scheduling periodic messages to an actor

Getting ready

How to do it...

How it works...

Throttling of messages while sending them to an actor

Getting ready

How to do it...

How it works...

Balancing workload across actors

Getting ready

How it works...

How it works...

The aggregator pattern

Getting ready

How to do it...

How it works...

The CountDownLatch pattern

Getting ready

How to do it...

How it works...

Finite-state machine

Getting ready

How to do it...

How it works...

The pausable actor pattern

Getting ready

How to do it...

How it works...

Enveloping actor

Getting ready

How to do it...

How it works...

Microservices with Lagom

Introduction

Installing Lagom and creating a Lagom project

Getting ready

How to do it...

How it works...

Understanding the service locator

Getting ready

How to do it...

How it works...

Understanding service descriptors

Getting ready

How to do it...

How it works

Implementing Lagom services

Getting ready

How to do it...

How it works...

Consuming services

Getting ready

How to do it...

How it works...

Testing services

Getting ready

How to do it...

How it works...

Writing persistent and clustered services

Getting ready

How to do it...

How it works...

Running Lagom in production

Getting ready

How to do it...

How it works...

Integrating with Akka

Getting ready

How to do it...

How it works

累计评论(0条) 1个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部