Re: [akka-user] Akka Cluster Sharding in Chat room app

2018-02-09 Thread Vladyslav Petrov
Thanks for the quick response. I will try =)


пятница, 9 февраля 2018 г., 16:31:42 UTC+2 пользователь Konrad Malawski 
написал:
>
> No. 
> I mean that the sharded actor would extend PersistentActor, which gives 
> you that recovery
>
> -- 
> Cheers,
> Konrad 'ktoso ' Malawski
> Akka  @ Lightbend 
>
> On February 9, 2018 at 14:21:06, Konrad “ktoso” Malawski (
> konrad@lightbend.com ) wrote:
>
> Hi there,
> sharding is the thing that “starts things on the other node”.
> The thing that “recovers state” is akka persistence: 
> https://doc.akka.io/docs/akka/snapshot/persistence.html?language=scala 
>
> One often uses those two together, gaining the capability you just hinted 
> at.
>
> Happy hakking
>
> -- 
> Cheers,
> Konrad 'ktoso ' Malawski
> Akka  @ Lightbend 
>
> On February 9, 2018 at 13:56:35, Vladyslav Petrov (petro...@gmail.com 
> ) wrote:
>
> Hello, 
>
> I'm investigating the Akka Clustering to scale my project.
> Now, I have Chat room application based on web-sockets and Akka framework. 
> Each user has own stateful Actor which handle and process messages from 
> friends in chat room.
> Actor stores the following data:
>
>- loggedUser - current user 
>- Map - map of friends 
>- Set - map of requested friends 
>
> During the investigation I found the topic in the documentation - Cluster 
> Sharding.
>
> Cluster sharding is typically used when you have many stateful actors that 
>> together consume more resources (e.g. memory) than fit on one machine.
>
>
> As I understand this approach will help me to restore user Actor on 
> neighbor node after node downing.
> The persistenceId value - loggedUser.memberId
> However I'm not fully understand how to recover the list of friends and 
> requested friends.
> Could you help me to figure out how to store and recover user data? Should 
> I use the Distributed Data?
>
> Thanks,
> Vladyslav
> --
> >> 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+...@googlegroups.com .
> To post to this group, send email to akka...@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.


Re: [akka-user] Akka Cluster Sharding in Chat room app

2018-02-09 Thread Konrad “ktoso” Malawski
No.
I mean that the sharded actor would extend PersistentActor, which gives you
that recovery

-- 
Cheers,
Konrad 'ktoso ' Malawski
Akka  @ Lightbend 

On February 9, 2018 at 14:21:06, Konrad “ktoso” Malawski (
konrad.malaw...@lightbend.com) wrote:

Hi there,
sharding is the thing that “starts things on the other node”.
The thing that “recovers state” is akka persistence:
https://doc.akka.io/docs/akka/snapshot/persistence.html?language=scala

One often uses those two together, gaining the capability you just hinted
at.

Happy hakking

-- 
Cheers,
Konrad 'ktoso ' Malawski
Akka  @ Lightbend 

On February 9, 2018 at 13:56:35, Vladyslav Petrov (petrovv...@gmail.com)
wrote:

Hello,

I'm investigating the Akka Clustering to scale my project.
Now, I have Chat room application based on web-sockets and Akka framework.
Each user has own stateful Actor which handle and process messages from
friends in chat room.
Actor stores the following data:

   - loggedUser - current user
   - Map - map of friends
   - Set - map of requested friends

During the investigation I found the topic in the documentation - Cluster
Sharding.

Cluster sharding is typically used when you have many stateful actors that
> together consume more resources (e.g. memory) than fit on one machine.


As I understand this approach will help me to restore user Actor on
neighbor node after node downing.
The persistenceId value - loggedUser.memberId
However I'm not fully understand how to recover the list of friends and
requested friends.
Could you help me to figure out how to store and recover user data? Should
I use the Distributed Data?

Thanks,
Vladyslav
--
>> 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.


Re: [akka-user] Akka Cluster Sharding in Chat room app

2018-02-09 Thread Vladyslav Petrov
Konrad, you mean using Cluster Sharding with persistence mode?

пятница, 9 февраля 2018 г., 15:21:17 UTC+2 пользователь Konrad Malawski 
написал:
>
> Hi there,
> sharding is the thing that “starts things on the other node”.
> The thing that “recovers state” is akka persistence: 
> https://doc.akka.io/docs/akka/snapshot/persistence.html?language=scala 
>
> One often uses those two together, gaining the capability you just hinted 
> at.
>
> Happy hakking
>
> -- 
> Cheers,
> Konrad 'ktoso ' Malawski
> Akka  @ Lightbend 
>
> On February 9, 2018 at 13:56:35, Vladyslav Petrov (petro...@gmail.com 
> ) wrote:
>
> Hello, 
>
> I'm investigating the Akka Clustering to scale my project.
> Now, I have Chat room application based on web-sockets and Akka framework. 
> Each user has own stateful Actor which handle and process messages from 
> friends in chat room.
> Actor stores the following data:
>
>- loggedUser - current user 
>- Map - map of friends 
>- Set - map of requested friends 
>
> During the investigation I found the topic in the documentation - Cluster 
> Sharding.
>
> Cluster sharding is typically used when you have many stateful actors that 
>> together consume more resources (e.g. memory) than fit on one machine.
>
>
> As I understand this approach will help me to restore user Actor on 
> neighbor node after node downing.
> The persistenceId value - loggedUser.memberId
> However I'm not fully understand how to recover the list of friends and 
> requested friends.
> Could you help me to figure out how to store and recover user data? Should 
> I use the Distributed Data?
>
> Thanks,
> Vladyslav
> --
> >> 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+...@googlegroups.com .
> To post to this group, send email to akka...@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.


Re: [akka-user] Akka Cluster Sharding in Chat room app

2018-02-09 Thread Konrad “ktoso” Malawski
Hi there,
sharding is the thing that “starts things on the other node”.
The thing that “recovers state” is akka persistence:
https://doc.akka.io/docs/akka/snapshot/persistence.html?language=scala

One often uses those two together, gaining the capability you just hinted
at.

Happy hakking

-- 
Cheers,
Konrad 'ktoso ' Malawski
Akka  @ Lightbend 

On February 9, 2018 at 13:56:35, Vladyslav Petrov (petrovv...@gmail.com)
wrote:

Hello,

I'm investigating the Akka Clustering to scale my project.
Now, I have Chat room application based on web-sockets and Akka framework.
Each user has own stateful Actor which handle and process messages from
friends in chat room.
Actor stores the following data:

   - loggedUser - current user
   - Map - map of friends
   - Set - map of requested friends

During the investigation I found the topic in the documentation - Cluster
Sharding.

Cluster sharding is typically used when you have many stateful actors that
> together consume more resources (e.g. memory) than fit on one machine.


As I understand this approach will help me to restore user Actor on
neighbor node after node downing.
The persistenceId value - loggedUser.memberId
However I'm not fully understand how to recover the list of friends and
requested friends.
Could you help me to figure out how to store and recover user data? Should
I use the Distributed Data?

Thanks,
Vladyslav
--
>> 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.