I think resizer is only for local router. Also, I don't understand why
adding more actors should improve performance if the bottleneck is outside
of these actors. Have you tried by just using the local replicator from
each node without any routers. If not, please explain why that is not a
good fit for your application.

/Patrik
ons 7 juni 2017 kl. 17:20 skrev Mainak Ghosh <famousmai...@gmail.com>:

> Hello Patrik and Johan,
>
> Thanks for your reply. The goal of my work is to test the performance of
> resizer block in a cluster aware situation where the routees are
> replicators who are trying to reconcile state among themselves based on
> application's consistency requirement. Can you please shed some light on
> whether I can do this in Akka?
>
> Here is what I have done so far. Resizers do not work with group routers.
> So I am using pool routers for this. I am using StatsSampleSingleMasterSpec
> as an example of pool based cluster aware router. I have hooked up the
> ReplicatedCache actor as a routee. Now I wanted to add the resizer block
> and it threw me an error that resizer block cannot be used along side
> cluster block. Can I do it programmatically or is this a limitation?
>
> Mainak
>
> On Wed, Jun 7, 2017 at 6:40 AM, Patrik Nordwall <patrik.nordw...@gmail.com
> > wrote:
>
>> Note that the intention is to use the local `Replicator` so there is not
>> much point in delegating the message with a router to remote node, unless
>> you use nodes with different roles, such as "frontend" and "backend" and
>> only run distributed data on the "backend" nodes and want to send the
>> messages from the "frontend" to the "backend" with the routers. That is
>> probably what you are trying to do and then you must have serialization for
>> that message.
>>
>> /Patrik
>>
>> On Wed, Jun 7, 2017 at 1:33 PM, Akka Team <akka.offic...@gmail.com>
>> wrote:
>>
>>> The error message says that you have not configured serialization for
>>> the message sample.distributeddata.ReplicatedCache.PutInCache
>>> which something tries to send between nodes.
>>>
>>> --
>>> Johan
>>> Akka Team
>>>
>>> On Tue, May 30, 2017 at 10:37 PM, Mainak Ghosh <famousmai...@gmail.com>
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> I am recently playing around with cluster aware routers and distributed
>>>> data and I have a few questions. I extended the multi jvm test code
>>>> ReplicatedCacheSpec to create a cluster aware router which creates a pool
>>>> of ReplicatedCache worker routees. Here is the code:
>>>> https://gist.github.com/mghosh4/55f96a7402960923c528ea69a103c5af
>>>>
>>>> When I try running this code: I get the following exception:
>>>>
>>>> Failed to serialize remote message [class
>>>> akka.actor.ActorSelectionMessage] using serializer [class
>>>> akka.remote.serialization.MessageContainerSerializer]. Transient
>>>> association error (association remains live)
>>>> [JVM-1]         at
>>>> akka.remote.MessageSerializer$.serialize(MessageSerializer.scala:62)
>>>> [JVM-1]         at
>>>> akka.remote.EndpointWriter.$anonfun$serializeMessage$1(Endpoint.scala:895)
>>>> [JVM-1]         at
>>>> scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
>>>> [JVM-1]         at
>>>> akka.remote.EndpointWriter.serializeMessage(Endpoint.scala:895)
>>>> [JVM-1]         at
>>>> akka.remote.EndpointWriter.writeSend(Endpoint.scala:786)
>>>> [JVM-1]         at
>>>> akka.remote.EndpointWriter$$anonfun$4.applyOrElse(Endpoint.scala:761)
>>>> [JVM-1]         at akka.actor.Actor.aroundReceive(Actor.scala:513)
>>>> [JVM-1]         at akka.actor.Actor.aroundReceive$(Actor.scala:511)
>>>> [JVM-1]         at
>>>> akka.remote.EndpointActor.aroundReceive(Endpoint.scala:452)
>>>> [JVM-1]         at
>>>> akka.actor.ActorCell.receiveMessage(ActorCell.scala:519)
>>>> [JVM-1]         at akka.actor.ActorCell.invoke(ActorCell.scala:488)
>>>> [JVM-1]         at
>>>> akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
>>>> [JVM-1]         at akka.dispatch.Mailbox.run(Mailbox.scala:224)
>>>> [JVM-1]         at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
>>>> [JVM-1]         at
>>>> akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
>>>> [JVM-1]         at
>>>> akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
>>>> [JVM-1]         at
>>>> akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
>>>> [JVM-1]         at
>>>> akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
>>>> [JVM-1] Caused by: java.io.NotSerializableException: No configured
>>>> serialization-bindings for class
>>>> [sample.distributeddata.ReplicatedCache$PutInCache]
>>>> [JVM-1]         at
>>>> akka.serialization.Serialization.serializerFor(Serialization.scala:235)
>>>> [JVM-1]         at
>>>> akka.serialization.Serialization.findSerializerFor(Serialization.scala:211)
>>>> [JVM-1]         at
>>>> akka.remote.serialization.MessageContainerSerializer.serializeSelection(MessageContainerSerializer.scala:35)
>>>>
>>>> When I change line 83 in the gist from
>>>>
>>>> context.actorOf(FromConfig.props(ReplicatedCache.props()), name = "
>>>> replicatedCache")
>>>>
>>>> to
>>>>
>>>> context.actorOf(ReplicatedCache.props), name = "replicatedCache")
>>>>
>>>> this error goes away. Is there something that I do not understand?
>>>>
>>>> Finally, I tried adding a resizer block in the configuration. I saw an
>>>> exception saying something like resizer and cluster block cannot work
>>>> together. Is that a current limitation?
>>>>
>>>> Thanks,
>>>> Mainak
>>>>
>>>> --
>>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>>> >>>>>>>>>> Check the FAQ:
>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>> >>>>>>>>>> Search the archives:
>>>> https://groups.google.com/group/akka-user
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Akka User List" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to akka-user+unsubscr...@googlegroups.com.
>>>> To post to this group, send email to akka-user@googlegroups.com.
>>>> Visit this group at https://groups.google.com/group/akka-user.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>> >>>>>>>>>> Check the FAQ:
>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>> >>>>>>>>>> Search the archives:
>>> https://groups.google.com/group/akka-user
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to akka-user+unsubscr...@googlegroups.com.
>>> To post to this group, send email to akka-user@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> Patrik Nordwall
>> Akka Tech Lead
>> Lightbend <http://www.lightbend.com/> -  Reactive apps on the JVM
>> Twitter: @patriknw
>>
>> --
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ:
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
>> ---
>>
> You received this message because you are subscribed to a topic in the
>> Google Groups "Akka User List" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/akka-user/6QE7iFL3IHA/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> akka-user+unsubscr...@googlegroups.com.
>>
>
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Mainak Ghosh
>
>
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to