actor

Acquisition of turn based concurrency lock for actor '{actorName}' timed out after {time}

无人久伴 提交于 2019-12-23 22:02:25
问题 I have service which creates Actors of some type by some name: var storer = this.serviceClient.Create<IStorer>(new ActorId(agencyToProcess.Name)); and then I call Actor's method. await storer.StoreStatusesAsync().ConfigureAwait(false); On this call I receive error : System.AggregateException: One or more errors occurred. ---> Microsoft.ServiceFabric.Actors.ActorConcurrencyLockTimeoutException: Acquisition of turn based concurrency lock for actor 'actorName' timed out after 00:01:13.6480000.

Scala variable binding when used with Actors

自闭症网瘾萝莉.ら 提交于 2019-12-23 10:10:39
问题 I am fairly new to Scala. I am trying to understand how/if scala does dynamic binding when a closure is passed as part of a message to an Actor. I am using Akka 1.2 with Scala 2.9. I have the following code segment (modified from http://gleichmann.wordpress.com/2010/11/15/functional-scala-closures/) var minAge = 18 val isAdult = (age: Int) => age >= minAge actor ! answer(19, isAdult) minAge = 20 actor ! answer(19, isAdult) On the actor side, it simply applies isAdult to the first parameter

Scala, Actors, what happens to unread inbox messages?

独自空忆成欢 提交于 2019-12-23 09:40:56
问题 What happens to unread inbox messages in Scala Actors ? For example two cases: 1.If forget to implement react case for special message: actor!NoReactCaseMessage 2. If messages comes too fast: (timeOfProcessingMessage > timeOfMessageComes) If first or second case happens, would it be stacked in memory? EDIT 1 Is there any mechanism to see this type of memory leak is happening? Maybe, control number of unread messages then make some garbage collect or increase actor pool. How to get number of

Akka actors unit testing with Scala

房东的猫 提交于 2019-12-23 07:40:16
问题 I'm fairly new to Scala so please be gentle. In the app I'm currently building, I'm using Akka actors and I want to write some unit tests. I came across this official documentation for writing unit tests for Akka actors but I couldn't understand exactly how it should work. In particular, val actorRef = TestActorRef(new MyActor) // hypothetical message stimulating a '42' answer val future = actorRef ? Say42 val Success(result: Int) = future.value.get result must be(42) When I try that, I get

Orleans single threaded nature not respected by ContinueWith

戏子无情 提交于 2019-12-23 02:06:08
问题 I have the following code (https://github.com/avinash0161/OrleansExperiments/tree/c0155b4b0c8c1bfe60aea8624f2cc83a52853dc7): // Client code Console.WriteLine("Client making a call"); var hashGenerator = client.GetGrain<IGrainA>(0); hashGenerator.Call_A_ToTemp(); await Task.Delay(1000); hashGenerator.Call_B_ToTemp(); // GrainA code public async Task Call_A_ToTemp() { Console.WriteLine("Making call A to a fellow grain"); IGrainB grain = this.GrainFactory.GetGrain<IGrainB>(1); grain.CallA()

Do I need to take care of producer-consumer rate-matching when using Akka 1.3's actors?

爷,独闯天下 提交于 2019-12-22 16:45:02
问题 When using Akka 1.3, do I need to worry about what happens when the actors producing messages are producing them faster than than the actors consuming them can process? Without any mechanism, in a long running process, the queue sizes would grow to consume all available memory. The doc says the default dispatcher is the ExecutorBasedEventDrivenDispatcher. This dispatcher has five queue configuration: Bounded LinkedBlockingQueue Unbounded LinkedBlockingQueue Bounded ArrayBlockingQueue

Do I need to take care of producer-consumer rate-matching when using Akka 1.3's actors?

你。 提交于 2019-12-22 16:44:30
问题 When using Akka 1.3, do I need to worry about what happens when the actors producing messages are producing them faster than than the actors consuming them can process? Without any mechanism, in a long running process, the queue sizes would grow to consume all available memory. The doc says the default dispatcher is the ExecutorBasedEventDrivenDispatcher. This dispatcher has five queue configuration: Bounded LinkedBlockingQueue Unbounded LinkedBlockingQueue Bounded ArrayBlockingQueue

Creating a TestActorRef results in NullPointerException

喜欢而已 提交于 2019-12-22 10:11:54
问题 I am trying to get a TestActorRef like that class NotifySenderTest(_system: ActorSystem) extends TestKit(_system) with ImplicitSender with WordSpecLike with Matchers with BeforeAndAfterAll with BeforeAndAfter { def this() = this(ActorSystem("NotifySenderTest")) override def afterAll { TestKit.shutdownActorSystem(system) } "A NotifySender" must { "be able to process the required messages" in { val actorRef = TestActorRef[NotifySender] //Line 92 } } the this actor class NotifySender extends

Tracing the action of consuming messages from mailbox in Erlang

守給你的承諾、 提交于 2019-12-22 06:39:41
问题 I went through the documentation of the trace/3 BIF in Erlang. However, one observation I have made is that it cannot be used for tracing the consuming of messages from the mailbox. The flag 'receive' only traces when messages are added to a process's mailbox. Is there any way one can trace events such as reading from the mailbox using the receive construct? If not, is there any reason why this isn't possible? It seems very strange that one can trace most kind of events in a program and the

Tracing the action of consuming messages from mailbox in Erlang

不问归期 提交于 2019-12-22 06:39:08
问题 I went through the documentation of the trace/3 BIF in Erlang. However, one observation I have made is that it cannot be used for tracing the consuming of messages from the mailbox. The flag 'receive' only traces when messages are added to a process's mailbox. Is there any way one can trace events such as reading from the mailbox using the receive construct? If not, is there any reason why this isn't possible? It seems very strange that one can trace most kind of events in a program and the