[akka-user] Re: Modeling a simple MMO game entities as actors? Is it OK?

2015-06-19 Thread Luis Medina
Oops, forgot to post the link: https://www.parleys.com/tutorial/easy-scalability-akka (you'll need to register a free account to view the full video). On Friday, June 19, 2015 at 4:36:05 PM UTC-7, Luis Medina wrote: I just saw this really interesting presentation from Scala Days

[akka-user] Re: Modeling a simple MMO game entities as actors? Is it OK?

2015-06-19 Thread Luis Medina
I just saw this really interesting presentation from Scala Days that Martynas posted in another thread that talks about scaling with Akka. I think it will give you some ideas for how to design your app in a way that scales even if you are starting out small right now. On Thursday, June 18,

[akka-user] Re: Modeling a simple MMO game entities as actors? Is it OK?

2015-06-19 Thread Luis Medina
Personally, I wouldn't organize your actors into zones since zones aren't really a concept that would exist in your game and like you pointed out, it can make scaling a bit tricky. The approach that I would take is to use clustering along with sharding to distribute your actors across however

Re: [akka-user] Re: Starting a cluster

2015-06-17 Thread Luis Medina
the docs for a while - for some reason it just didn't click for me. Thanks! On Tue, Jun 16, 2015 at 3:25 PM, Luis Medina lu4...@gmail.com javascript: wrote: I actually found the documentation to be pretty informative. Not sure how much of it (nor how thoroughly) you read it but the goal

[akka-user] Re: Starting a cluster

2015-06-16 Thread Luis Medina
I actually found the documentation to be pretty informative. Not sure how much of it (nor how thoroughly) you read it but the goal is essentially to run the same application in each of your cluster's nodes which in essence forms the cluster. You'll need to make changes to your configuration

[akka-user] Re: [cluster sharding] broadcast to all entries for a shard

2014-11-03 Thread Luis Medina
Hey Nan, There might be a couple of things that you can do here: 1. If you know the id's of all of your entries, then it would be a matter of looping through these id's and sending each one the message you're trying to broadcast: ie. in Java 8 1. ActorRef counterRegion =

[akka-user] Re: [cluster sharding] broadcast to all entries for a shard

2014-11-03 Thread Luis Medina
, 2014 12:43:30 PM UTC-8, Nan Zhu wrote: Thank you for the reply, Luis, Another question is about is it possible to broadcast to all shards? Best, nAN On Monday, November 3, 2014 2:59:00 PM UTC-5, Luis Medina wrote: Hey Nan, There might be a couple of things that you can do here: 1

Re: [akka-user] Using stash with become

2014-08-20 Thread Luis Medina
processed, both methods have already been executed. BTW, I have seen many who have been thinking along the same lines ;-) Cheers Heiko On 19 Aug 2014, at 19:09, Luis Medina lu4...@gmail.com javascript: wrote: Hi all, I'm working on implementing retry functionality in one of my actor's

[akka-user] Using stash with become

2014-08-19 Thread Luis Medina
Hi all, I'm working on implementing retry functionality in one of my actor's that will retry writing a message to RabbitMQ if the original write fails. This looks something like this: private String retryMessage; private void processMessage(String message) { try {

[akka-user] Using Akka to access multiple databases

2014-07-30 Thread Luis Medina
Hi everyone, My company is planning to use Akka for a new feature that we're working on and we want to run our design by a few set of eyes from the Akka community just to make sure that what we're doing makes sense and also to get some feedback and see if perhaps there are other ways of doing

[akka-user] Re: question about akka mailbox

2014-06-19 Thread Luis Medina
Hello, Per the documentation (http://doc.akka.io/docs/akka/2.3.3/java/mailboxes.html) it appears that the default mailbox of an actor is unbounded in size which I take it to mean that it will store as many things as it can fit in the memory of the machine it's running on. If you try giving it

[akka-user] Re: Maximum message size

2014-06-14 Thread Luis Medina
I can only speak to your first question. The setting you're looking for is: akka.remote.netty.tcp.maximum-frame-size. I think by default it's 12b. I had to bump up mine. Not sure about your second question. -- Read the docs: http://akka.io/docs/ Check the FAQ:

[akka-user] Using clusters with min-nr-of-members

2014-06-14 Thread Luis Medina
As I understand it, the min-nr-of-members setting is used when you want your cluster nodes to move to the Up state only after a certain number of them have joined the cluster. For example if I set: min-nr-of-members = 3 then it's only until I start up 3 nodes that my cluster will move all of

[akka-user] Re: EventBus and Cluster

2014-06-14 Thread Luis Medina
Hi Chanan, As everyone else already pointed out here, the EventBus is ActorSystem specific. If you're using a cluster, Distributed Publish Subscribe offers similar functionality. -- Read the docs: http://akka.io/docs/ Check the FAQ:

[akka-user] Re: Sharding an actor processor

2014-06-12 Thread Luis Medina
Hi Michael, Thanks for the feedback. After trying your suggestion of just wrapping the payload in a Persistent object, It seems that the problem is still there. Specifically, I'm getting an ActorInitializationException when I try to start up. Are there any other special considerations that I

[akka-user] Re: Sharding an actor processor

2014-06-12 Thread Luis Medina
On an interesting note, it seems that if I send my actor processor a regular non-Persistant wrapped message and then I have the actor wrap the message in a Persistent object and send it to itself, it works! The problem then appears to be when another actor trie to send it a Persistent message.

[akka-user] Sharding an actor processor

2014-06-11 Thread Luis Medina
I'm having trouble sending messages to an ActorProcessor and I'm wondering if I'm sending it messages correctly. The actor's onReceive() method looks something like this: public class ActorProcessor extends UntypedProcessor { ... @Override public void onReceive(Object message) {

[akka-user] Re: managing intelligent agents

2014-06-10 Thread Luis Medina
Oops my mistake. So the same entryId cannot be associated with 2 different shardIds but 2 different entryIds can be associated with the same shardId. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the

Re: [akka-user] Re: managing intelligent agents

2014-06-10 Thread Luis Medina
Got it. I see now that this is what is being done in the example of the documentation page for sharding (http://doc.akka.io/docs/akka/2.3.3/contrib/cluster-sharding.html#cluster-sharding) where the entryId() method simply returns an id value while the shardId() method returns the mod of the

Re: [akka-user] Re: Rebalancing shard entries of different types

2014-06-09 Thread Luis Medina
Why don’t you normally shard actors of the same kind who will just supervise these different stream handlers? Wow, this is actually a brilliant idea and it certainly reduced the complexity of my original solution. I remember I had tried something similar where instead of passing in a

Re: [akka-user] ShardAllocationStrategy rebanceThreshold issues.

2014-06-09 Thread Luis Medina
How many entries does the currentShardAllocations Map (actorRefIndexedSeqMap in your code) have when allocateShard is invoked for shard 1 and shard 2? I'll have to check, not sure. i.e. you have only one entry in currentShardAllocations. Even if there was one entry in

Re: [akka-user] ShardAllocationStrategy rebanceThreshold issues.

2014-06-09 Thread Luis Medina
The allocation strategy is used by the coordinator, a cluster singleton. The currentShardAllocations will contain one entry for each registered region actor (one per node). I think your currentShardAllocations only contains one entry, i.e. both nodes have not registered when you send the

[akka-user] Re: managing intelligent agents

2014-06-09 Thread Luis Medina
I don't think you state this anywhere but based on the fact that you use consistent hashing, are your bots running in a cluster-aware, consistent hashing router? One other solution that I thought of was to shard your bots using their id's for the entryId values which effectively removes the

[akka-user] Re: ShardAllocationStrategy rebanceThreshold issues.

2014-06-09 Thread Luis Medina
Ah, excellent! Thank you Patrik. -- 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

[akka-user] ShardAllocationStrategy rebanceThreshold issues.

2014-06-08 Thread Luis Medina
I'm trying to make a ShardAllocationStrategy that allocates new shards to ShardRegion's such that the difference between the most and the least number of allocated shards is 1 and so that it doesn't do any re-balancing. This is what I came up with: public class

Re: [akka-user] Re: Rebalancing shard entries of different types

2014-06-02 Thread Luis Medina
Thanks! -- 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

Re: [akka-user] Re: Rebalancing shard entries of different types

2014-06-02 Thread Luis Medina
Given that fact, I went ahead and implemented a ShardAllocationStrategy that takes into account different entry types for figuring out what nodes to create new entries in. First, I just want to describe the use-case that led to me implementing this. I'm working on a pipeline that will ingest

[akka-user] Re: Persistent Queue using Akka (without Durable Mailboxes)

2014-06-02 Thread Luis Medina
Hi Martin, I'm a little confused by your explanation. First you mention that ...the affected database records are entity-specific... and no indexes are touched. Hence, executing many Bookings in parallel causes no considerable performance issues. But then you say that All of the bookings are

[akka-user] Re: Cluster, sharding and roles

2014-06-02 Thread Luis Medina
Hi Eduardo, I recently implemented my own version of a ShardAllocationStrategy and made use of the ShardRegion's addresses. I made a post about it here: https://groups.google.com/forum/#!topic/akka-user/7p_fkEFJqHw It doesn't solve your exact problem but maybe it will give you some ideas.

[akka-user] Rebalancing shard entries of different types

2014-05-30 Thread Luis Medina
When a rebalance kicks in from using sharding, does the rebalancing process consider only entries of a particular type or does it consider all entry types in the cluster? For example, if I were to shard different entries (different by name that is) like so:

[akka-user] Re: Cluster Sharding Questions

2014-05-23 Thread Luis Medina
Hi Martynas, The number of distinct entryId values determines the number of workers you are going to have. And the number of ditinct shardId values determines the number of shards (groups of workers which are managed independently) that you are going to have. This makes sense. So ideally,

[akka-user] Re: Cluster Sharding Questions

2014-05-23 Thread Luis Medina
When scraping the router and using only sharding you will have to make sure that your MessageExtractor is implemented in a way that achieves desired load balancing. Good point. Since the routees (and now the single workers) were going to be pulling data instead of getting data pushed

[akka-user] Re: Cluster Sharding Questions

2014-05-22 Thread Luis Medina
Hi Patrik, You are absolutely correct. I don't know what was going through my mind when I said that there are multiple instances of an entry running. Haven't been getting much sleep lately :/ As for my use-case, I'm trying to build a pipeline that takes in a data stream and processes it in

Re: [akka-user] Re: Some questions about clustering

2014-05-21 Thread Luis Medina
Thank you Martynas. 6. Is it possible to use a ClusterClient together with distributed PubSub to subscribe to a particular topic from an actor that is outside of the cluster? This is not currently supported. As a side node, it could be used the other way around. In fact

[akka-user] Re: Some questions about clustering

2014-05-19 Thread Luis Medina
Thank you for the help Martynas. Got a couple of follow-up questions: Cluster singleton is always created on the oldest node in the cluster with a specified role if any. This implies that there could a resource bottleneck on the oldest node. 1. Is there any way to define a different

[akka-user] Re: Some questions about clustering

2014-05-19 Thread Luis Medina
Thank you for the help Martynas. Got a couple of follow-up questions: Cluster singleton is always created on the oldest node in the cluster with a specified role if any. This implies that there could a resource bottleneck on the oldest node. 1. Is there any way to define a different

Re: [akka-user] Remote actors are not get deployed upon a new node joins the cluster.

2014-05-18 Thread Luis Medina
What is the best way to get notifications about newly created actors under certain route? This would be somewhat complicated if you're using a group router and I think impossible (someone correct me if I'm wrong) if you're using a pool router. Have you considered having the routees be the

[akka-user] Some questions about clustering

2014-05-17 Thread Luis Medina
Hi all. I have a new set of questions this time relating to clustering. 1. How many/what percentage of the nodes in a cluster should ideally be made seed nodes? Would there be a performance impact from making all of the nodes in the cluster seeds? 2. Are there any implications in having too

[akka-user] Some questions about clustering

2014-05-17 Thread Luis Medina
Hi all. I have a new set of questions this time relating to clustering. 1. How many/what percentage of the nodes in a cluster should ideally be made seed nodes? Would there be a performance impact from making all of the nodes in the cluster seeds? 2. Are there any implications in having too

[akka-user] Re: Akka Cluster and Live Deployments

2014-05-16 Thread Luis Medina
Hi Andreas, Thank you for the information. I'll take a look at that. Sounds just like what I'm thinking about. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives:

Re: [akka-user] how to learn AKKA?

2014-05-15 Thread Luis Medina
You can use Akka with Java so you don't necessarily have to learn Scala. The best way to learn how to use it would probably be to start with reading the documentation: http://doc.akka.io/docs/akka/2.3.2/java.html. Each section/concept usually has a Typesafe sample project that you can run in

Re: [akka-user] Group Broadcast Router vs Event Bus For Splitting Streams

2014-05-14 Thread Luis Medina
Oh, I didn't realize the EventBus was local to the actor system, must have missed it in the documentation. Thank you for pointing that out and thank you for the suggestion. Can't wait for Akka-streams to be released! -- Read the docs: http://akka.io/docs/ Check the FAQ:

[akka-user] Akka Cluster and Live Deployments

2014-05-13 Thread Luis Medina
Are there any use-cases or examples out there of how Akka can facilitate live deployments so that your whole system doesn't have to come down? I don't mean using Akka specifically for deployments but rather, how a deployment would be easier for projects written in Akka. One example I was

[akka-user] Re: Pulling Pattern vs Durable Mailboxes

2014-05-10 Thread Luis Medina
Hi Ryan, Thank you so much for the detailed explanation. It really helped clarify some things. Just got a couple more questions: 1. This is more of a clarification about facades. So as you mentioned above, facades subscribe themselves to cluster event notifications and when they receive (I'm

[akka-user] Questions about Persistence

2014-05-10 Thread Luis Medina
So I finished reading the section on the Akka documentation about Persistence and I also played around with the akka-sample-persistence Typesafe Activator project and had several questions about it. Please bear with me if some of the questions seem dumb; I'm just trying to make sure I

[akka-user] Re: Pulling Pattern vs Durable Mailboxes

2014-05-10 Thread Luis Medina
Thank you again Ryan for answering my questions and thank you to everyone else who joined in the conversation. I think the discussion here has made me re-consider using the pulling pattern since it fits my use case pretty well. And yes, I agree Roland, this community is awesome! -- Read