Akka Essentials

Akka Essentials

Kumar Gupta Munish

Language: English

Pages: 237

ISBN: 2:00106905

Format: PDF / Kindle (mobi) / ePub


A practical, step-by-step guide to learn and build Akka's actor-based, distributed, concurrent, and scalable Java applications
* Build large, distributed, concurrent, and scalable applications using the Akka's Actor model
* Simple and clear analogy to Java/JEE application development world to explain the concepts
* Each chapter will teach you a concept by explaining it with clear and lucid examples– each chapter can be read independently

In Detail

Developers/Architects need to manage the fine balance between the ever increasing load and ever decreasing response latency. Applications need to be designed for Internet scale, which means you need to be skilled in building large distributed, scalable, and concurrent applications. Whether you are building the next Facebook or working for a Fortune 500 organization, you need to be ready to design scalable, concurrent, and fault-tolerant applications. Akka is a toolkit and runtime for building highly concurrent, distributed, and fault-tolerant event-driven applications on the JVM.

"Akka Essentials" will show you the current challenges with Java Scalability and concurrency model and how Akka's Actor Model can help you design and build applications that are inherently scalable and fault-tolerant. Whether you are building new applications or want to refactor an existing application, you will learn the right techniques to build and scale up in no time.

What you will learn from this book
* Scale up and out your applications using dispatchers and remoting
* Build fault tolerance within your application
* Handle transactions within your application
* Unit test your Akka applications
* Integrate your Akka applications with existing enterprise systems using Zeromq
* Monitor the health of your Akka application

Approach

This is a step-by-step guide where each chapter will teach you a concept by explaining it with clear and lucid examples– each chapter can be read independently.

Who this book is written for

This book is aimed at developers, architects who are building large distributed concurrent and scalable applications using Java/Scala. The book assumes knowledge of Java/JEE concepts but no knowledge of Actor model is assumed.

Learn Cocoa on the Mac (2nd Edition)

Expert F# 3.0

Discovering SQL: A Hands-On Guide for Beginners (Wrox Programmer to Programmer)

Arduino and LEGO Projects

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

messages, we define the message classes in the package—akka.first.app.mapreduce.messages. MapData.java The following code snippet shows a MapData message: package akka.first.app.mapreduce.messages; import java.util.List; public final class MapData { private final List dataList; public List getDataList() { return dataList; } public MapData(List dataList) { this.dataList = dataList; } } MapData is the message that is passed from the Map actor to the

Props(TransferActor.class),"TransferActor"); @Override public void onReceive(Object message) throws Exception { if (message instanceof TransferMsg) { transfer.tell(message); } else if (message instanceof AccountBalance) { AccountBalance account = (AccountBalance) Await.result( ask(transfer, message, 5000), Duration.parse("5 second")); System.out.println("Account #" + account.getAccountNumber() + " , Balance " + account.getBalance()); getSender().tell(account); }else

know of failure only when a major portion of the application or service has gone down. In a large, distributed application, monitoring and alerting capabilities are all the more important due to the sheer number of pieces that need to work together to make sure that the application performs at its optimum. In addition, it is an expected behavior to have the monitoring turned on in production systems, because, at times, system behavior at runtime is unpredictable and very difficult to reproduce

configuration The time dimension can filter queries with a rolling window or an explicit time period. The aggregated statistics are grouped by whole time period units, for example, whole hours. For span-related queries, the name of the span type is part of the URI. For example, consider the following /monitoring/span/summary/{spanType} URI, which provides the statistics of the overview character for the durations of the spans. Following are some of the important parameters provided by the

ActorRef pullSocket = ZeroMQExtension.get( getContext().system()) .newPullSocket(new SocketOption[] { new Connect("tcp://127.0.0.1:1237"), new Listener(getSelf()) }); LoggingAdapter log = Logging.getLogger( getContext().system(), this); @Override public void onReceive(Object message) throws Exception { if (message instanceof ZMQMessage) { ZMQMessage m = (ZMQMessage) message; String mesg = new String(m.payload(0)); log.info("Received Message -> {}", mesg); } } } Scala: class PullActor1 extends

Download sample

Download

About admin