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
64
votes
1 answer

Akka finite state machine instances

I am trying to leverage Akka's finite state machine framework for my use case. I am working on a system that processes a request that goes through various states. The request here is the application name that needs to be deployed along with the…
user_mda
  • 18,148
  • 27
  • 82
  • 145
62
votes
3 answers

How to create a Source that can receive elements later via a method call?

I would like to create a Source and later push elements on it, like in: val src = ... // create the Source here // and then, do something like this pushElement(x1, src) pushElement(x2, src) What is the recommended way to do this? Thanks!
ale64bit
  • 6,232
  • 3
  • 24
  • 44
62
votes
4 answers

Difference between forward and tell in akka actors

What is a difference between tell and forward, in case I will send the same message: case msg: Message => otherActor tell (msg,sender) and case msg: Message => otherActor forward msg
Michał Jurczuk
  • 3,728
  • 4
  • 32
  • 56
62
votes
2 answers

Do I need to re-use the same Akka ActorSystem or can I just create one every time I need one?

Akka 2.x requires many commands to reference an ActorSystem. So, to create an instance of an actor MyActor you might say: val system = ActorSystem() val myActor = system.actorOf(Props[MyActor]) Because of the frequent need for an ActorSystem: many…
sroebuck
  • 6,060
  • 4
  • 25
  • 18
61
votes
1 answer

How is Akka used in Play?

Play's home page says: Built on Akka, Play provides predictable and minimal resource consumption (CPU, memory, threads) for highly-scalable applications. I'd like to know exactly how and where Akka is used in Play and what are the consequences of…
OlivierBlanvillain
  • 7,701
  • 4
  • 32
  • 51
56
votes
2 answers

Difference in message-passing model of Akka and Vert.x

Am a Scala programmer and understand Akka from a developer point of view. I have not looked into Akka library's code. Have read about the two types of actors in the Akka model - thread-based and event-based - but not having run Akka at large scale I…
Bharadwaj
  • 1,361
  • 1
  • 9
  • 24
53
votes
5 answers

Different Scala Actor Implementations Overview

I'm trying to find the 'right' actor implementation. I realized there is a bunch of them and it's a bit confusing to pick one. Personally I'm especially interested in remote actors, but I guess a complete overview would be helpful to many others.…
Stefan K.
  • 7,701
  • 6
  • 52
  • 64
49
votes
2 answers

How are Java threads heavy compared to Scala / Akka actors?

I was just comparing the performance of scala actors vs java threads. I was amazed to see the difference, I observed that with my system I was able to spawn maximum ~2000 threads (live at a time) only But with the same system I was able to spawn…
SmartSolution
  • 2,320
  • 5
  • 37
  • 49
49
votes
2 answers

Scala actors - worst practices?

I feel a bit insecure about using actors in Scala. I have read documentation about how to do stuff, but I guess I would also need some DON'T rules in order to feel free to use them. I think I am afraid that I will use them in a wrong way, and I will…
teo
  • 1,393
  • 1
  • 15
  • 25
48
votes
4 answers

Why is the error Conflicting cross-version suffixes?

I'm getting this error when I try to compile a Scala project in sbt. Modules were resolved with conflicting cross-version suffixes in {file:/home/seven3n/caja/Flujo_de_caja/}flujo_de_caja: [error] com.typesafe.akka:akka-actor _2.11, _2.10 [error]…
Rodrigo Cifuentes Gómez
  • 1,304
  • 2
  • 13
  • 28
46
votes
6 answers

Akka Logging outside Actor

I have an Akka Actor that makes a call to MyObject.foo(). MyObject is not an Actor. How do I setup Logging in it? With an Actor it's simple, because I can just mixin ActorLogging. In MyObject, I don't have access to context.system. Do I create an…
Bradford
  • 4,143
  • 2
  • 34
  • 44
45
votes
4 answers

How can I have an Akka actor executed every 5 min?

I'd like to know if there are any mechanism in Akka that can have an actor executed periodically?
Evans Y.
  • 4,209
  • 6
  • 35
  • 43
45
votes
3 answers

What kind of "EventBus" to use in Spring? Built-in, Reactor, Akka?

We're going to start a new Spring 4 application in a few weeks. And we'd like to use some event-driven architecture. This year I read here and there about "Reactor" and while looking for it on the web, I stumbled upon "Akka". So for now we have 3…
Benjamin M
  • 23,599
  • 32
  • 121
  • 201
44
votes
17 answers

'Unable to load a Suite class' while running ScalaTest in IntelliJ

I'm having some issues today with running a simple TestKit test in Intellij. The tests are for Scala code (I have the Scala plug-in for Intellij) and are based on Ray Roestenburg's example. The Intellij project was created using a "Maven Module"…
MCP
  • 4,436
  • 12
  • 44
  • 53
43
votes
2 answers

How to convert Akka ByteString into String?

I'm sorry if this is a dumb question but I can honestly not figure it out without setting up some kind of ASCII code -> character mapper myself, which I don't think is the right way to do it. So currently I'm making a "chat application" with Scala…
nbokmans
  • 5,492
  • 4
  • 35
  • 59