Questions tagged [actor]

Programming model distinguished by ubiquitous asynchronous communication.

Filter by
Sorted by
Tagged with
215 votes
5 answers
79k views

How does LMAX's disruptor pattern work?

I am trying to understand the disruptor pattern. I have watched the InfoQ video and tried to read their paper. I understand there is a ring buffer involved, that it is initialized as an extremely ...
Shahbaz's user avatar
  • 10.5k
115 votes
4 answers
40k views

When to use actors instead of messaging solutions such as WebSphere MQ or Tibco Rendezvous?

I've already read the question and answers to What design decisions would favour Scala's Actors instead of JMS?. Usually, we use messaging solutions which have existed for years already: either a JMS ...
Kai Wähner's user avatar
  • 1,201
110 votes
5 answers
18k views

Scala actors: receive vs react

Let me first say that I have quite a lot of Java experience, but have only recently become interested in functional languages. Recently I've started looking at Scala, which seems like a very nice ...
jqno's user avatar
  • 15.4k
101 votes
3 answers
18k views

How is Node.js evented system different than the actor pattern of Akka?

I've worked with Node.js for a little while and consider myself pretty good with Java. But I just discovered Akka and was immediately interested in its actor pattern (from what I understand). Now, ...
cbmeeks's user avatar
  • 11.3k
92 votes
2 answers
19k views

How does Actors work compared to threads?

Is there any good and short explanation of how Actors works compared to threads? Can't a thread be seen as an actor and send messages to other threads? I see some difference, but it's not that clear ...
Jonas's user avatar
  • 125k
83 votes
1 answer
13k views

What design decisions would favour Scala's Actors instead of JMS?

What are the differences using Scala Actors instead of JMS? For example from a performance and scalability perspective, what does the Scala Actor model add compared to JMS? In which cases does it ...
Kristian's user avatar
  • 6,513
82 votes
2 answers
30k views

Akka in Scala, exclamation mark and question mark

What is the difference between exclamation mark (!) and question mark (?) when sending messages to Actors? myActor ! Hello(value1) myActor ? Hello(value1)
ticofab's user avatar
  • 7,655
79 votes
6 answers
14k views

The actor model: Why is Erlang/OTP special? Could you use another language?

I've been looking into learning Erlang/OTP, and as a result, have been reading (okay, skimming) about the actor model. From what I understand, the actor model is simply a set of functions (run within ...
Jonathan Winks's user avatar
78 votes
13 answers
42k views

Any good implementation of Actors for C#? [closed]

Is there any good implementation of actors concurrency model for .net/c#? I have to optimize a c# routine and i think that actors model fits perfectly as a solution for my problem. Unfortunately i ...
Borba's user avatar
  • 791
78 votes
3 answers
16k views

What's the difference of the Akka's Actor with Scala's Actor model

I found there is also an Akka actor model, so I am wondering what's the difference between the Akka's Actor and Scala's Actor model?
Evans Y.'s user avatar
  • 4,369
75 votes
3 answers
7k views

How are the multiple Actors implementation in Scala different?

With the release of Scala 2.9.0, the Typesafe Stack was also announced, which combines the Scala language with the Akka framework. Now, though Scala has actors in its standard library, Akka uses its ...
Daniel C. Sobral's user avatar
73 votes
3 answers
9k views

Akka Actor not terminating if an exception is thrown

I am currently trying to get started with Akka and I am facing a weird problem. I've got the following code for my Actor: class AkkaWorkerFT extends Actor { def receive = { case Work(n, c) if n ...
fresskoma's user avatar
  • 25.6k
70 votes
3 answers
15k views

Design patterns/best practice for building Actor-based system

I am struggling to find any decent links to design patterns, best practice or good, basic architectural principles that should be used in building Actor-based apps. Those few that I know of are: Blog ...
63 votes
2 answers
8k views

Is F# really faster than Erlang at spawning and killing processes?

Updated: This question contains an error which makes the benchmark meaningless. I will attempt a better benchmark comparing F# and Erlang's basic concurrency functionality and inquire about the ...
Tristan's user avatar
  • 6,846
63 votes
1 answer
17k views

What does a single apostrophe mean in Scala? [duplicate]

In this slide show on ScalaActors.pdf what does the single quote indicate when the message is sent to the pong actor? class Ping(count: int, pong: Pong) extends Actor { def act() { pong ! 'Ping //...
JeffV's user avatar
  • 53.8k
62 votes
4 answers
19k views

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's user avatar
53 votes
2 answers
21k views

Actor pattern - what it exactly constitutes

I am doing some objective-C / iOS development and have heard several references to the Actor pattern. In Big Nerd Ranch book, it says: An actor object is used when you have a long running task and ...
timpone's user avatar
  • 19.6k
52 votes
5 answers
10k views

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 ...
Stefan K.'s user avatar
  • 7,771
49 votes
2 answers
6k views

Scala actors - worst practices? [closed]

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 ...
teo's user avatar
  • 1,403
49 votes
4 answers
13k views

When should one use the Actor model?

When should the Actor Model be used? It certainly doesn't guarantee deadlock-free environment. Actor A can wait for a message from B while B waits for A. Also, if an actor has to make sure its ...
tilish's user avatar
  • 1,103
46 votes
6 answers
26k views

Which Actor model library/framework for python and Erlang-like? [closed]

I am looking for an easy-to-learn Actor library or framework for Python 2.x. I have tried Candygram and Twisted but I did not like them. I'd like something that will be easy to extend to suppero ...
39 votes
3 answers
38k views

Swift, actor: Actor-isolated property 'scanning' can not be mutated from a non-isolated context

I have an actor: actor StatesActor { var job1sActive:Bool = false ... } I have an object that uses that actor: class MyObj { let myStates = StatesActor() func job1() async ...
zumzum's user avatar
  • 19.1k
39 votes
5 answers
5k views

How to restrict actor messages to specific types?

In Akka, is there a way to restrict messages to actors to be of a specific static type other than using the "Typed Actor" APIs that use an RPC style programming model? Can I use the message passing ...
mkneissl's user avatar
  • 4,902
36 votes
1 answer
536 views

Scala actors & Ambient Reference

In Phillip Haller's PhD thesis he mentioned in section (5.1 Future Work) that one of the interesting areas of research would be to extend the framework with ambient references and he cited Van Cutsen'...
Nabegh's user avatar
  • 3,279
35 votes
2 answers
20k views

libgdx difference between sprite and actor

I'm just going through the javadoc and various tutorials on libgdx and I'm at the stage of trying to figure out differences between various concepts that seem similar to me or provide similar ...
Neil Walker's user avatar
  • 6,558
35 votes
3 answers
34k views

Scala pattern matching confusion with Option[Any]

I have the following Scala code. import scala.actors.Actor object Alice extends Actor { this.start def act{ loop{ react { case "Hello" => sender ! "Hi" case i:Int =&...
Jus12's user avatar
  • 18k
30 votes
3 answers
16k views

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 ...
Aysu Dogma's user avatar
29 votes
2 answers
11k views

Scala final vs val for concurrency visibility

In Java, when using an object across multiple threads (and in general), it is good practice to make fields final. For example, public class ShareMe { private final MyObject obj; public ...
Jeff Storey's user avatar
  • 56.8k
29 votes
1 answer
6k views

How Clojure's agents compare to Scala's actors?

I wrote a simulation of the Ring network topology in Scala (source here) (Scala 2.8 RC7) and Clojure (source here) (Clojure 1.1) for a comparison of Actors and Agents. While the Scala version shows ...
Abhinav Sarkar's user avatar
28 votes
6 answers
33k views

What are the language and product alternatives to Akka?

Right now I'm looking at Play Framework and like it a lot. One of the parts heavy advertised amongst the features offered in Play is Akka. In order to better understand Akka and how to use it ...
Mike Z's user avatar
  • 1,477
28 votes
3 answers
8k views

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 ...
laurencer's user avatar
  • 1,680
28 votes
4 answers
6k views

Can Scala actors process multiple messages simultaneously?

The reply to a recent question of mine indicated that an actor processed its messages one at a time. Is this true? I see nothing that explicitly says that (in Programming in Scala), which contains the ...
oxbow_lakes's user avatar
28 votes
3 answers
5k views

Akka TypedActor vs. writing my own static interface to an Actor class

I've been using Akka and Scala for about a month and I'm somewhat bothered by replacing explicit interfaces with messages. Consider the following simple Akka Actor: case class DoMyHomework() class ...
Pino's user avatar
  • 281
27 votes
6 answers
17k views

Differences between AMQP and ZeroMQ

Recently started looking into these AMQP (RabbitMQ, ActiveMQ) and ZeroMQ technologies, being interested in distributed systems/computation. Been Googling and StackOverflow'ing around, couldn't find a ...
adelbertc's user avatar
  • 7,280
27 votes
2 answers
5k views

Is passing around ActorRef to other Actors good or bad ?

I'm trying to figure out if my usage of passing Akka ActorRef around to other actors is not an anti-pattern. I've a few actors in my system. Some are long lived (restClientRouter,publisher) and some ...
Soumya Simanta's user avatar
26 votes
4 answers
12k views

What is the difference between Typed and UnTyped Actors in Akka? When to use what?

I have tried to read the Akka documentation to find out the exact difference between Typed and Untyped actors. When to use what? I am not sure what I'm missing. Can somebody point me to something ...
Kamesh Rao Yeduvakula's user avatar
25 votes
1 answer
16k views

When to use actors in libgdx? What are cons and pros?

I'm writing simple solar system simulator. This is my first libgdx project. I'm using a Stage and Actors for the main menu and is pretty handy especially touch events handling. But ... looking at the ...
Lord_JABA's user avatar
  • 2,595
24 votes
3 answers
37k views

Actions of Actors in libgdx

I have made my Actor, but I am unclear on how to take advantage of the action and act methods. Outside of the basic Javadoc, I have not found a good tutorials on these methods. Can anyone provide an ...
Rudy_TM's user avatar
  • 1,420
24 votes
4 answers
21k views

How to rename actors in draw.io

I am using draw.io online tool for drawing UML diagrams. When I am dragging an Actor from left panel to the canvas, there I found no options to rename the actor. For example I want to rename the ...
Sazzad Hissain Khan's user avatar
23 votes
2 answers
11k views

AKKA Actor and DataBase Operation

I'm trying to figure out how to best handle database operations while using an actor system. indeed database operations are blocking while we try not to block in AKKA. I red in the main doc that one ...
MaatDeamon's user avatar
  • 9,688
22 votes
2 answers
8k views

TPL Dataflow, how to forward items to only one specific target block among many linked target blocks?

I am looking for a TPL data flow block solution which can hold more than a single item, which can link to multiple target blocks, but which has the ability to forward an item to only a specific target ...
Matt's user avatar
  • 7,114
22 votes
1 answer
6k views

How do I create a TestActorRef in Scala for an Actor with constructor params?

The Akka Testing docs give the following way to create a TestActorRef: import akka.testkit.TestActorRef val actorRef = TestActorRef[MyActor] How do I extend this for testing an existing actor that ...
David's user avatar
  • 231
22 votes
3 answers
6k views

Design patterns for Agent / Actor based concurrent design [closed]

Recently i have been getting into alternative languages that support an actor/agent/shared nothing architecture - ie. scala, clojure etc (clojure also supports shared state). So far most of the ...
nso1's user avatar
  • 605
22 votes
2 answers
4k views

Actor-based webservice - How to do it properly?

In the past few months, me and my colleagues have successfully built a server-side system for dispatching push notifications to iPhone devices. Basically, a user registers for these notifications via ...
cthulhu's user avatar
  • 3,151
21 votes
5 answers
27k views

How can i check if an Akka actor exists (akka 2.2)?

I have a java object which is not an actor which selects actors from an actor system with actorSelection(Path)). It is possible, that the selected actor does not exist in the system. In the Java Api ...
schrums's user avatar
  • 213
21 votes
6 answers
10k views

Azure service fabric actor dependency injection

Is there any way to inject dependencies in to the Azure Service Fabric Actor's constructor?
yapepyaka's user avatar
  • 213
21 votes
2 answers
6k views

How do I best share behavior among Akka actors?

I have two Akka actors that respond to some messages in the same way, but others in a different way. They both respond to the same set of messages. Wondering how to design my two actors with their ...
sdanzig's user avatar
  • 4,600
21 votes
5 answers
3k views

Transferring typical 3-tier architecture to actors

This question bothers me for some time now (I hope I'm not the only one). I want to take a typical 3-tier Java EE app and see how it possibly can look like implemented with actors. I would like to ...
tenshi's user avatar
  • 26.5k
21 votes
1 answer
5k views

why is scala actors deprecated in 2.10?

I was just comparing different scala actor implementations and now I'm wondering what could have been the motivation to deprecate the existing scala actor implementation in 2.10 and replace the ...
bluenote10's user avatar
19 votes
5 answers
6k views

Wait on asynchronous Future call before processing next message in Akka

When receiving events, Akka Actors will process one message at a time, blocking until a request has been completed before moving onto the next message. This works well for synchronous/blocking tasks, ...
James Davies's user avatar
  • 9,710

1
2 3 4 5
42