Home Computer Science Building Applications with Scala
Developing a Chat with Akka
In the previous chapters, we persisted data into MySQL using Slick and wrote PDF reports using Jasper reports. Now we will add more features in our app using Akka.
In this chapter, you will learn how to create Actors using the Akka framework. We will use Actors in combination with the Play framework and WebSockets in order to have a chat capability.
We will cover the following topics in this chapter:
Adding the new UI introduction to Akka
Akka (http://akka.io/) is a framework to build concurrent, distributed, and resilient message-driven applications in Scala, Java, and .NET. Building applications with Akka has several advantages, which are as follows:
• Distributed and elastic: Akka has all the mechanisms to scale your application, such as cluster, load balancing, partitioning, and sharding. Akka lets you grow or shrink your Actors on demand.
The Akka framework provides good abstractions for concurrent, asynchronous, and distributed programming, such as Actors, Streams, and Futures. There are plenty of great success cases in production, such as BBC, Amazon, eBay, Cisco, The Guardian, Blizzard, Gilt, HP, HSBC, Netflix, and so many others.
Akka is a truly reactive framework because everything, in the sense of sending and receiving messages to Actors, is lockless, non-blocking IO, and asynchronous.
|< Prev||CONTENTS||Next >|