[akka-user] Are messages ordered in activator hello akka java8 tutorial?

2016-09-02 Thread queshaw
I'm early in learning Akka. The hello-akka-java8 tutorial has greeter.tell 
from no actor, followed by inbox.send:

final ActorRef greeter = system.actorOf(Props.create(Greeter.class), 
"greeter");
final Inbox inbox = Inbox.create(system);
greeter.tell(new WhoToGreet("akka"), ActorRef.noSender());
inbox.send(greeter, new Greet());
Greeting greeting1 = (Greeting) inbox.receive(Duration.create(5, 
TimeUnit.SECONDS));

Can I expect that the greeter actor is going to process new 
WhoToGreet("akka"), before new Greet()?

If so, why?

I read in Akka documentation:

"*...for a given pair of actors, messages sent directly from the first to 
the second will not be received out-of-order.* The word *directly* emphasizes 
that this guarantee only applies when sending with the telloperator to the 
final destination, not when employing mediators or other message 
dissemination features (unless stated otherwise)."

I think the tutorial is not sending messages from one actor.


-- 
>>  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: Spray to Akka HTTP

2016-09-02 Thread Richard Rodseth
I've yet to test this out, but it compiles. Hope I'm on the right track.

trait APIStatusMarshallers {


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

  statusCodeMapper: ErrorToStatusCodeMapper,

  m: ToEntityMarshaller[T]):
ToResponseMarshaller[APIError] = {


val base = PredefinedToResponseMarshallers
.fromStatusCodeAndHeadersAndValue

val result = base.compose {

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

}

result

  }


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

val base = PredefinedToResponseMarshallers
.fromStatusCodeAndHeadersAndValue

val result = base.compose {

  pimpedResult: PimpedResult[(StatusCode, T)] =>

pimpedResult.result match {

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

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

}

}

result

  }

}

On Fri, Sep 2, 2016 at 1:01 PM, Richard Rodseth  wrote:

> I'm guessing the errorMarshaller and statusMarshaller shown (which use
> compose) need to be recast according to
>
> http://doc.akka.io/docs/akka/2.4.9/scala/http/common/
> marshalling.html#Deriving_Marshallers
>
> But that paragraph of documentation could really use an example.
>
>
> On Thu, Sep 1, 2016 at 3:19 PM, Richard Rodseth 
> wrote:
>
>> 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] Sharing my attempt at contributing to Akka

2016-09-02 Thread Omer van Kloeten
Hi all,

First off, let me thank everyone here for their time and energy spent 
making Akka the amazing toolset it is today.

Following the Akka developer survey I answered today, I realized I wanted 
to contribute to Akka and decided to just do it. Since I'm too much of a 
novice in the details of Akka to solve any open issues and have not had 
enough experience contributing to large open-source projects in the past, I 
decided to start off small and contribute documentation.
My idea was to contribute more code samples to the Custom Directives 

 
page of akka-http to make modifiers more easy to understand.

The friction involved in the process of contributing made me abandon my 
attempt. I'd like to share my experience:

I decided which three lines of code I wanted to contribute. Then I went 
into the doc page itself and looked for a "contribute" / "edit" / etc. 
button or the well known "fork me on github" button. None exists. Huh.
As an aside, I knew the docs were on GitHub (basing this on a conversation 
I had with Konrad back in Scala Days Berlin) but found no indicator that 
this was the case on the page itself.

I went to Akka's GitHub repo and found CONTRIBUTING.MD. I was greeted by a 
huge wall of text. I searched for "doc" and found the part talking about 
documentation contribution (I guess?) with a list of requirements and no 
examples or references (and a confusing last two paragraphs). The 
references that did exist were to tools: RST and Sphinx. Not sure about 
whether I need to learn either. I'm great with Markdown, does that help? 
Also I need to start writing tests for my three lines of code?

OK let's try to move forward - contributing can't be that hard. Next I 
decided to just see where the actual docs existed so I searched the repo 
for "Custom Directives" which raised too many results and then 
"Configuration Labeling" (a subheader) which showed two results for docs, 
one for Scala and one for Java. I have to write my sample code in both? 
this wasn't mentioned anywhere.
Reading the source of the file (custom-directives.rst) made me realize 
samples were imported from external files. Where do I put mine?

I forked the repo, looked at my clock, realized 20 minutes have already 
passed and that I have achieved almost nothing and decided I didn't have 
any more time for this.

I'm sure you can empathize with my frustration, since all I wanted to do 
was contribute three lines of code that would have made great strides 
towards explaining something to a new user coming across the official docs. 
I know I would have been super happy to see them when I first met that page.

Now I realize things are complicated - you want to verify all code, 
maintain standards and so on, and I applaud your work - but we have to find 
a better way to do it.

My dream docs contribution process? An in-place editor (wiki-style) where 
after I add / change code, I wait for the code to compile (online) and my 
tests to run (in a sandbox, of cource) and if they all do, it gets sent to 
a moderator for approval (opens a pull request behind the scenes?). If only 
text changed, it just opens that pull request.

I'll probably try contributing the samples anyway, but I'll wait until I 
have maybe an hour or two to spend on it.

HTH,
Omer

-- 
>>  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: Spray to Akka HTTP

2016-09-02 Thread Richard Rodseth
I'm guessing the errorMarshaller and statusMarshaller shown (which use
compose) need to be recast according to

http://doc.akka.io/docs/akka/2.4.9/scala/http/common/marshalling.html#Deriving_Marshallers

But that paragraph of documentation could really use an example.


On Thu, Sep 1, 2016 at 3:19 PM, Richard Rodseth  wrote:

> 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] Re: Akka and Streams Concurrency Fundamentals

2016-09-02 Thread Dagny T

Yes, well; that link is rather generic, no?  ;0)

What I (and likely the 19 other Viewers of this post) are looking for is 
baseline-thorough coverage of test-cases to be aware of when testing Akka 
Actor and Streams operations.
I'm a newbie, and I learn best through running idiomatic code examples with 
test cases; hence my interest.

I didn't find that in the docs; nor am I finding it in any of the Blogs 
that I've been Googling around for.
That's why I'm asking for help with finding a current and reliable 
information source.

I found these specific docs do provide a scratch-the-surface start:
http://doc.akka.io/docs/akka/2.4.9/scala/stream/stream-testkit.html

However, I'm looking for Tutorial-level code covering things like:
- testing backpressure operation with Bounded memory settings when 
operating simple Graphs of Flows
- testing for connection drops, resend of duplicate message,  and Client 
retries and wait-timeouts
- testing for system exception-handling occurring in a mid-Flow Stage.

Would be darn grateful if you had any specific insights on where to find 
such learning resources; and were willing to share them with this Forum!

Thanks in advance for continuing to support a welcoming community for Akka 
Newbs!  You'll make the World a Better Place with Akka Everywhere!  ;0)
Dagny T

On Thursday, September 1, 2016 at 2:43:46 PM UTC-7, Dagny T wrote:
>
>
> 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.


Re: [akka-user] Akka and Streams Concurrency Fundamentals

2016-09-02 Thread Patrik Nordwall
Isn't it covered in the documentation?
http://akka.io/docs/

/Patrik
tors 1 sep. 2016 kl. 23:43 skrev 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.
>

-- 
>>  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-02 Thread Patrik Nordwall
Thanks for reporting., Fixed, will be in upcoming 2.4.10

/Patrik
tors 1 sep. 2016 kl. 20:58 skrev 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 

Re: [akka-user] Method to block Migration of Cluster Sharded Actors in a Certain State

2016-09-02 Thread Patrik Nordwall
The stop signal is that the actor is terminated, i.e. you called
context.stop, so stashing is fine
fre 2 sep. 2016 kl. 16:46 skrev kraythe :

> So if I have an actor that while on a specific state simply stashes any
> message that it doesn't handle, will it ignore the stop request until the
> message is I stashed and processed? Although that time delay should be a
> max of a couple seconds it does exist. And in the meantime j don't want the
> actor waiting for the reply to be never replied to because the message got
> dumped when the actor moved.
>
> The thing is the actor ends up only in this state due to a request from
> another actor and although I could get a receive timeout and try again, I
> would prefer to not do that if it can be avoided.
>
> --
> >>  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] ANNOUNCE: Akka Community Survey 2016

2016-09-02 Thread Konrad Malawski
Dear hakkers,

we did a lot this year already. We merged Akka Streams and HTTP into the
2.4 series of Akka, pushed 16 releases of Akka itself, and maintained the
various Persistence plugins. We also reached out to create even more
community collaboration with projects related to Kafka, and now are eagerly
awaiting codename Alpakka (the various Akka Streams connectors to many
different technologies) to take shape and form - all driven by you, the
community. We also started this blog, as we wanted to get more in touch
with you, on a different level than though raw documentation of Akka–we
want to have an ongoing conversation with you.

We want to share more technical details with you and introduce you to the
latest happenings. We also started to recognize our most active members of
our community by giving out special “happy hakking” t-shirts are unique and
you can’t get them anyway else other than becoming a valuable part of our
Akka community. These were actually a surprise to many of our contributors,
and also, for us, a way to say*thanks* for all the amazing work these
contributors and community as a whole have been doing. But this shouldn’t
be the last thing we do this year–in fact, we’re only getting started.

Today, we’d like to announce the “Akka Community Survey 2016”! Its goal is,
to make sure to give you, our community, a voice. Of course we’re always
on-line and listening to your feedback on the various mailing lists, chats
and twitter, however the form of a survey should help us to set direction
and see what your thoughts are in a more structured fashion. We compiled a
list of questions which will help us to identify missing bits and pieces
but also understand better how you are using Akka.

It asks about module usage, your favorite language for Akka, areas of
improvements and will take you probably just a short 5 or 10 minutes. We
keep it open for a 2 weeks (until September 16th, 2016), and hope to be
able to provide you with a nice summary of the results after that.

So, if you have some time to spare and would like to have an impact of
Akka’s future:

*Take the Akka Community Survey 2016
*

Aditionally, as a little motivation, we’ll be raffling away *100 Akka
t-shirts* among the respondents of the survey. Every response who enters
the raffle has a chance to win one. The only prerequisite is, that you give
us your email address at the end of the survey. You can take this survey
anonymously if you don’t want to participate in the raffle. Winners will be
notified within two weeks after we closed the survey.

[image: Win an Akka T-Shirt]
(see more Lightbend swag
)

We’re looking forward to your responses. So take the survey
, and spread
the word!

*happy hakking!*

-- 
Cheers,
Markus Eisele & Akka Team

-- 
>>  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 http vs Spray performance

2016-09-02 Thread Владимир Морозов
I perform some test for 2.4.9 release

> wrk -t30 -c64 
http://127.0.0.1:9000/dictionaries/hello/suggestions?ngr=hond
Running 10s test @ 
http://127.0.0.1:9000/dictionaries/hello/suggestions?ngr=hond
  30 threads and 64 connections
  Thread Stats   Avg  Stdev Max   +/- Stdev
Latency10.00ms   37.94ms 640.12ms   94.49%
Req/Sec 1.66k   738.92 4.73k63.21%
  487404 requests in 10.07s, 69.26MB read
Requests/sec:  48405.49
Transfer/sec:  6.88MB

> wrk -t30 -c64 
http://127.0.0.1:9000/dictionaries/hello/suggestions?ngr=hond
Running 10s test @ 
http://127.0.0.1:9000/dictionaries/hello/suggestions?ngr=hond
  30 threads and 64 connections
  Thread Stats   Avg  Stdev Max   +/- Stdev
Latency 6.58ms   18.10ms 212.50ms   92.59%
Req/Sec 1.94k   672.59 7.34k69.63%
  577713 requests in 10.08s, 82.09MB read
Requests/sec:  57308.72
Transfer/sec:  8.14MB

> wrk -t30 -c64 
http://127.0.0.1:9000/dictionaries/hello/suggestions?ngr=hond
Running 10s test @ 
http://127.0.0.1:9000/dictionaries/hello/suggestions?ngr=hond
  30 threads and 64 connections
  Thread Stats   Avg  Stdev Max   +/- Stdev
Latency 7.87ms   28.93ms 456.46ms   95.19%
Req/Sec 1.89k   639.70 4.98k74.75%
  561358 requests in 10.09s, 79.77MB read
Requests/sec:  55630.70
Transfer/sec:  7.90MB

пятница, 2 сентября 2016 г., 11:19:03 UTC+3 пользователь Konrad 'ktoso' 
Malawski написал:
>
> Figured I should link to the 2.4.9 annoucement from this old thread (as it 
> shows up high in google).
> In 2.4.9 we did quite some improvements, annoucement here:
> http://akka.io/news/2016/08/19/akka-2.4.9-released.html  
> 
>
> Highlights of the performance improvements include:
>
>- Overall Akka HTTP throughput and transfer rate has been improved by 
>30-40%
>- Performance is on-par or better than Spray.
>   - Matching it both in raw throughput as well as latency 
>   distribution across a spectrum of request rates.
>   - We measured an overall improvement of ~14% over Spray
>- Short lived connections throughput, which remains to be the 
>worst-case scenario for Akka HTTP thought remains rare in the real world 
>(due to connection pooling), has been doubled.
>- Given our EC2 infrastructure (m4.2xlarge instances) the server 
>currently reaches a maximum of ~160.000 “ping / pong” requests per second 
>(measured using 100 concurrent connections).
>
> Happy hakking!
>
> -- Konrad
>
> W dniu środa, 27 maja 2015 12:44:49 UTC+1 użytkownik zergood napisał:
>>
>> I've done little benchmarks to compare spray and akka-http performance. I 
>> use default jvm and akka settings. So you can see that there is 
>> an significant performance difference between it.
>>
>> code:
>> spray https://gist.github.com/zergood/18bae0adc2e774c31233. 
>> akka-http https://gist.github.com/zergood/53977efd500985a34ea1.
>>
>> versions:
>> spray 1.3.3 
>> akka-http 1.0-RC3
>> scala 2.11.6
>> java 1.8
>>
>> wrk output for spray:
>> Running 1m test @ 
>> http://127.0.0.1:8080/dictionaries/hello/suggestions?ngr=hond
>>   30 threads and 64 connections
>>   Thread Stats   Avg  Stdev Max   +/- Stdev
>> Latency 2.14ms9.82ms  78.22ms   98.22%
>> Req/Sec 2.55k   609.68 4.22k78.12%
>>   4322357 requests in 1.00m, 614.20MB read
>> Requests/sec:  72044.97
>> Transfer/sec: 10.24MB
>>
>> wrk output for akka-http:
>> Running 1m test @ 
>> http://127.0.0.1:3535/dictionaries/hello/suggestions?ngr=hond
>>   30 threads and 64 connections
>>   Thread Stats   Avg  Stdev Max   +/- Stdev
>> Latency 5.39ms6.82ms 108.07ms   92.80%
>> Req/Sec   454.43126.73   679.00 77.77%
>>   811836 requests in 1.00m, 115.36MB read
>> Requests/sec:  13531.62
>> Transfer/sec:  1.92MB
>>
>> Is there any akka-http config options to increase performance to the same 
>> level as spray?
>>
>

-- 
>>  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 http vs Spray performance

2016-09-02 Thread Konrad 'ktoso' Malawski
Figured I should link to the 2.4.9 annoucement from this old thread (as it 
shows up high in google).
In 2.4.9 we did quite some improvements, annoucement here:
http://akka.io/news/2016/08/19/akka-2.4.9-released.html  


Highlights of the performance improvements include:

   - Overall Akka HTTP throughput and transfer rate has been improved by 
   30-40%
   - Performance is on-par or better than Spray.
  - Matching it both in raw throughput as well as latency distribution 
  across a spectrum of request rates.
  - We measured an overall improvement of ~14% over Spray
   - Short lived connections throughput, which remains to be the worst-case 
   scenario for Akka HTTP thought remains rare in the real world (due to 
   connection pooling), has been doubled.
   - Given our EC2 infrastructure (m4.2xlarge instances) the server 
   currently reaches a maximum of ~160.000 “ping / pong” requests per second 
   (measured using 100 concurrent connections).

Happy hakking!

-- Konrad

W dniu środa, 27 maja 2015 12:44:49 UTC+1 użytkownik zergood napisał:
>
> I've done little benchmarks to compare spray and akka-http performance. I 
> use default jvm and akka settings. So you can see that there is 
> an significant performance difference between it.
>
> code:
> spray https://gist.github.com/zergood/18bae0adc2e774c31233. 
> akka-http https://gist.github.com/zergood/53977efd500985a34ea1.
>
> versions:
> spray 1.3.3 
> akka-http 1.0-RC3
> scala 2.11.6
> java 1.8
>
> wrk output for spray:
> Running 1m test @ 
> http://127.0.0.1:8080/dictionaries/hello/suggestions?ngr=hond
>   30 threads and 64 connections
>   Thread Stats   Avg  Stdev Max   +/- Stdev
> Latency 2.14ms9.82ms  78.22ms   98.22%
> Req/Sec 2.55k   609.68 4.22k78.12%
>   4322357 requests in 1.00m, 614.20MB read
> Requests/sec:  72044.97
> Transfer/sec: 10.24MB
>
> wrk output for akka-http:
> Running 1m test @ 
> http://127.0.0.1:3535/dictionaries/hello/suggestions?ngr=hond
>   30 threads and 64 connections
>   Thread Stats   Avg  Stdev Max   +/- Stdev
> Latency 5.39ms6.82ms 108.07ms   92.80%
> Req/Sec   454.43126.73   679.00 77.77%
>   811836 requests in 1.00m, 115.36MB read
> Requests/sec:  13531.62
> Transfer/sec:  1.92MB
>
> Is there any akka-http config options to increase performance to the same 
> level as spray?
>

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