[akka-user] Spray to Akka HTTP

2016-09-01 Thread Richard Rodseth
I'm struggling to convert the following response marshaller.
ToResponseMarshaller is a trait and object in Spray, and Marshaller takes
one type parameter.

I've read the docs, and am stumped. Can anyone provide further guidance?

// See https://bitbucket.org/binarycamp/spray-contrib/src


trait APIStatusMarshallers {


implicit def errorMarshaller[T](implicit translator: ErrorTranslator[T],

  statusCodeMapper: ErrorToStatusCodeMapper,

  m: Marshaller[T]): ToResponseMarshaller[
APIError] =

ToResponseMarshaller.fromStatusCodeAndHeadersAndT.compose {

  error => (statusCodeMapper.orElse(ErrorToStatusCodeMapper.Default)(
error), DefaultHttpHeaders.NoCacheHeaders,translator(error))

}



implicit def statusMarshaller[T](implicit m: Marshaller[T]):
ToResponseMarshaller[PimpedResult[(StatusCode, T)]] = {

ToResponseMarshaller.fromStatusCodeAndHeadersAndT.compose {

  pimpedResult => pimpedResult.result match {

case Right(response) => (response._1, DefaultHttpHeaders.
NoCacheHeaders, response._2)

case _ => throw new RuntimeException("StatusMarshaller got invalid
PimpedResult")

  }

}

  }

}

-- 
>>  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 and Streams Concurrency Fundamentals

2016-09-01 Thread Dagny T

I'd like to find reliable and current information for learning this using 
v2.4.9.

I've posted a reply to someone else's related message; but wanted to call 
Forum attention to please help refer us to a useful Blog or GitHub repo on 
this topic; AND
using the latest and greatest TestKit tools!

It's been rather hit-or-miss with Googling samples lately; as the APIs have 
been moving rapidly, and I'm still too new to pick out what's essentially 
most important!

THANK you so much in advance for any Best-Practice info on these 
fundamentals!

Here was my reply to that earlier related post:
https://groups.google.com/forum/#!topic/akka-user/4k4nXVn-wWw

THANKS in advance to hAKKArs!

-- 
>>  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: research about concurrency bugs

2016-09-01 Thread Dagny T
Hey Carmen,

I'm a Scala/Akka Newbie; but I think the idea in Scala is to use Actors to 
avert most concurrency bugs.

So, essentially (Akka) Actors are things that can hold their own state, 
like Objects in traditional OOP languages.
External Entities can Message to Actor references to signal it to change 
its own state, or to respond with information about itself.
The underlying Akka system handles the serialization of those immutable 
Messages to the Actors' 'Mailbox' or like dedicated min-message-queues.

Typically, multiple entities could concurrently message to any Actor.  So, 
the ordering of those incoming messages is random.
However, the Akka serialization of those messages ensures that there's no 
race-conditions to worry about.
This also precludes having to do locks, and therefore running into 
deadlocks.

I'm not sure if this means that you have to design your System such that 
Ordering doesn't matter (i.e. first Message to get to Actor wins); and then 
to handle Duplicate messages from
horizontally scalable Actor Cluster instances (i.e. one Actor crashes in 
mid-flow and its replacement sends a duplicate message)

Anyhow -- I'm DEFINITELY interested in seeing a good example of exercising 
the baseline concurrency test-cases using Akka-Testkit!  Will post that 
interest so that we both may get help with that answer!

Cheers!
Dagny T

On Tuesday, August 30, 2016 at 4:05:11 PM UTC-7, Carmen Torres López wrote:
>
> Hello,
>
> I'm doing a research about concurrency bugs types that can be observed in 
> languages based in actor model. I would like to know what kind of bugs can 
> be observed frequently in Akka? Has anyone experience a behavoir such as 
> deadlocks, livelock, starvation, race conditions, order violation, etc.? 
> I will appreciate any pointer of an example code that generate these bugs.
>
> Best regards,
> Carmen
>

-- 
>>  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] Nodes becomes unreachable due to serialization-issues with one single message

2016-09-01 Thread Moax76
Issue created: https://github.com/akka/akka/issues/21343

But I'll modify my serializer anyway.

Thanks.

-Morten

On Thursday, September 1, 2016 at 8:33:04 PM UTC+2, Patrik Nordwall wrote:
>
> I think we should handle exceptions from serializer.toBinary as transient. 
> Can you please create an issue.  I 
> can understand that the reason might be that it is a program bug and the 
> system should probably not run with the bug, but I think error logging 
> should be enough since the exception doesn't result in any undefined state.
>
> Deserialization is a another story, which is exhausted in that ticket 
> Martynas linked to.
>
> On Thu, Sep 1, 2016 at 7:46 PM, Moax76  > wrote:
>
>> Thanks a lot for the info.
>>
>> I'll fix my serializer so that it wraps all exceptions 
>> in NotSerializableException.
>> Am I understanding it correct that I should only do this wrapping when 
>> serializing, and not deserializing?
>>
>> Thanks again.
>>
>> -Morten
>>
>> On Thursday, September 1, 2016 at 4:14:43 PM UTC+2, drewhk wrote:
>>>
>>> The only reason serialization errors cause a connection to be dropped if 
>>> the *deserialization* fails. This is because TCP is a streaming protocol 
>>> and we cannot decide why the deserialization failed, because of some bug, 
>>> or the TCP framing is out of sync. We just drop the connection to start 
>>> from a clean state. 
>>>
>>> -Endre
>>>
>>> On Thu, Sep 1, 2016 at 3:33 PM, Martynas Mickevičius <
>>> martynas.m...@lightbend.com> wrote:
>>>
 EndpointWriter is only treating NotSerializableException as a transient 
 one. So wrapping all of the exceptions from your serializer 
 into NotSerializableException will not get the association dropped.

 Here is the discussion on having all of the exceptions transient: 
 https://github.com/akka/akka/issues/20641

 On Wed, Aug 31, 2016 at 4:56 PM, Viktor Klang  
 wrote:

> Well, I agree that it shouldn't gate the connection due to a failure 
> to serialize.
>
> Do you have a minimal reproducer to share?
>
> On Wed, Aug 31, 2016 at 3:48 PM, Moax76  wrote:
>
>>
>>
>> On Wednesday, August 31, 2016 at 3:37:41 PM UTC+2, √ wrote:
>>>
>>> What happens if you fix the serializer?
>>>
>>>
>>>
>> If I fix the serializer, then the problem off course goes away, but 
>> that is not the point.
>>
>> The problem is that instead of dropping the message that (for some 
>> 'unknown' reason) failed to be serialized, it "drops" the connection, 
>> and 
>> GATES it so that it will not try to reconnect in 5 seconds.
>>
>> If it worked as described above, this serializing issue would be a 
>> regular bug the only effected parts of the application, instead of the 
>> entire application going "down" due to cluster-issues.
>>
>>
>> -Morten
>>
>> -- 
>> >> 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.
>

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

Re: [akka-user] Problem Configuring ActorSystem

2016-09-01 Thread Patrik Nordwall
That feature with short names is not released yet. It's in the Artery
branch.
/Patrik
tors 1 sep. 2016 kl. 10:42 skrev Konrad Malawski :

> You can also just set the provider to "remote" (or "cluster").
> It's a bit simpler to not make a typo in those ;)
>
> On Thu, Sep 1, 2016 at 6:14 AM, Viktor Klang 
> wrote:
>
>> there's a comma in the class name
>>
>> --
>> Cheers,
>> √
>>
>> On Sep 1, 2016 5:11 AM, "Joseph Mansigian" 
>> wrote:
>>
>>> I am using Akka with Scala and want to configure an ActorSystem for
>>> remote messaging ( but does not need to be remotely configurable ).  The
>>> problem I am having is that I am getting a Class Not Found exception for 
>>> akka,remote.RemoteActorRefProvider
>>> when I run the code.  I've double checked all of the usual suspects,
>>> the appropriate jar on the compile,  the appropriate jar on the run.
>>> Imports are all Ok as far as I can tell.  I am using scala 2.11.8 with akka
>>> 2,4,9 and Java 8 is installed but no Java coding
>>>
>>> I have read some old posts ( not here ) about Scala placing a version of
>>> Akka in its scala/lib and that this version of Akka comes into conflict
>>> with the other Akka.
>>>
>>> Does anyone have any insight into this?  Your help would be much
>>> appreciated.
>>>
>>> thanks, joe
>>>
>>> --
>>> >> 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.
>>
>
>
>
> --
> Cheers,
> Konrad 'ktoso' Malawski
> Akka  @ Lightbend 
>
> --
> >> 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] Nodes becomes unreachable due to serialization-issues with one single message

2016-09-01 Thread Patrik Nordwall
I think we should handle exceptions from serializer.toBinary as transient.
Can you please create an issue.  I
can understand that the reason might be that it is a program bug and the
system should probably not run with the bug, but I think error logging
should be enough since the exception doesn't result in any undefined state.

Deserialization is a another story, which is exhausted in that ticket
Martynas linked to.

On Thu, Sep 1, 2016 at 7:46 PM, Moax76  wrote:

> Thanks a lot for the info.
>
> I'll fix my serializer so that it wraps all exceptions
> in NotSerializableException.
> Am I understanding it correct that I should only do this wrapping when
> serializing, and not deserializing?
>
> Thanks again.
>
> -Morten
>
> On Thursday, September 1, 2016 at 4:14:43 PM UTC+2, drewhk wrote:
>>
>> The only reason serialization errors cause a connection to be dropped if
>> the *deserialization* fails. This is because TCP is a streaming protocol
>> and we cannot decide why the deserialization failed, because of some bug,
>> or the TCP framing is out of sync. We just drop the connection to start
>> from a clean state.
>>
>> -Endre
>>
>> On Thu, Sep 1, 2016 at 3:33 PM, Martynas Mickevičius <
>> martynas.m...@lightbend.com> wrote:
>>
>>> EndpointWriter is only treating NotSerializableException as a transient
>>> one. So wrapping all of the exceptions from your serializer
>>> into NotSerializableException will not get the association dropped.
>>>
>>> Here is the discussion on having all of the exceptions transient:
>>> https://github.com/akka/akka/issues/20641
>>>
>>> On Wed, Aug 31, 2016 at 4:56 PM, Viktor Klang 
>>> wrote:
>>>
 Well, I agree that it shouldn't gate the connection due to a failure to
 serialize.

 Do you have a minimal reproducer to share?

 On Wed, Aug 31, 2016 at 3:48 PM, Moax76  wrote:

>
>
> On Wednesday, August 31, 2016 at 3:37:41 PM UTC+2, √ wrote:
>>
>> What happens if you fix the serializer?
>>
>>
>>
> If I fix the serializer, then the problem off course goes away, but
> that is not the point.
>
> The problem is that instead of dropping the message that (for some
> 'unknown' reason) failed to be serialized, it "drops" the connection, and
> GATES it so that it will not try to reconnect in 5 seconds.
>
> If it worked as described above, this serializing issue would be a
> regular bug the only effected parts of the application, instead of the
> entire application going "down" due to cluster-issues.
>
>
> -Morten
>
> --
> >> 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.

>>>
>>> --
>>> >> 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.
>>>
>>
>> --
> >> 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] Nodes becomes unreachable due to serialization-issues with one single message

2016-09-01 Thread Moax76
Thanks a lot for the info.

I'll fix my serializer so that it wraps all exceptions 
in NotSerializableException.
Am I understanding it correct that I should only do this wrapping when 
serializing, and not deserializing?

Thanks again.

-Morten

On Thursday, September 1, 2016 at 4:14:43 PM UTC+2, drewhk wrote:
>
> The only reason serialization errors cause a connection to be dropped if 
> the *deserialization* fails. This is because TCP is a streaming protocol 
> and we cannot decide why the deserialization failed, because of some bug, 
> or the TCP framing is out of sync. We just drop the connection to start 
> from a clean state. 
>
> -Endre
>
> On Thu, Sep 1, 2016 at 3:33 PM, Martynas Mickevičius <
> martynas.m...@lightbend.com > wrote:
>
>> EndpointWriter is only treating NotSerializableException as a transient 
>> one. So wrapping all of the exceptions from your serializer 
>> into NotSerializableException will not get the association dropped.
>>
>> Here is the discussion on having all of the exceptions transient: 
>> https://github.com/akka/akka/issues/20641
>>
>> On Wed, Aug 31, 2016 at 4:56 PM, Viktor Klang > > wrote:
>>
>>> Well, I agree that it shouldn't gate the connection due to a failure to 
>>> serialize.
>>>
>>> Do you have a minimal reproducer to share?
>>>
>>> On Wed, Aug 31, 2016 at 3:48 PM, Moax76 >> > wrote:
>>>


 On Wednesday, August 31, 2016 at 3:37:41 PM UTC+2, √ wrote:
>
> What happens if you fix the serializer?
>
>
>
 If I fix the serializer, then the problem off course goes away, but 
 that is not the point.

 The problem is that instead of dropping the message that (for some 
 'unknown' reason) failed to be serialized, it "drops" the connection, and 
 GATES it so that it will not try to reconnect in 5 seconds.

 If it worked as described above, this serializing issue would be a 
 regular bug the only effected parts of the application, instead of the 
 entire application going "down" due to cluster-issues.


 -Morten

 -- 
 >> 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.
>>>
>>
>> -- 
>> >> 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] Nodes becomes unreachable due to serialization-issues with one single message

2016-09-01 Thread Martynas Mickevičius
EndpointWriter is only treating NotSerializableException as a transient
one. So wrapping all of the exceptions from your serializer
into NotSerializableException will not get the association dropped.

Here is the discussion on having all of the exceptions transient:
https://github.com/akka/akka/issues/20641

On Wed, Aug 31, 2016 at 4:56 PM, Viktor Klang 
wrote:

> Well, I agree that it shouldn't gate the connection due to a failure to
> serialize.
>
> Do you have a minimal reproducer to share?
>
> On Wed, Aug 31, 2016 at 3:48 PM, Moax76  wrote:
>
>>
>>
>> On Wednesday, August 31, 2016 at 3:37:41 PM UTC+2, √ wrote:
>>>
>>> What happens if you fix the serializer?
>>>
>>>
>>>
>> If I fix the serializer, then the problem off course goes away, but that
>> is not the point.
>>
>> The problem is that instead of dropping the message that (for some
>> 'unknown' reason) failed to be serialized, it "drops" the connection, and
>> GATES it so that it will not try to reconnect in 5 seconds.
>>
>> If it worked as described above, this serializing issue would be a
>> regular bug the only effected parts of the application, instead of the
>> entire application going "down" due to cluster-issues.
>>
>>
>> -Morten
>>
>> --
>> >> 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/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.
>>
>
>
>
> --
> 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.
>

-- 
>>  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] Fail to override Assembly Merge Strategy in multi-jvm node test

2016-09-01 Thread Martynas Mickevičius
You are setting assemblyMergeStrategy in assembly but the error is
indicating that different assembly is being run: multi-jvm:assembly.
Therefore in your build.sbt you should use: assemblyMergeStrategy in
assembly in MultiJvm

On Sun, Aug 21, 2016 at 7:53 PM, Lap Ming Lee  wrote:

> I am having trouble overriding the merge strategy for a dependency.
>
> The problem stems from the cassandra dependency rely on separate netty
> modules
>
> val akkaCassandra = "com.typesafe.akka" %% "akka-persistence-cassandra" % 
> "0.17"
>
>
> If I run the graph-dependency, it outputs:
>
>   | +-io.netty:netty-handler:4.0.33.Final
> [info] |   +-io.netty:netty-buffer:4.0.33.Final
> [info] |   | +-io.netty:netty-common:4.0.33.Final
> [info] |   |
> [info] |   +-io.netty:netty-codec:4.0.33.Final
> [info] |   | +-io.netty:netty-transport:4.0.33.Final
> [info] |   |   +-io.netty:netty-buffer:4.0.33.Final
> [info] |   | +-io.netty:netty-common:4.0.33.Final
> [info] |   |
> [info] |   +-io.netty:netty-transport:4.0.33.Final
> [info] | +-io.netty:netty-buffer:4.0.33.Final
> [info] |   +-io.netty:netty-common:4.0.33.Final
>
>
> According to this discussion, its best to just define a merge strategy as
> a solution:
>
> https://groups.google.com/a/lists.datastax.com/forum/#!
> msg/spark-connector-user/5muNwRaCJnU/sIHYh6PFEwAJ
>
> Netty unfortunately has timing dependent markers in each
>> io.versions.properties file in the metainf[image: Untitled.jpg]
>>
>> This means the various components included all have different timestamps
>> which is why everything is breaking. Unfortunately this is the underlying
>> C* driver's dep, we could I guess exclude these netty modules from the
>> driver and include netty-all in the connector instead but that seems like
>> overkill.
>>
>> I think just fixing the application build file is still the best solution.
>>
>
>
> According to this, the ability to override should be implemented:
>
> https://github.com/typesafehub/sbt-multi-jvm/issues/22
>
> Nested assembly config should be exposed for customization along with the
>> other multijvm keys so that users can solve these issues.
>>
>
> i think that PR #19  
> will
>> enable this functionality. the change at msfrank@fe862ff#diff-
>> ad54d47177586fbaf474e402dd1b3dc5R137
>> 
>>  will
>> pass through the merge strategy defined with settings key
>> (assemblyMergeStrategy in assembly) as long as the file is not one of
>> *.class, *.txt, or NOTICE, which are hardcoded merge strategies.
>
>
> But when I run
>
>  sbt:multi-node-test
>
> lazy val test = Project(id = "core-tests", base = file(
> "./modules/core/tests"))
>   .settings(SbtMultiJvm.multiJvmSettings: _*)
>   .settings(
> libraryDependencies ++= Dependencies.coreTests,
> assemblyMergeStrategy in assembly := {
>   case x if x.endsWith("META-INF/io.netty.versions.properties") ⇒
> MergeStrategy.first
> },
> compile in MultiJvm <<= (compile in MultiJvm) triggeredBy (compile in
> Test),
> parallelExecution in Test := false,
> executeTests in Test <<= (executeTests in Test, executeTests in
> MultiJvm) map {
>   case (testResults, multiNodeResults) ⇒
> val overall =
>   if (testResults.overall.id < multiNodeResults.overall.id)
> multiNodeResults.overall
>   else
> testResults.overall
> Tests.Output(overall,
>   testResults.events ++ multiNodeResults.events,
>   testResults.summaries ++ multiNodeResults.summaries)
> },
> licenses := Seq(("CC0", url("http://creativecommons.
> org/publicdomain/zero/1.0"))),
> Settings.levelDb, Settings.test)
>
>
> it still refused to use the merge strategy, I defined.
>
> [error] 1 error was encountered during merge
>
> [trace] Stack trace suppressed: run 'last core-tests/multi-jvm:assembly'
> for the full output.
>
> [error] (core-tests/multi-jvm:assembly) deduplicate: different file
> contents found in the following:
>
> [error] ~/.ivy2/cache/io.netty/netty-handler/jars/netty-handler-4.0.
> 33.Final.jar:META-INF/io.netty.versions.properties
>
> [error] ~/.ivy2/cache/io.netty/netty-buffer/jars/netty-buffer-4.0.33.Final
> .jar:META-INF/io.netty.versions.properties
>
> [error] ~/.ivy2/cache/io.netty/netty-common/jars/netty-common-4.0.33.Final
> .jar:META-INF/io.netty.versions.properties
>
> [error] ~/.ivy2/cache/io.netty/netty-transport/jars/netty-transport-4.0.
> 33.Final.jar:META-INF/io.netty.versions.properties
>
> [error] ~/.ivy2/cache/io.netty/netty-codec/jars/netty-codec-4.0.33.Final.
> jar:META-INF/io.netty.versions.propertie
>
> --
> >> 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] Problem Configuring ActorSystem

2016-09-01 Thread Konrad Malawski
You can also just set the provider to "remote" (or "cluster").
It's a bit simpler to not make a typo in those ;)

On Thu, Sep 1, 2016 at 6:14 AM, Viktor Klang  wrote:

> there's a comma in the class name
>
> --
> Cheers,
> √
>
> On Sep 1, 2016 5:11 AM, "Joseph Mansigian" 
> wrote:
>
>> I am using Akka with Scala and want to configure an ActorSystem for
>> remote messaging ( but does not need to be remotely configurable ).  The
>> problem I am having is that I am getting a Class Not Found exception for
>> akka,remote.RemoteActorRefProvider when I run the code.  I've double
>> checked all of the usual suspects, the appropriate jar on the compile,  the
>> appropriate jar on the run.  Imports are all Ok as far as I can tell.  I am
>> using scala 2.11.8 with akka 2,4,9 and Java 8 is installed but no Java
>> coding
>>
>> I have read some old posts ( not here ) about Scala placing a version of
>> Akka in its scala/lib and that this version of Akka comes into conflict
>> with the other Akka.
>>
>> Does anyone have any insight into this?  Your help would be much
>> appreciated.
>>
>> thanks, joe
>>
>> --
>> >> 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/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.
>



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

-- 
>>  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] Embed a Flow in a GraphStage?

2016-09-01 Thread Endre Varga
Even simpler newFlow = flow join bidiFlow or newFlow = bidiFlow join flow

On Thu, Sep 1, 2016 at 10:23 AM, Victor  wrote:

> Ah I see :) Something like this:
>
> ... -> BidiFlow.port1 -> EmbededFlow -> BidiFlow.port2 -> ...
>
> Thanks,
> Victor
>
> Le jeudi 1 septembre 2016 10:14:04 UTC+2, drewhk a écrit :
>>
>> Hi Victor,
>>
>> Embedding is not the way to think about this. What you really want is a
>> BidiStage which then can be composed by any Flow to get a new Flow.
>>
>> -Endre
>>
>> On Thu, Sep 1, 2016 at 10:12 AM, Victor  wrote:
>>
>>> Hi,
>>>
>>> Is it possible to embed a Flow in a GraphStage?
>>>
>>> I want to design a GraphStage which monitor a flow given by a user
>>> (pseudo code):
>>>
>>> class MyFlow(embededFlow: Flow[MyMessage, MyMessage, NotUsed]) extends
>>> GraphStage[FlowShape[MyContent, MyContent]] {
>>>
>>>   var id
>>>
>>>   onPush = {
>>> val msg = grab(in)
>>> id = msg.id
>>> push(embededFlow.in, msg.content)
>>>   }
>>>
>>>   onPull = {
>>> val content = grab(embededFlow.out)
>>> push(out, MyMessage(id, content))
>>>   }
>>>
>>>   embededFlow.onFailure = {
>>> push(out, ...)
>>>   }
>>>
>>> }
>>>
>>>
>>> The embeded flow is a black box and I want to monitor it, react to it's
>>> failure and manage a state because I don't want to expose the whole message
>>> to the embeded flow, I just want it to process a part of the message.
>>>
>>> Is it possible?
>>>
>>> Thanks in advance,
>>> Victor
>>>
>>> --
>>> >> 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.
>>>
>>
>> --
> >> 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] Embed a Flow in a GraphStage?

2016-09-01 Thread Victor
Ah I see :) Something like this:

... -> BidiFlow.port1 -> EmbededFlow -> BidiFlow.port2 -> ...

Thanks,
Victor

Le jeudi 1 septembre 2016 10:14:04 UTC+2, drewhk a écrit :
>
> Hi Victor,
>
> Embedding is not the way to think about this. What you really want is a 
> BidiStage which then can be composed by any Flow to get a new Flow.
>
> -Endre
>
> On Thu, Sep 1, 2016 at 10:12 AM, Victor  > wrote:
>
>> Hi,
>>
>> Is it possible to embed a Flow in a GraphStage?
>>
>> I want to design a GraphStage which monitor a flow given by a user 
>> (pseudo code):
>>
>> class MyFlow(embededFlow: Flow[MyMessage, MyMessage, NotUsed]) extends 
>> GraphStage[FlowShape[MyContent, MyContent]] {
>>
>>   var id
>>
>>   onPush = {
>> val msg = grab(in)
>> id = msg.id
>> push(embededFlow.in, msg.content)
>>   }
>>
>>   onPull = {
>> val content = grab(embededFlow.out)
>> push(out, MyMessage(id, content))
>>   }
>>
>>   embededFlow.onFailure = {
>> push(out, ...)
>>   }
>>
>> }
>>
>>
>> The embeded flow is a black box and I want to monitor it, react to it's 
>> failure and manage a state because I don't want to expose the whole message 
>> to the embeded flow, I just want it to process a part of the message.
>>
>> Is it possible?
>>
>> Thanks in advance,
>> Victor
>>
>> -- 
>> >> 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] Embed a Flow in a GraphStage?

2016-09-01 Thread Endre Varga
Hi Victor,

Embedding is not the way to think about this. What you really want is a
BidiStage which then can be composed by any Flow to get a new Flow.

-Endre

On Thu, Sep 1, 2016 at 10:12 AM, Victor  wrote:

> Hi,
>
> Is it possible to embed a Flow in a GraphStage?
>
> I want to design a GraphStage which monitor a flow given by a user (pseudo
> code):
>
> class MyFlow(embededFlow: Flow[MyMessage, MyMessage, NotUsed]) extends
> GraphStage[FlowShape[MyContent, MyContent]] {
>
>   var id
>
>   onPush = {
> val msg = grab(in)
> id = msg.id
> push(embededFlow.in, msg.content)
>   }
>
>   onPull = {
> val content = grab(embededFlow.out)
> push(out, MyMessage(id, content))
>   }
>
>   embededFlow.onFailure = {
> push(out, ...)
>   }
>
> }
>
>
> The embeded flow is a black box and I want to monitor it, react to it's
> failure and manage a state because I don't want to expose the whole message
> to the embeded flow, I just want it to process a part of the message.
>
> Is it possible?
>
> Thanks in advance,
> Victor
>
> --
> >> 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: akka directive for uploading multiple files

2016-09-01 Thread Leo Wolf
Hi Cyril,

Not yet now.
I just use two solutions to fit the requirement, one is calling the api 
multiple times, and another is taring the whole file into a pkg and 
untaring it on server. Maybe this can help 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+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: akka directive for uploading multiple files

2016-09-01 Thread Cyril Guh
Hi Leo, 
Have you found a solution? I am facing the same requirement and exploring 
solutions.

On Thursday, June 2, 2016 at 4:25:40 PM UTC+10, Leo Wolf wrote:
>
> Hi, I'm using akka http for file uploading as bellow: 
> formFields('json.as[String]) { json =>
>
>   uploadedFile("file") {
>
> ...
>
> }
>
>
> And it works fine if I upload one file at a time. But I want to upload 
> multiple different files in a http request, and how can I get it with the 
> uploadedFile("file") directive? As now I always got the last file for 
> uploading while multiple files are sent to the server by rest client. 
>
> 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+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.