• Complain

Raymond Roestenburg - Akka in Action

Here you can read online Raymond Roestenburg - Akka in Action full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2016, publisher: Manning Publications, genre: Home and family. 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.

Raymond Roestenburg Akka in Action

Akka in Action: summary, description and annotation

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

Summary

Akka in Action is a comprehensive tutorial on building message-oriented systems using Akka. The book takes a hands-on approach, where each new concept is followed by an example that shows you how it works, how to implement the code, and how to (unit) test it.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Technology

Akka makes it relatively easy to build applications in the cloud or on devices with many cores that efficiently use the full capacity of the computing power available. Its a toolkit that provides an actor programming model, a runtime, and required support tools for building scalable applications.

About the Book

Akka in Action shows you how to build message-oriented systems with Akka. This comprehensive, hands-on tutorial introduces each concept with a working example. Youll start with the big picture of how Akka works, and then quickly build and deploy a fully functional REST service out of actors. Youll explore test-driven development and deploying and scaling fault-tolerant systems. After mastering the basics, youll discover how to model immutable messages, implement domain models, and apply techniques like event sourcing and CQRS. Youl also find a tutorial on building streaming applications using akka-stream and akka-http. Finally, youl get practical advice on how to customize and extend your Akka system.

Whats Inside

  • Getting concurrency right
  • Testing and performance tuning
  • Clustered and cloud-based applications
  • Covers Akka version 2.4

About the Reader

This book assumes that youre comfortable with Java and Scala. No prior experience with Akka required.

About the Authors

A software craftsman and architect, Raymond Roestenburg is an Akka committer. Rob Bakker specializes in concurrent back-end systems and systems integration. Rob Williams has more than 20 years of product development experience.

Table of Contents

  1. Introducing Akka
  2. Up and running
  3. Test-driven development with actors
  4. Fault tolerance
  5. Futures
  6. Your first distributed Akka app
  7. Configuration, logging, and deployment
  8. Structural patterns for actors
  9. Routing messages
  10. Message channels
  11. Finite-state machines and agents
  12. System integration
  13. Streaming
  14. Clustering
  15. Actor persistence
  16. Performance tips
  17. Looking ahead

Raymond Roestenburg: author's other books


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

Akka in Action — 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 "Akka in Action" 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
MEAP VERSION 17 About this MEAP This book file has been tested with iBooks - photo 1

MEAP VERSION 17

About this MEAP This book file has been tested with iBooks 15 on iOS 5 and - photo 2
About this MEAP

This book file has been tested with iBooks 1.5 on iOS 5, and the Kindle App for iPad 2.9. If you are using an earlier version of iBooks and are experiencing problems, please try upgrading iBooks.

To get a full-screen view of images:

  • iBooks: Double-tap an image.
  • Kindle app: Use two fingers to stretch the image.

You can download the most up-to-date version of your electronic books from your Manning Account at .

Manning Publications Co. We welcome reader comments about anything in the manuscript - other than typos and other simple mistakes. These will be cleaned up during production of the book by copyeditors and proofreaders.

https://forums.manning.com/forums/akka-in-action

Akka in Action - image 3
Brief Table of Contents
1
Introducing Akka

In this chapter:

  • Why scaling is hard

  • Write once, scale anywhere

  • Introduction to the actor programming model

  • Akka actors

  • What is Akka?

Up until not too long ago (say up to the middle of the 90s, just before the internet revolution) it was completely normal to build applications that would only ever run on a single computer, single CPU. If the application wasnt fast enough, the standard response would be to wait for a while for CPUs to get faster; no need to change any code. Problem solved. Programmers around the world were having a free lunch and life was good.

Around 2005, Herb Sutter wrote in Dr. Dobbs Journal about the need for a fundamental change (link: http://www.gotw.ca/publications/concurrency-ddj.htm). In short, a limit to increasing CPU clock speeds has been reached and the free lunch is over.

If applications need to perform faster, or if they need to support more users, they will have to be concurrent . (Well get to a strict definition later; for now lets simply define this as not single-threaded . Thats not really correct but good enough for the moment.)

Scalability is the measure to which a system can adapt to a change in demand for resources, without negatively impacting performance. Concurrency is a means to achieve scalability: the premise is that, if needed, more CPUs can be added to servers, which the application then automatically starts making use of. Its the next best thing to a free lunch.

Around the year 2005 when Herb Sutter wrote his excellent article, youd find companies running applications on clustered multi-processor servers (often no more than two to three, just in case one of them crashes). Support for concurrency in programming languages was available but limited and considered black magic by many mere mortal programmers. Herb Sutter predicted in his article that programming languages will increasingly be forced to deal well with concurrency.

Lets see what changes in about a decade since! Fast forward to today and you find applications run on large numbers of servers in the cloud, integrating many systems across many data centers. The ever-increasing demands of end users push the requirements of performance and stability of the systems that we build.

So where are those new concurrency features? Support for concurrency in most programming languages, especially on the JVM, has hardly changed. Although the implementation details of concurrency APIs have definitely improved, we still have to work with low-level constructs like threads and locks, which are notoriously difficult to work with.

Next to scaling up (increasing resources, for instance CPUs on existing servers), scaling out refers to dynamically adding more servers to a cluster. Nothing much has changed to how programming languages support networking either since the 90s. Many technologies still essentially use RPC (remote procedure calls) to communicate over the network.

In the mean time, advances in cloud computing services and multi-core CPU architecture have made computing resources ever more abundant.

PaaS (Platform As a Service) offerings have simplified provisioning and deployment of very large distributed applications, once the domain for only the largest players in the IT industry. Cloud services like AWS EC2 (Amazon Web Services Elastic Compute Cloud) and Google Compute Engine give you the ability to literally spin up thousands of servers in minutes, while tools like Docker, Puppet, Ansible, and many others make it easier to manage and package applications on virtual servers.

The number of CPU cores in devices is also ever-increasing: even mobile phones and tablets have many CPU cores today.

But that doesnt mean that we can afford to throw any number of resources at any problem. In the end, everything is about cost and efficiency. So its all about effectively scaling applications, or in other words, getting bang for your buck. Just as youd never use a sorting algorithm with exponential time complexity, it makes sense to think about the cost of scaling.

Ideally, youd expect the following two statements to be true when scaling your application:

  1. The ability to handle any increase of demand with the same number of resources is unrealistic, so ideally youd want the required increase of resources to be growing slowly when demand grows, linear or better. Figure shows the relationship between demand and number of required resources.

  2. If resources have to be increased, ideally youd like the complexity of the application to stay the same, or increase slowly. (Remember the good ol free lunch when no added complexity was required for a faster application!). Figure shows the relationship between number of resources and complexity.

Figure 1.1. Demand against resources

Figure 12 Complexity against resources Both the number of resources and - photo 4

Figure 1.2. Complexity against resources

Both the number of resources and the complexity contribute to the total cost of - photo 5

Both the number of resources and the complexity contribute to the total cost of scaling.

Were leaving a lot of factors out of this back-of-the-envelope calculation, but its easy to see that both these rates have a large impact on the total cost of scaling.

One doomsday scenario is where youd need to pay increasingly more for more under-utilized resources. Another nightmare scenario is where the complexity of the application shoots through the roof when more resources are added.

This leads to two goals: complexity has to stay as low as possible, and resources must be used efficiently while we scale the application.

Can we use the common tools of today (threads and RPC) to satisfy these two goals? Scaling out with RPC and scaling up with low-level threading is not a good idea. RPC pretends that a call over the network is no different from a local method call. Every RPC call needs to block the current thread and wait for a response from the network for the local method call abstraction to work, which can be costly. This goes against our goal to use resources efficiently.

Another problem with this approach is that you need to know exactly where you scale up or scale outmultithreaded programming and RPC-based network programming are like apples and pears, both run in different contexts, using different semantics and running on different levels of abstraction. You end up hard-coding which parts of your application are using threads for scaling up and which parts are using RPC for scaling out.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Akka in Action»

Look at similar books to Akka in Action. 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 «Akka in Action»

Discussion, reviews of the book Akka in Action 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.