Hi Chanan,

How about measuring such a scenario?

Cheers,
V
On Apr 9, 2014 9:11 PM, "Chanan Braunstein" <[email protected]>
wrote:

> Hi Heiko,
>
> Right, it would be, and that is the way I have it now, I don't think I
> should maintain that last myself (maybe I am wrong). So my first attempt to
> remove that list from my actor was with the EventBus but that is limited to
> one JVM.
>
> So my questions are:
>
> 1. Should I just stop worrying about maintaining that HashMap of
> listeners? Will it scale well when I have a million listeners?
> 2. Use some other way to solve this problem? (Maybe EventBus with actors
> that transfer the calls across the JVM; or maybe some other way with
> ActorSelection that I cannot think of right now)
>
> Thanks,
> Chanan
>
> On Wednesday, April 9, 2014 9:38:14 AM UTC-4, Heiko Seeberger wrote:
>>
>> No, an actor has exactly one unique actor path.
>>
>> I'm not sure whether I fully understand, but maybe a channel could be an
>> actor which allows other actors (users) to register as listeners?
>>
>> Heiko
>>
>>
>> On Wed, Apr 9, 2014 at 12:24 PM, Chanan Braunstein <
>> [email protected]> wrote:
>>
>>> My use case:
>>>
>>> I have an Actor per websocket called a User.
>>> I have groups of user that need to be notified together. A group is
>>> called a Channel.
>>>
>>> My current implementation is a Channel contains a hashmap of the user id
>>> and the ActorRef to notify. My concern about this is that it won't work
>>> (without additional changes)  on a web farm and our site is fairly high
>>> traffic, the hashmap might not scale when there are millions of users on
>>> the site at once.
>>>
>>> Attempt to fix 1:
>>>
>>> I started going down the path of the event bus (with a lookup classifier
>>> by the user id)  till I asked the questions a few minutes ago about the
>>> event bus and the cluster. Since events stay in the local jvm that won't
>>> work (without additional work). Someone suggested an Actor to transmit the
>>> events to the other cluster nodes and use the EventBus inside each node. I
>>> am not 100% sure how to do that correctly.
>>>
>>> Question (idea 2).
>>>
>>> Sending a message to each user without the ActorRef can be done via
>>> ActorSelection. My question is, (Although I am guessing the answer is no,
>>> but it doesn't hurt to ask) is: Can I have the ActorRef be in two addresses
>>> at once such that:
>>>
>>> /users/guid -> Actor
>>> /channels/mychannel/guid -> same actor
>>>
>>> If not, and since I cannot duplicate the Actor itself (since it holds a
>>> WebSocket) - I can make a special proxy actor that will know the address of
>>> the real actor and forward message to it.
>>>
>>> Is this a good plan? Any other suggestions that will work across a
>>> cluster in a scalable manor?
>>>
>>> Chanan
>>>
>>> --
>>> >>>>>>>>>> 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 [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> Heiko Seeberger
>> Twitter: @hseeberger
>> Blog: blog.heikoseeberger.name
>>
>  --
> >>>>>>>>>> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to