Re: [akka-user] cluster sharding and auto-down

2017-05-28 Thread Dai Yinhua
Patrik,

Specifically, we are using kubernetes and container based akka cluster, 
where kubernetes will automatically restart any container that crashed.
I haven't got idea how to add "Down" logic before kubernetes restarts the 
crashed container.

-- 
>>  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] cluster sharding and auto-down

2017-05-28 Thread Dai Yinhua
Hi Justin,

No, I am trying to find where and when should I add the "Down" logic.
So I am trying to understand what would happen before I add the "Down" 
logic.


On Friday, 26 May 2017 20:38:37 UTC+8, Justin du coeur wrote:
>
> Clarifying question: are you doing downing somewhere in this?
>
> The naive auto-down feature shouldn't be used because it is *too* naive, 
> and leads to split-brain when you get transient network failures.  But you 
> do still have to down nodes *somehow* when they crash, so that the system 
> knows to readjust accordingly...
>
> On Fri, May 26, 2017 at 4:52 AM, Dai Yinhua  > wrote:
>
>> I am using *akka cluster sharding *to build a long running calculation 
>> service, and I have set auto-down to false.
>> And we have mechanism that *when one jvm get crashed it will be 
>> restarted immediately* by some external monitoring tools.
>>
>> I would like to confirm below behaviors when some jvm get crashed:
>>
>> Two cases:
>>
>> 1. *If the crashed jvm is seed node*, and the jvm is restarted 
>> immediately 
>> Is this the an expected result:
>> 1.1) Other nodes see seed node as unreachable
>> 1.2) One from other node become the new leader, but it can not 
>> perform any duty
>> 1.3) Seed node restarted, and join it self
>> *Seems in this case the cluster was partitioned to two?*
>> How should I deal with this situation?
>>
>> 2. *If the crashed jvm is not seed node but a shard region node*, and 
>> the jvm is restarted immediately 
>> Before crash, the jvm contains some shards and have some entity actors 
>> running.
>> Is this the an expected result:
>> 2.1) The crashed node marked as unreachable
>> 2.2) Leader can not performance any operation from now
>> 2.3) A new instance is trying to join the cluster, and succeed
>> 2.4) The jvm marked as up
>> 2.5) Leader become available again
>> Question:
>> Will the *entities *that running in the crashed jvm be *moved to 
>> other available node automatically *after the crash happened?
>> What if the *shard coordinator* happened to be running in the 
>> crashed jvm?
>>
>> Thank you.
>>
>> -- 
>> >> 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] New Documentation

2017-05-28 Thread Roland Kuhn
Hi Mike,

it took a bit until your proposal registered properly (I blame the sun): I 
agree that it would be nice to have a link to the API on every page of the 
reference docs, I’ve seen that elsewhere and it makes sense. It would be even 
nicer to have everything in the code samples linked to its API doc where 
applicable :-) Does such technology exist today?

Regards,

Roland

> 28 maj 2017 kl. 18:05 skrev Mike Nielsen :
> 
> I'm sure it is for all but those of us like me who are intensely lazy.
> 
> I just thought it would be handy to have the nav header version in the 
> reference link to the API docs.
> 
> No biggie, really. 
> 
> Again, let me congratulate you on the new site.  I think it's outstanding, 
> and I am very excited about the possibility that there may be more runnable 
> examples using ScalaFiddle!
> 
> Well done and thank you for taking the time on a Sunday to reply!
> 
> Warm regards,
> 
> Mike
> 
> On Sun, May 28, 2017 at 9:33 AM, Patrik Nordwall  > wrote:
> Thanks. Our thinking was that http://akka.io/docs/  
> would be the landing page for all docs including such links. Not enough?
> 
> /Patrik
> sön 28 maj 2017 kl. 15:26 skrev Mike Nielsen  >:
> Congratulations, team, on the new Akka documentation site.  It looks good!
> 
> By way of a minor enhancement, would it be possible to put a link to the API 
> documentation in an easy-to-find place so that those of us with poor memories 
> may find it more easily?
> 
> 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" 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 
> .
> 
> 
> -- 
> >> 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...@googleg

Re: [akka-user] New Documentation

2017-05-28 Thread Mike Nielsen
I'm sure it is for all but those of us like me who are intensely lazy.

I just thought it would be handy to have the nav header version in the
reference link to the API docs.

No biggie, really.

Again, let me congratulate you on the new site.  I think it's outstanding,
and I am very excited about the possibility that there may be more runnable
examples using ScalaFiddle!

Well done and thank you for taking the time on a Sunday to reply!

Warm regards,

Mike

On Sun, May 28, 2017 at 9:33 AM, Patrik Nordwall 
wrote:

> Thanks. Our thinking was that http://akka.io/docs/ would be the landing
> page for all docs including such links. Not enough?
>
> /Patrik
> sön 28 maj 2017 kl. 15:26 skrev Mike Nielsen :
>
>> Congratulations, team, on the new Akka documentation site.  It looks good!
>>
>> By way of a minor enhancement, would it be possible to put a link to the
>> API documentation in an easy-to-find place so that those of us with poor
>> memories may find it more easily?
>>
>> 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" 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.
>

-- 
>>  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] New Documentation

2017-05-28 Thread Patrik Nordwall
Thanks. Our thinking was that http://akka.io/docs/ would be the landing
page for all docs including such links. Not enough?

/Patrik
sön 28 maj 2017 kl. 15:26 skrev Mike Nielsen :

> Congratulations, team, on the new Akka documentation site.  It looks good!
>
> By way of a minor enhancement, would it be possible to put a link to the
> API documentation in an easy-to-find place so that those of us with poor
> memories may find it more easily?
>
> 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" 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.


[akka-user] Re: New Documentation

2017-05-28 Thread Mike Nielsen
I should have qualified my request -- I meant specifically from the
Reference.  It would be nice to have a link on the reference page to the
API docs.

Once you're into the "reference" you have to go back to the top-level
documentation to find the link to the API docs.

I know, I'm lazy...

-- 
>>  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.


[akka-user] New Documentation

2017-05-28 Thread Mike Nielsen
Congratulations, team, on the new Akka documentation site.  It looks good!

By way of a minor enhancement, would it be possible to put a link to the
API documentation in an easy-to-find place so that those of us with poor
memories may find it more easily?

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" 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 heartbeat delay

2017-05-28 Thread Patrik Nordwall
It can be many reasons for delayed heartbeat messages.

- GC. Enable gc logging and try to correlate.
- Slow serialization/deserialization of your application messages,
especially if you send many messages in a burst
- Running blocking actors/tasks on the default dispatcher

/Patrik
tors 25 maj 2017 kl. 13:58 skrev Yutao Shuai :

> We have a 3 nodes cluster (157,158 and 159), we send 4000 messages per
> seconds to 158 in 157, sometimes 157 can not receive the heartbeat from
> 158, but 158 is already sended. The heartbeat between 159 and 158 is fine,
> and 157-159 also ok. Our version is akka2.3.10, and we want to solve this
> problem in 2.3.10, we will upgrade to 2.4.18 soon.
>
> Here is the log of heartbeat, we add a log when receive heartbeat.
> This is 157 log, as we can see, 157 can not receive the heartbeat from 158
> since 20:59:15,985 until 20:59:32,558, Heartbeat is not lost but delay
>
>
> 2017-05-23 20:59:07,516 | DEBUG | ult-dispatcher-3 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:08,601 | DEBUG | ult-dispatcher-2 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:11,824 | DEBUG | t-dispatcher-852 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:13,004 | DEBUG | lt-dispatcher-29 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:13,166 | DEBUG | t-dispatcher-853 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:13,273 | DEBUG | t-dispatcher-853 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:14,287 | DEBUG | t-dispatcher-853 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:15,853 | DEBUG | t-dispatcher-853 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:15,985 | DEBUG | t-dispatcher-852 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:32,558 | DEBUG | ult-dispatcher-3 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:32,612 | DEBUG | ult-dispatcher-3 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:32,632 | DEBUG | ult-dispatcher-3 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:32,831 | DEBUG | ult-dispatcher-3 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:32,910 | DEBUG | ult-dispatcher-3 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:32,982 | DEBUG | ult-dispatcher-3 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:32,987 | DEBUG | ult-dispatcher-3 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:33,059 | DEBUG | ult-dispatcher-2 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:33,101 | DEBUG | ult-dispatcher-2 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:33,170 | DEBUG | ult-dispatcher-2 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j | Received Heartbeat from akka.tcp://
> actorsystem@192.168.0.158:2551
> 2017-05-23 20:59:33,175 | DEBUG | ult-dispatcher-2 |
> ClusterHeartbeatReceiver |apply$mcV$sp() 77 |
> com.typesafe.akka.slf4j 

Re: [akka-user] ActorPublisher GraphStage alternative?

2017-05-28 Thread Patrik Nordwall
Can't you use Source.queue? Backpressure can be maintained by piping the
result of the future back to an ordinary actor.

/Patrik
lör 27 maj 2017 kl. 16:29 skrev Richard Rodseth :

> In case it helps:
>
> https://groups.google.com/d/topic/akka-user/AgVHHnl9ub4/discussion
> https://github.com/akka/akka/issues/22742
>
> On Fri, May 26, 2017 at 1:34 PM, Curt Siffert  wrote:
>
>>
>> Hi, I see in the docs for 2.5.2 that ActorPublisher/ActorSubscriber will
>> be deprecated.
>>
>> In my (still beginning) experiments with akka streams I used
>> ActorPublisher as a way to help create some back pressure controls while
>> consuming messages from an external queue. This worked just by consuming
>> the queue like normal and then for each message consumed, sending a message
>> to ActorPublisher.
>>
>> Without using ActorPublisher, I can use a Source.actorRef, but that
>> doesn't have back pressure controls.
>>
>> I know the recommended alternative to ActorPublisher is to use a custom
>> graph stage and I have started experimenting with that but so far I don't
>> see how to meet the ActorPublisher use case with it. So far it doesn't seem
>> like a custom Source has an ActorRef type signature like Source.actorRef
>> does. Once the custom stage is created, can I send a "tell" message to it
>> the way I did to ActorPublisher? Or am I supposed to use Source.actorRef
>> and then funnel it through the custom stage to get the back pressure
>> controls?
>>
>> Sorry if my question is muddled, I am still making my way through this.
>> :-) I recognize this is a bit weird since ideally the back pressure
>> controls would be applied to the queueing tech itself.
>>
>> Curt
>>
>> --
>> >> 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.
>

-- 
>>  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.