[akka-user] Akka Typed BehaviorTestKit with TimerScheduler

2018-03-07 Thread dollyg
Hi,

We are trying to create a BehaviorTestKit using a behavior which spawns a 
timer within.

val behaviorTestKit = BehaviorTestKit(createBehavior)


private def createBehavior(): Behavior[MyMessage] = {
  Behaviors
.withTimers[MyMessage](
  timerScheduler ⇒
Behaviors
  .mutable[MyMessage](
ctx =>
  new MyBehavior(
ctx,
timerScheduler,
someInfo
)
)
)
}


The above code results in error below:

An exception or error caused a run to abort: no scheduler 
java.lang.UnsupportedOperationException: no scheduler

*spawn *provided in ActorTestKit works fine in spawning an actor for this 
behavior.

However, we need to test the underlying effects of the given behavior and 
hence need to use BehaviorTestKit.
Could someone please provide a solution to this problem?

Thanks and Regards,
Dolly
ThoughtWorks

-- 
>>  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] Question on the WeaklyUp state

2018-03-07 Thread Grace
Hi,

I read the description here:
https://doc.akka.io/docs/akka/2.5.5/scala/cluster-usage.html#weaklyup-members

1) When a node is in the weakly up state, does the node process jobs like 
the nodes of the Up state?

2) In what case is it useful to have akka.cluster.allow-weakly-up-members 
turned 
on?  What's the advantage of having a node join the weakly up state as part 
of the cluster versus to just wait in the joining state until it is moved 
into the Up state?

Thanks,
Grace

-- 
>>  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-Streams and Android

2018-03-07 Thread Konrad “ktoso” Malawski
Sorry, it’s been years since I’ve done Android development…
Maybe someone else on the list will have insights or ideas where better to
ask

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

On March 8, 2018 at 1:58:29, 'Matt' via Akka User List (
akka-user@googlegroups.com) wrote:

Ah, thanks. That's good to know, too bad.

I was thinking about playing around with reactive streams and MVI
(Modell-View-Intent). I tried RxScala with RxJava2 and RxAndroid before but
I wasn't very successful. So, I thought I give akka-streams a try. Any
ideas on how to do MVI with Scala on Android?



Am Mittwoch, 7. März 2018 17:48:02 UTC+1 schrieb Konrad Malawski:
>
> Akka requires JDK8, which Android is not AFAIR… they support Java8 syntax
> nowadays but not JDK8 bytecode right?
>
> You could use ancient versions of Akka which would run on JDK6 bytecode,
> but that’s strongly discouraged.
>
> --
> Cheers,
> Konrad 'ktoso ' Malawski
> Akka  @ Lightbend 
>
> On March 8, 2018 at 1:29:05, 'Matt' via Akka User List (
> akka...@googlegroups.com) wrote:
>
> Hi there,
>
> I wonder if akka-streams are working on Android. I tried to get it working
> but there are tons of warnings and notes on the proguard step. I also did
> some proguard rules but still the estimated method count is >64K (81864);
> Akka-Streams 23684 alone. Is there a chance to make it work or do I just
> wasting my time? Does anyone tried it?
>
> Cheers,
> Matt
> --
> >> 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.

-- 
>>  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] import context.dispatcher nullpointerexception

2018-03-07 Thread Konrad “ktoso” Malawski
Yes it is nulled using unsafe.

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

On March 8, 2018 at 7:32:56, Heiko Seeberger (loe...@posteo.de) wrote:

`import context.dispatcher` is what „everybody“ is doing, not? I’m using it
all over the place, because I have learned that one can import from stable
identifiers (e.g. vals) in Scala. Hence I don’t think changing the docs has
the necessary effect.

How can a final val be „nulled"? Unsafe? Reflection?

Cheers
Heiko

--

Heiko Seeberger
Home: heikoseeberger.de
Twitter: @hseeberger
Public key: keybase.io/hseeberger




Am 07.03.2018 um 19:23 schrieb Patrik Nordwall :

Thanks!

On Wed, Mar 7, 2018 at 6:16 PM, Jeff  wrote:

> An example of documentation for using import context.dispatcher is here
> https://doc.akka.io/docs/akka/2.5/futures.html#within-actors
>
> I can create some PR to update the documentation
>
> On Wednesday, March 7, 2018 at 6:09:24 AM UTC-8, Patrik Nordwall wrote:
>>
>> It's because when the actor is stopped some of the fields are cleared
>> (yeah, even though they are vals) to "help" the GC in case something (e.g.
>> an local ActorRef) is still referencing the actor instance.
>>
>> implicit val ec = context.dispatcher
>>
>> would solve it here.
>>
>> Where in the documentation is the import recommended? We should probably
>> update that. Would you be able creating a PR fixing it? Thanks.
>>
>> /Patrik
>>
>> On Tue, Mar 6, 2018 at 10:44 PM, Jeff  wrote:
>>
>>> I suspected as much. So what would you suggest as for handling use cases
>>> where you could have chained flatmaps on futures that at the end will
>>> pipeTo a message back to the actor. Should we set the ExecutionContext to a
>>> val?
>>>
>>> On Tuesday, March 6, 2018 at 12:09:22 PM UTC-8, √ wrote:

 Context is bound to the lifecycle of the actor.

 On Tue, Mar 6, 2018 at 8:37 PM, Jeff  wrote:

> I have noticed an issue where if a future maps/flatmaps after actor
> shutdown, a NullPointerException is thrown. I've narrowed it down to
> the import context.dispatcher, which I technically understand since
> that is closing over actor state. If I change that to implicit val ec
> = context.dispatcher, everything works fine.
>
> I'd like to understand what is the best practice in this case, since
> the documentation for context.dispatcher indicates that it is
> threadsafe and looking at the actor trait, context is a val. Most
> documentation seems to indicate that import context.dispatcher is
> preferred.
>
> Thanks
> Jeff
>
> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ: http://doc.akka.io/docs/akka/c
> urrent/additional/faq.html
> >> Search the archives: https://groups.google.com/grou
> p/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.
>



 --
 Cheers,
 √

>>>
>>> --
>>> >> Read the docs: http://akka.io/docs/
>>> >> Check the FAQ: http://doc.akka.io/docs/akka/c
>>> urrent/additional/faq.html
>>> >> Search the archives: https://groups.google.com/grou
>>> p/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.
>>>
>>
>>
>>
>> --
>>
>> Patrik Nordwall
>> Akka Tech Lead
>> Lightbend  -  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 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 

Re: [akka-user] import context.dispatcher nullpointerexception

2018-03-07 Thread Heiko Seeberger
`import context.dispatcher` is what „everybody“ is doing, not? I’m using it all 
over the place, because I have learned that one can import from stable 
identifiers (e.g. vals) in Scala. Hence I don’t think changing the docs has the 
necessary effect.

How can a final val be „nulled"? Unsafe? Reflection?

Cheers
Heiko

--

Heiko Seeberger
Home: heikoseeberger.de
Twitter: @hseeberger
Public key: keybase.io/hseeberger




> Am 07.03.2018 um 19:23 schrieb Patrik Nordwall :
> 
> Thanks!
> 
> On Wed, Mar 7, 2018 at 6:16 PM, Jeff  > wrote:
> An example of documentation for using import context.dispatcher is here 
> https://doc.akka.io/docs/akka/2.5/futures.html#within-actors 
> 
> 
> I can create some PR to update the documentation
> 
> On Wednesday, March 7, 2018 at 6:09:24 AM UTC-8, Patrik Nordwall wrote:
> It's because when the actor is stopped some of the fields are cleared (yeah, 
> even though they are vals) to "help" the GC in case something (e.g. an local 
> ActorRef) is still referencing the actor instance.
> 
> implicit val ec = context.dispatcher
> 
> would solve it here.
> 
> Where in the documentation is the import recommended? We should probably 
> update that. Would you be able creating a PR fixing it? Thanks.
> 
> /Patrik
> 
> On Tue, Mar 6, 2018 at 10:44 PM, Jeff > wrote:
> I suspected as much. So what would you suggest as for handling use cases 
> where you could have chained flatmaps on futures that at the end will pipeTo 
> a message back to the actor. Should we set the ExecutionContext to a val? 
> 
> On Tuesday, March 6, 2018 at 12:09:22 PM UTC-8, √ wrote:
> Context is bound to the lifecycle of the actor.
> 
> On Tue, Mar 6, 2018 at 8:37 PM, Jeff > wrote:
> I have noticed an issue where if a future maps/flatmaps after actor shutdown, 
> a NullPointerException is thrown. I've narrowed it down to the import 
> context.dispatcher, which I technically understand since that is closing over 
> actor state. If I change that to implicit val ec = context.dispatcher, 
> everything works fine. 
> 
> I'd like to understand what is the best practice in this case, since the 
> documentation for context.dispatcher indicates that it is threadsafe and 
> looking at the actor trait, context is a val. Most documentation seems to 
> indicate that import context.dispatcher is preferred. 
> 
> Thanks
> Jeff
> 
> -- 
> >> 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 
> .
> 
> 
> 
> -- 
> Cheers,
> √
> 
> -- 
> >> 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 
> .
> 
> 
> 
> -- 
> 
> Patrik Nordwall
> Akka Tech Lead
> Lightbend  -  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 the Google Groups 
> "Akka 

Re: [akka-user] import context.dispatcher nullpointerexception

2018-03-07 Thread Patrik Nordwall
Thanks!

On Wed, Mar 7, 2018 at 6:16 PM, Jeff  wrote:

> An example of documentation for using import context.dispatcher is here
> https://doc.akka.io/docs/akka/2.5/futures.html#within-actors
>
> I can create some PR to update the documentation
>
> On Wednesday, March 7, 2018 at 6:09:24 AM UTC-8, Patrik Nordwall wrote:
>>
>> It's because when the actor is stopped some of the fields are cleared
>> (yeah, even though they are vals) to "help" the GC in case something (e.g.
>> an local ActorRef) is still referencing the actor instance.
>>
>> implicit val ec = context.dispatcher
>>
>> would solve it here.
>>
>> Where in the documentation is the import recommended? We should probably
>> update that. Would you be able creating a PR fixing it? Thanks.
>>
>> /Patrik
>>
>> On Tue, Mar 6, 2018 at 10:44 PM, Jeff  wrote:
>>
>>> I suspected as much. So what would you suggest as for handling use cases
>>> where you could have chained flatmaps on futures that at the end will
>>> pipeTo a message back to the actor. Should we set the ExecutionContext to a
>>> val?
>>>
>>> On Tuesday, March 6, 2018 at 12:09:22 PM UTC-8, √ wrote:

 Context is bound to the lifecycle of the actor.

 On Tue, Mar 6, 2018 at 8:37 PM, Jeff  wrote:

> I have noticed an issue where if a future maps/flatmaps after actor
> shutdown, a NullPointerException is thrown. I've narrowed it down to
> the import context.dispatcher, which I technically understand since
> that is closing over actor state. If I change that to implicit val ec
> = context.dispatcher, everything works fine.
>
> I'd like to understand what is the best practice in this case, since
> the documentation for context.dispatcher indicates that it is
> threadsafe and looking at the actor trait, context is a val. Most
> documentation seems to indicate that import context.dispatcher is
> preferred.
>
> Thanks
> Jeff
>
> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ: http://doc.akka.io/docs/akka/c
> urrent/additional/faq.html
> >> Search the archives: https://groups.google.com/grou
> p/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.
>



 --
 Cheers,
 √

>>> --
>>> >> Read the docs: http://akka.io/docs/
>>> >> Check the FAQ: http://doc.akka.io/docs/akka/c
>>> urrent/additional/faq.html
>>> >> Search the archives: https://groups.google.com/grou
>>> p/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.
>>>
>>
>>
>>
>> --
>>
>> Patrik Nordwall
>> Akka Tech Lead
>> Lightbend  -  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 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  -  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 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 

Re: [akka-user] import context.dispatcher nullpointerexception

2018-03-07 Thread Jeff
An example of documentation for using import context.dispatcher is 
here https://doc.akka.io/docs/akka/2.5/futures.html#within-actors

I can create some PR to update the documentation

On Wednesday, March 7, 2018 at 6:09:24 AM UTC-8, Patrik Nordwall wrote:
>
> It's because when the actor is stopped some of the fields are cleared 
> (yeah, even though they are vals) to "help" the GC in case something (e.g. 
> an local ActorRef) is still referencing the actor instance.
>
> implicit val ec = context.dispatcher
>
> would solve it here.
>
> Where in the documentation is the import recommended? We should probably 
> update that. Would you be able creating a PR fixing it? Thanks.
>
> /Patrik
>
> On Tue, Mar 6, 2018 at 10:44 PM, Jeff  
> wrote:
>
>> I suspected as much. So what would you suggest as for handling use cases 
>> where you could have chained flatmaps on futures that at the end will 
>> pipeTo a message back to the actor. Should we set the ExecutionContext to a 
>> val? 
>>
>> On Tuesday, March 6, 2018 at 12:09:22 PM UTC-8, √ wrote:
>>>
>>> Context is bound to the lifecycle of the actor.
>>>
>>> On Tue, Mar 6, 2018 at 8:37 PM, Jeff  wrote:
>>>
 I have noticed an issue where if a future maps/flatmaps after actor 
 shutdown, a NullPointerException is thrown. I've narrowed it down to 
 the import context.dispatcher, which I technically understand since 
 that is closing over actor state. If I change that to implicit val ec 
 = context.dispatcher, everything works fine. 

 I'd like to understand what is the best practice in this case, since 
 the documentation for context.dispatcher indicates that it is 
 threadsafe and looking at the actor trait, context is a val. Most 
 documentation seems to indicate that import context.dispatcher is 
 preferred. 

 Thanks
 Jeff

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

>>>
>>>
>>>
>>> -- 
>>> Cheers,
>>> √
>>>
>> -- 
>> >> 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.
>>
>
>
>
> -- 
>
> Patrik Nordwall
> Akka Tech Lead
> Lightbend  -  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 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-Streams and Android

2018-03-07 Thread 'Matt' via Akka User List
Ah, thanks. That's good to know, too bad. 

I was thinking about playing around with reactive streams and MVI 
(Modell-View-Intent). I tried RxScala with RxJava2 and RxAndroid before but 
I wasn't very successful. So, I thought I give akka-streams a try. Any 
ideas on how to do MVI with Scala on Android?



Am Mittwoch, 7. März 2018 17:48:02 UTC+1 schrieb Konrad Malawski:
>
> Akka requires JDK8, which Android is not AFAIR… they support Java8 syntax 
> nowadays but not JDK8 bytecode right?
>
> You could use ancient versions of Akka which would run on JDK6 bytecode, 
> but that’s strongly discouraged.
>
> -- 
> Cheers,
> Konrad 'ktoso ' Malawski
> Akka  @ Lightbend 
>
> On March 8, 2018 at 1:29:05, 'Matt' via Akka User List (
> akka...@googlegroups.com ) wrote:
>
> Hi there,
>
> I wonder if akka-streams are working on Android. I tried to get it working 
> but there are tons of warnings and notes on the proguard step. I also did 
> some proguard rules but still the estimated method count is >64K (81864); 
> Akka-Streams 23684 alone. Is there a chance to make it work or do I just 
> wasting my time? Does anyone tried it?
>
> Cheers,
> Matt
> --
> >> 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-Streams and Android

2018-03-07 Thread Konrad “ktoso” Malawski
Akka requires JDK8, which Android is not AFAIR… they support Java8 syntax
nowadays but not JDK8 bytecode right?

You could use ancient versions of Akka which would run on JDK6 bytecode,
but that’s strongly discouraged.

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

On March 8, 2018 at 1:29:05, 'Matt' via Akka User List (
akka-user@googlegroups.com) wrote:

Hi there,

I wonder if akka-streams are working on Android. I tried to get it working
but there are tons of warnings and notes on the proguard step. I also did
some proguard rules but still the estimated method count is >64K (81864);
Akka-Streams 23684 alone. Is there a chance to make it work or do I just
wasting my time? Does anyone tried it?

Cheers,
Matt
--
>> 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] Akka-Streams and Android

2018-03-07 Thread 'Matt' via Akka User List
Hi there,

I wonder if akka-streams are working on Android. I tried to get it working 
but there are tons of warnings and notes on the proguard step. I also did 
some proguard rules but still the estimated method count is >64K (81864); 
Akka-Streams 23684 alone. Is there a chance to make it work or do I just 
wasting my time? Does anyone tried it?

Cheers,
Matt

-- 
>>  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] Getting the HTTP server's bound port seems to be impossible?

2018-03-07 Thread Konrad “ktoso” Malawski
Could I ask you to open a ticket requesting that on
https://github.com/akka/akka ?
Thanks

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

On March 8, 2018 at 0:21:58, Alan Burlison (alan.burli...@gmail.com) wrote:

On 07/03/18 01:11, Konrad “ktoso” Malawski wrote:

> The difference is in the binding call you can do, there’s a few styles,
yet
> each gives back a binding, which contains an address:
>
> val bindingFuture = Http().bindAndHandle(routes, interface =
> "0.0.0.0", port = 8080)
> bindingFuture.foreach { binding ⇒
> println(s"Server online at ${binding.localAddress}")
> }

Ahah, that's what I was looking for, thanks - I wasn't clear how to go
from the value returned from bindAndHandle to the bind port - I'd
assumed doing something like the above would block on the future. Adding
that to the docs would be useful...

On a related note, I found a very helpful code snippet which shows how
to provide an Akka-HTTP marshaller to go from/to protobuf in the routing
DSL. As protobuf is commonly used with Akka it would be useful if the
code in the bug report could be added to the Akka docks as a marshalling
example.

https://github.com/scalapb/ScalaPB/issues/247

-- 
Alan Burlison
--

-- 
>>  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] Getting the HTTP server's bound port seems to be impossible?

2018-03-07 Thread Alan Burlison

On 07/03/18 01:11, Konrad “ktoso” Malawski wrote:


The difference is in the binding call you can do, there’s a few styles, yet
each gives back a binding, which contains an address:

val bindingFuture = Http().bindAndHandle(routes, interface =
"0.0.0.0", port = 8080)
bindingFuture.foreach { binding ⇒
   println(s"Server online at ${binding.localAddress}")
}


Ahah, that's what I was looking for, thanks - I wasn't clear how to go 
from the value returned from bindAndHandle to the bind port - I'd 
assumed doing something like the above would block on the future. Adding 
that to the docs would be useful...


On a related note, I found a very helpful code snippet which shows how 
to provide an Akka-HTTP marshaller to go from/to protobuf in the routing 
DSL. As protobuf is commonly used with Akka it would be useful if the 
code in the bug report could be added to the Akka docks as a marshalling 
example.


https://github.com/scalapb/ScalaPB/issues/247

--
Alan Burlison
--

--

 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] Host-level API with queue: How to retry?

2018-03-07 Thread Roberto Minelli
Dear all,

I am very new to Akka and I am implementing a simple REST HTTP client using 
Akka. My client should do around 100k GET requests. 

When I implement it in the naïve way 

 
— obviously — I end up in having an akka.stream.BufferOverflowException: 
Exceeded configured max-open-requests value of [32].

To overcome this, I am trying to use the host-level API with a queue 
.
 
The documentation says that *"you need to think about a strategy about what 
to do when requests fail because the queue overflowed (e.g. try again later 
or just fail)"*. In the provided example, all requests that arrive when the 
queue overflows are rejected (i.e., Future.failed(...)). I am wondering 
whether you could support me in implementing a mechanism that retries the 
failed requests after some time.

Thanks in advance,
Roberto

-- 
>>  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] import context.dispatcher nullpointerexception

2018-03-07 Thread Patrik Nordwall
It's because when the actor is stopped some of the fields are cleared
(yeah, even though they are vals) to "help" the GC in case something (e.g.
an local ActorRef) is still referencing the actor instance.

implicit val ec = context.dispatcher

would solve it here.

Where in the documentation is the import recommended? We should probably
update that. Would you be able creating a PR fixing it? Thanks.

/Patrik

On Tue, Mar 6, 2018 at 10:44 PM, Jeff  wrote:

> I suspected as much. So what would you suggest as for handling use cases
> where you could have chained flatmaps on futures that at the end will
> pipeTo a message back to the actor. Should we set the ExecutionContext to a
> val?
>
> On Tuesday, March 6, 2018 at 12:09:22 PM UTC-8, √ wrote:
>>
>> Context is bound to the lifecycle of the actor.
>>
>> On Tue, Mar 6, 2018 at 8:37 PM, Jeff  wrote:
>>
>>> I have noticed an issue where if a future maps/flatmaps after actor
>>> shutdown, a NullPointerException is thrown. I've narrowed it down to
>>> the import context.dispatcher, which I technically understand since
>>> that is closing over actor state. If I change that to implicit val ec =
>>> context.dispatcher, everything works fine.
>>>
>>> I'd like to understand what is the best practice in this case, since the
>>> documentation for context.dispatcher indicates that it is threadsafe
>>> and looking at the actor trait, context is a val. Most documentation
>>> seems to indicate that import context.dispatcher is preferred.
>>>
>>> Thanks
>>> Jeff
>>>
>>> --
>>> >> Read the docs: http://akka.io/docs/
>>> >> Check the FAQ: http://doc.akka.io/docs/akka/c
>>> urrent/additional/faq.html
>>> >> Search the archives: https://groups.google.com/grou
>>> p/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.
>>>
>>
>>
>>
>> --
>> Cheers,
>> √
>>
> --
> >> 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  -  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 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.