• Complain

Jamie Allen - Effective Akka

Here you can read online Jamie Allen - Effective Akka full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2013, publisher: OReilly Media, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Jamie Allen Effective Akka
  • Book:
    Effective Akka
  • Author:
  • Publisher:
    OReilly Media
  • Genre:
  • Year:
    2013
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Effective Akka: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Effective Akka" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Avoid common mistakes when building distributed, asynchronous, high-performance software with the Akka toolkit and runtime. With this concise guide, author Jamie Allen provides a collection of best practices based on several years of using the actor model. The book also includes examples of actor application types and two primary patterns of actor usage, the Extra Pattern and Cameo Pattern.

Allen, the Director of Consulting for Typesafecreator of Akka and the Scala programming languageexamines actors with a banking-service use case throughout the book, using examples shown in Akka and Scala. If you have any experience with Akka, this guide is essential.

  • Delve into domain-driven and work-distribution actor applications
  • Understand why its important to have actors do only one job
  • Avoid thread blocking by allowing logic to be delegated to a Future
  • Model interactions as simply as possible to avoid premature optimization
  • Create well-defined interactions, and know exactly what failures can occur
  • Learn why you should never treat actors as you would an ordinary class
  • Keep track of what goes on in production by monitoring everything
  • Tune Akka applications with the Typesafe Console

Jamie Allen: author's other books


Who wrote Effective Akka? Find out the surname, the name of the author of the book and a list of all author's works by series.

Effective Akka — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Effective Akka" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Effective Akka
Jamie Allen
Beijing Cambridge Farnham Kln Sebastopol Tokyo Special Upgrade Offer If you - photo 1

Beijing Cambridge Farnham Kln Sebastopol Tokyo

Special Upgrade Offer

If you purchased this ebook directly from oreilly.com, you have the following benefits:

  • DRM-free ebooksuse your ebooks across devices without restrictions or limitations

  • Multiple formatsuse on your laptop, tablet, or phone

  • Lifetime access, with free updates

  • Dropbox syncingyour files, anywhere

If you purchased this ebook from another retailer, you can upgrade your ebook to take advantage of all these benefits for just $4.99. to access your ebook upgrade.

Please note that upgrade offers are not available from sample content.

Preface

Welcome to Effective Akka . In this book, I will provide you with comprehensive information about what Ive learned using the Akka toolkit to solve problems for clients in multiple industries and use cases. This is a chronicle of patterns Ive encountered, as well as best practices for developing applications with the Akka toolkit.

Who This Book Is For

This book is for developers who have progressed beyond the introductory stage of writing Akka applications and are looking to understand best practices for development that will help them avoid common missteps. Many of the tips are relevant outside of Akka as well, whether it is using another actor library, Erlang, or just plain asynchronous development. This book is not for developers who are new to Akka and are looking for introductory information.

What Problems Are We Solving with Akka?

The first question that has to be addressed is, what problems is Akka trying to solve for application developers? Primarily, Akka provides a programming model for building distributed, asynchronous, high-performance software. Lets investigate each of these individually.

Distributed

Building applications that can scale outward, and by that I mean across multiple JVMs and physical machines, is very difficult. The most critical aspects a developer must keep in mind are resilience and replication: create multiple instances of similar classes for handling failure, but in a way that also performs within the boundaries of your applications nonfunctional requirements. Note that while these aspects are important in enabling developers to deal with failures in distributed systems, there are other important aspects, such as partitioning functionality, that are not specific to failure. There is a latency overhead associated with applications that are distributed across machines and/or JVMs due to network traffic as communication takes place between systems. This is particularly true if they are stateful and require synchronization across nodes, as messages must be serialized/marshalled, sent, received, and deserialized/unmarshalled for every message.

In building our distributed systems, we want to have multiple servers capable of handling requests from clients in case any one of them is unavailable for any reason. But we also do not want to have to write code throughout our application focused only on the details of sending and receiving remote messages. We want our code to be declarativenot full of details about how an operation is to be done, but explaining what is to be done. Akka gives us that ability by making the location of actors transparent across nodes.

Asynchronous

Asynchrony can have benefits both within a single machine and across a distributed architecture. In a single node, it is entirely possible to have tremendous throughput by organizing logic to be synchronous and pipelined. The Disruptor Pattern by LMAX is an excellent example of an architecture that can handle a great deal of events in a single-threaded model. That said, it meets a very specific use case profile: high volume, low latency, and the ability to structure consumption of a queue. If data is not coming into the producer, the disruptor must find ways to keep the thread of execution busy so as not to lose the warmed caches that make it so efficient. It also uses pre-allocated, mutable states to avoid garbage collectionvery efficient, but dangerous if developers dont know what theyre doing.

With asynchronous programming, we are attempting to solve the problem of not pinning threads of execution to a particular core, but instead allowing all threads access in a varying model of fairness. We want to provide a way for the hardware to be able to utilize cores to the fullest by staging work for execution. This can lead to a lot of context switches, as different threads are scheduled to do their work on cores, which arent friendly to performance, since data must be loaded into the on-core caches of the CPU when that thread uses it. So you also need to be able to provide ways to batch asynchronous execution. This makes the implementation less fair but allows the developer to tune threads to be more cache-friendly.

High Performance

This is one of those loose terms that, without context, might not mean much. For the sake of this book, I want to define high performance as the ability to handle tremendous loads very fast while at the same time being fault tolerant. Building a distributed system that is extremely fast but incapable of managing failure is virtually useless: failures happen, particularly in a distributed context (network partitions, node failures, etc.), and resilient systems are able deal with them. But no one wants to create a resilient system without being able to support reasonably fast execution.

Reactive Applications

You may have heard discussion, particularly around Typesafe, of creating reactive applications. My initial response to this word was to be cynical, having heard plenty of marketecture terms (words with no real architectural meaning for application development but used by marketing groups). However, the concepts espoused in the Reactive Manifesto make a strong case for what features comprise a reactive application and what needs to be done to meet this model. Reactive applications are characteristically interactive, fault tolerant, scalable, and event driven. If any of these four elements are removed, its easy to see the impact on the other three.

Akka is one of the toolkits through which you can build reactive applications. Actors are event driven by nature, as communication can only take place through messages. Akka also provides a mechanism for fault tolerance through actor supervision, and is scalable by leveraging not only all of the cores of the machine on which its deployed, but also by allowing applications to scale outward by using clustering and remoting to deploy the application across multiple machines or VMs.

Use Case for This Book: Banking Service for Account Data

In this book, we will use an example of a large financial institution that has decided that using existing caching strategies no longer meet the real-time needs of its business. We will break down the data as customers of the bank, who can have multiple accounts. These accounts need to be organized by type, such as checking, savings, brokerage, etc., and a customer can have multiple accounts of each type.

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic Indicates new terms, URLs, email addresses, filenames, and file extensions. Constant width Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Effective Akka»

Look at similar books to Effective Akka. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Effective Akka»

Discussion, reviews of the book Effective Akka and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.