Questions tagged [akka]

Akka is an open-source toolkit and runtime simplifying the construction of concurrent and distributed applications on the JVM. It implements the actor model known from Erlang.

From its website:

We believe that writing correct concurrent, fault-tolerant and scalable applications is too hard. Most of the time it's because we are using the wrong tools and the wrong level of abstraction. Akka is here to change that. Using the Actor Model and Software Transactional Memory, we raise the abstraction level and provide a better platform to build correct concurrent and scalable applications. For fault-tolerance, we adopt the "Let it crash" / "Embrace failure" model, which has been used with great success in the telecom industry to build applications that self-heal, and systems that never stop. Actors also provide the abstraction for transparent distribution and the basis for truly scalable and fault-tolerant applications. Akka is Open Source and available under the Apache 2 License.

Recommended reference sources

Documentation

What does AKKA mean?

It is the name of a beautiful Swedish mountain up in the northern part of Sweden called Laponia. The mountain is also sometimes called ‘The Queen of Laponia’.

Akka is also the name of a goddess in the Sámi (the native Swedish population) mythology. She is the goddess that stands for all the beauty and good in the world. The mountain can be seen as the symbol of this goddess.

Also, the name AKKA is a palindrome of letters A and K as in Actor Kernel.

Akka is also:

  • the name of the goose that Nils travelled across Sweden on in The Wonderful Adventures of Nils by the Swedish writer Selma Lagerlöf.
  • the Finnish word for ‘nasty elderly woman’ and the word for ‘elder sister’ in the Indian languages Tamil, Telugu, Kannada and Marathi.
  • a font
  • a town in Morocco
  • a near-earth asteroid
8162 questions
33
votes
1 answer

What are the default Akka dispatcher configuration values?

In the Akka documentation it states that if a dispatcher is not configured a default dispatcher will be used. What are the properties of the default dispatcher i.e parallelism-min, parallelism-factor, parallelism-max etc. ?
Tsume
  • 907
  • 2
  • 11
  • 21
32
votes
5 answers

How to create a scala.collection.immutable.Seq from a Java List in Java?

I'm trying to get Akka going in my Java project, and I'm hung up on a small issue with the Seq type(s) from Scala. I'm able to convert my Java List of ActorRef into a scala.collection.Seq, but the Akka API I'm trying to use requires a…
spieden
  • 1,239
  • 1
  • 10
  • 23
32
votes
4 answers

How to combine Futures of different types into a single Future without using zip()

I want to create a Future of type Future[(Class1,Class2,Class3)] from below code. However the only way I have found to do this is by using zip(). I find the solution ugly and properly not optimal. Can anybody enlightened me. val v = for ( a…
Peter Lerche
  • 469
  • 4
  • 6
31
votes
3 answers

no configuration setting found for key akka

I am using scala, spray and akka for one of my projects. In Intellij, it is working fine. When I build the project and tried to run it in command line, I get the following error. Caused by: com.typesafe.config.ConfigException$Missing: No…
Rahul Dev
  • 387
  • 1
  • 4
  • 12
31
votes
8 answers

Threads configuration based on no. of CPU-cores

Scenario : I have a sample application and I have 3 different system configuration - - 2 core processor, 2 GB RAM, 60 GB HHD, - 4 core processor, 4 GB RAM, 80 GB HHD, - 8 core processor, 8 GB RAM, 120 GB HHD In order to effectively exploit the H/W…
Santosh
  • 782
  • 4
  • 15
  • 38
30
votes
7 answers

No configuration setting found for key 'akka.version'

I am learning akka-remoting and this is how my project looks The project structure looks like …
daydreamer
  • 87,243
  • 191
  • 450
  • 722
30
votes
3 answers

Accessing the underlying ActorRef of an akka stream Source created by Source.actorRef

I'm trying to use the Source.actorRef method to create an akka.stream.scaladsl.Source object. Something of the form import akka.stream.OverflowStrategy.fail import akka.stream.scaladsl.Source case class Weather(zip : String, temp : Double, raining…
Ramón J Romero y Vigil
  • 17,373
  • 7
  • 77
  • 125
30
votes
2 answers

Difference between Clustering and Remoting in Akka

I have developed my application with Akka on a single JVM. Now I want to distribute the workload across many machines. I've started to read the documentation and got confused. There are two ways of making Akka app to be distributed by clustering…
almendar
  • 1,823
  • 13
  • 23
30
votes
3 answers

Blocking calls in Akka Actors

As a newbie, I am trying to understand how actors work. And, from the documentation, I think I understand that actors are objects which gets executed in sync mode and also that actor execution can contain blocking/sync method calls, e.g. db…
Aysu Dogma
  • 301
  • 1
  • 3
  • 3
30
votes
7 answers

How to convert Map[A,Future[B]] to Future[Map[A,B]]?

I've been working with the Scala Akka library and have come across a bit of a problem. As the title says, I need to convert Map[A, Future[B]] to Future[Map[A,B]]. I know that one can use Future.sequence for Iterables like Lists, but that doesn't…
Chris Grimm
  • 771
  • 6
  • 15
29
votes
6 answers

How to implement a REST Web Service using Akka?

I intend to implement a pure Akka powered REST based Web API. I am not sure about using spray. I would consider using Scalatra if it is any good. Basically I am interested in using the concurrency benefits of Scala Actor model. I don't want the…
Kamesh Rao Yeduvakula
  • 1,215
  • 2
  • 15
  • 27
29
votes
3 answers

Testing Actors in Akka

When i run base example for testing actors: class MySpec(_system: ActorSystem) extends TestKit(_system) with ImplicitSender with WordSpec with MustMatchers with BeforeAndAfterAll { I got error: class WordSpec needs to be a trait to be mixed…
lito
  • 989
  • 8
  • 21
28
votes
3 answers

How does I/O work in Akka?

How does the actor model (in Akka) work when you need to perform I/O (ie. a database operation)? It is my understanding that a blocking operation will throw an exception (and essentially ruin all concurrency due to the evented nature of Netty, which…
laurencer
  • 1,680
  • 1
  • 19
  • 29
28
votes
3 answers

Is it possible to use the Akka scheduler inside an actor?

I want to have the possibility to put actors to sleep for a while. The actors should decide themselves how long they are going to sleep. As Thread.sleep() is not a recommended way of doing this I thought of using the scheduler in akka. I therefore…
Felix Reckers
  • 1,282
  • 1
  • 14
  • 15
28
votes
4 answers

What is the cost of creating actors in Akka?

Consider a scenario in which I am implementing a system that processes incoming tasks using Akka. I have a primary actor that receives tasks and dispatches them to some worker actors that process the tasks. My first instinct is to implement this by…
Marius Danila
  • 10,311
  • 2
  • 34
  • 37