- Paperback: 74 pages
- Publisher: O'Reilly Media; 1 edition (September 5, 2013)
- Language: English
- ISBN-10: 1449360076
- ISBN-13: 978-1449360078
- Product Dimensions: 7 x 0.2 x 9.2 inches
- Shipping Weight: 4 ounces (View shipping rates and policies)
- Average Customer Review: 3.3 out of 5 stars See all reviews (15 customer reviews)
Amazon Best Sellers Rank:
#1,210,290 in Books (See Top 100 in Books)
- #253 in Books > Computers & Technology > Programming > Software Design, Testing & Engineering > Tools
- #470 in Books > Computers & Technology > Networking & Cloud Computing > Data in the Enterprise > Client-Server Systems
- #1203 in Books > Computers & Technology > Programming > Languages & Tools > Java
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Effective Akka: Patterns and Best Practices 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Frequently bought together
Customers who bought this item also bought
Q&A with Jamie Allen, author of "Effective Akka: Patterns and Best Practices"
Q. Why is this an important book for people to read now
A. The advent of the many-core platform means that developers have more processing resources in the form of "cores" at their disposal than ever before. Traditional programming constructs do not allow developers to leverage these cores. As computers add more and more cores with each new platform released by hardware manufacturers, developers will need to find ways to maximize the utilization of these resources. Akka provides a platform for doing just that, and allowing your application to scale up and out as more resources become available.
Q. What will readers walk away with after reading "Effective Akka?"
A. After reading "Effective Akka," readers should have a firm grasp of the kinds of coding issues they may encounter when developing with actors, regardless of whether they're using Scala/Akka or Erlang. Many of the concepts are relevant to developers who are writing asynchronous code without actors as well. Effective Akka provides guidance with respect to coding style and best practices so that developers are able to avoid common pitfalls.
Q. What's so exciting and important about patterns and best prices?
A. The move to "reactive" solutions. Developers can perform much more work nowadays by using asynchrony-- not wasting threads that spawn blocking operations, instead defining work that can be applied automatically when such work is completed. Many technologies are emerging in this space, such as ReactiveJava, Node.js, Go, Clojure's core.async and Scala's futures, actors and async support. Never before have developers had so many useful tools at their disposal to write applications that are interactive, low-latency, fault tolerant, and scalable. Every language and platform is looking to provide a solution in this space.
Q. Can you give us a few tips when building high-performance software with Akka?
- Be very careful about closing over state from outside of a code block. Capture and stabilize such state by placing it into local values so that you know you will have an unchanged value at the time you actually need it.
- Keep your code simple. Make more atomic methods and functions that do only one thing, and combine them to accomplish your goals.
- Never reference the keyword "this" from inside an actor. Don't use it and don't register it elsewhere. Pretend the concept does not exist, where possible. Learn to think in terms of "ActorRef" and use them at all times, even when communicating with yourself.
- Create failure zones in your application by assigning thread pool resources to specific groups of actors. This way, if one actor is monopolizing a thread with a computationally-intense activity, only a limited subset of other actors are affected by not having that resource available to them.
- Avoid blocking as much as possible. Always write code to be asynchronous unless there is a specific block of code where blocking must occur. Put any such blocking tasks on their own threads, or use Scala's Managed Blocking to keep other resources from being starved of a thread.
About the Author
Jamie Allen is the Director of Consulting for Typesafe, the company that makes the Scala programming language, the Akka toolkit and Play Framework. Jamie has been building actor-based systems with Scala since 2009. Jamie lives in the San Francisco Bay Area with his wife, Yeon, and three children.
If you are a seller for this product, would you like to suggest updates through seller support?
Top Customer Reviews
- detailed explanation of reasons behind some choices, despite the book (booklet) size.
- chaotic writing,
- the book doesn't read like "Patterns and Best Practices", as you can't just pickup the book and read one chapter that applies to what you are doing at the moment, like "Design Patterns" by Gang of Four does, but rather has continuous narrative,
- code examples and descriptions are out of sync on variable names (horrible editing O'Reilly?),
- local variables in all examples are type unsafe (val), as a result, the book is difficult to read for anyone who is not very familiar with Scala,