[akka-user] [akka-streams] Handling errors raised in a ZipWith stage

2015-07-20 Thread Radzisław Galler
Hi, I know there is no support for supervision strategy in ZipWith stage, but how would I go about handling errors raised in it if I really need to? I'm trying to add supervision in different places like materializer, and next stages but with no luck. Any ideas? Radek -- >> Read

Re: [akka-user] Re: How can I check the number of the entry actors spawned off by akka ShardRegion?

2015-07-20 Thread Jim Hazen
To increase capacity you'll be scaling out nodes, not shard regions. Shards are logical managers/buckets, they help organize and support the actual processing actors, but it's those actors that are distributed. You'll have one for each unique message destination, regardless of your number of

Re: [akka-user] Re: How can I check the number of the entry actors spawned off by akka ShardRegion?

2015-07-20 Thread Yifei
Thanks Jim, I planned to use the information to monitor the load of the actors and shards. For example, to check if the actors are eating all the resources on this host, if I should scale up the shardregion Also, do you know if I can make the actor run in single-thread mode? As a result, the n

Re: [akka-user] Re: How to debug the code in Future?

2015-07-20 Thread Konrad Malawski
Breakpoints should just work; remember that they're line-by-line based; you may need to split stuff into lines. --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 20 July 2015 at 22:59:01, Maatary Okouya (maatarioko...@gmail.com) wrote: The code i am trying to debug look as such:  def fi

[akka-user] Re: How to debug the code in Future?

2015-07-20 Thread Maatary Okouya
The code i am trying to debug look as such: def filterResultsWithExtractionSettings(conceptResults: ConceptResults): ConceptResults = { import system.dispatcher val mylist: Iterable[Future[List[Concept]]] = for (fieldSettings <- fieldSettingsList if fieldSettings.maxConceptsExtraction >

[akka-user] Re: How to debug the code in Future?

2015-07-20 Thread Maatary Okouya
I am running from within Scalatest. On Monday, July 20, 2015 at 4:49:08 PM UTC-4, Maatary Okouya wrote: > > Hi, > > I am actually using Intellij. > > > I tried to put breakpoint in a future but i get error: > > > java.lang.IllegalAccessError: tried to access field > org.iadb.poolpartyconnector

[akka-user] How to debug the code in Future?

2015-07-20 Thread Maatary Okouya
Hi, I am actually using Intellij. I tried to put breakpoint in a future but i get error: java.lang.IllegalAccessError: tried to access field org.iadb.poolpartyconnector.conceptsrecommendation.RelevantConceptsRecommendationServicePoolPartyImpl$$anonfun$2$$anonfun$apply$1$$anonfun$apply$2$$a

Re: [akka-user] Re: How can I check the number of the entry actors spawned off by akka ShardRegion?

2015-07-20 Thread Jim Hazen
It might be possible to find out, however why is this important to you? The point of Akka cluster sharding is that shard management, handler actor management and message routing, is all transparent. I use this facility in my work and I don't know what nodes are handling what requests (sure I can t

[akka-user] Re: How can I check the number of the entry actors spawned off by akka ShardRegion?

2015-07-20 Thread Yifei
Thanks Jim, It helps a lot. Assuming I have 3 shardRegions running on 3 nodes with the same shard name. Can I know the relationship between a shard and a shardRegion? For example, can I know if shard#3 is under shardRegion@host2? Thanks, Yifei On Monday, July 20, 2015 at 3:16:24 PM UTC-4,

[akka-user] Re: How can I check the number of the entry actors spawned off by akka ShardRegion?

2015-07-20 Thread Jim Hazen
There will be a new actor activated for each unique messageId destination. Messages will arrive at that actor for processing. Actors are grouped into shards, which help manage those actors. If you send 100 messages to unique destinations across your cluster, they'll be handled by 100 unique

[akka-user] How can I check the number of the entry actors spawned off by akka ShardRegion?

2015-07-20 Thread Yifei
Hello everyone, I posted this question in SO but it seems like akka users are not active there. Here I repost the question and hope somebody please help me... Thanks I am trying to setup an Akka cluster. I have 3 hosts: host1, host2, host3 2 seed nodes: seed1 is on host1 and seed2 is on host

Re: [akka-user] akka cluster MemberUp not happening fast enough - Why?

2015-07-20 Thread Amir Karimi
I've experienced the same problem after the second time I run the app. Here is more information: https://groups.google.com/forum/#!topic/akka-user/axqoHHnqC1Q On Friday, July 17, 2015 at 1:14:46 PM UTC+4:30, Konrad Malawski wrote: > > This sounds rather weird – can you provide a bit more details

Re: [akka-user] Problem with TLS with 1.0

2015-07-20 Thread Viktor Klang
Hi Thomas, as I said, I don't have access to a REPL right now. What does "but i cannot use atop on top of the tlsHandler" mean? What did you try, what did the compiler say? How did you adapt the code? Were you able to understand what I meant with my solution? On Mon, Jul 20, 2015 at 5:32 PM, Th

Re: [akka-user] Sharding problem when restarting Cluster

2015-07-20 Thread Zack Angelo
I'm also experiencing this issue intermittently using a JDBC persistence plugin. I'm working on a way to reproduce, but in the meantime, can anyone suggest a way to detect this failure programatically? I'd like our server to fail more visibly when something like this occurs, is there an actor I

[akka-user] Re: How to download large file with Akka-http V1.0-RC4 ?

2015-07-20 Thread alain marcel
Hi and thanks for your attention. Now I am using akka-stream 1.0 and scala 2.11.7 with the same results as previously. New trial : on server side, I replace "iterator" with "SynchronousFileSource" and I have an exception on client side : "IllegalResponseException: Response Content-Length 7

Re: [akka-user] Problem with TLS with 1.0

2015-07-20 Thread Chad Retz
Here is an example from an old version of my project using "atop": https://github.com/cretz/scimap/blob/dcd380e9f003864d768f1069c34b703dc488d10e/src/main/scala/scimap/handler/FlowBuilder.scala#L75. My more recent versions needed conditional TLS so I had to have a more complicated flow: https:/

Re: [akka-user] Akka Streams - How to define a Flow depending on the data coming from the Source? (AKA dinamically)

2015-07-20 Thread Jim Hazen
If you already have the solution it shouldn't be hard to put Streams in front of it to help manage back pressure. Call your code from within the sink and apply whatever flow controls you need to the source ahead of it. -- >> Read the docs: http://akka.io/docs/ >> Che

Re: [akka-user] Problem with TLS with 1.0

2015-07-20 Thread Thomas Zimmer
hey do you have any code-examples? I tried: val wrappedFlow = BidiFlow.wrap(inboundFlow, outboundFlow) but i cannot use atop on top of the tlsHandler val tlsHandler = SslTls(sslContext, session, akka.stream.io.Role.server, closing) On Monday, July 20, 2015 at 5:01:46 PM UTC+2, √ wrote: >

Re: [akka-user] Akka Streams - How to define a Flow depending on the data coming from the Source? (AKA dinamically)

2015-07-20 Thread Joe Edwards
Sounds to me like you want a pooled set of streams for processing your events, with the restriction that events with the same ID must go into the same stream? If that's the case, a FlexiRoute with a fixed set of downstreams should do the job. Then all you need is a way of consistently selecting

Re: [akka-user] Akka Streams - How to define a Flow depending on the data coming from the Source? (AKA dinamically)

2015-07-20 Thread Gabriel Volpe
I don't understand how the FlexiRoute could be the solution. Could you expand the case further? Actually, I'm solving the problem using only Akka Actors and it's quite easy. I have a Controller Actor which has a Map[Long, ActorRef] corresponding to the Event ID and the Processor Actor (child).

Re: [akka-user] Problem with TLS with 1.0

2015-07-20 Thread Viktor Klang
Hi Thomas, I don't have access to a REPL at the moment, what I'd suggest is to use BidiFlow.wrap on your inboundFlow and outboundFlow, then you put that atop the sslbidiflow, and if/when you need to short-circuit the "business end" of the bidiflow you get from the previous steps, add a join with

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread 'Johannes Rudolph' via Akka User List
Hi Adam, yes, that makes sense. The regression was only present in RC4 and introduced with commit d6670db48857af9797e271549750f38b223f4483. Johannes On Mon, Jul 20, 2015 at 4:39 PM, Adam Shannon wrote: > Would https://github.com/akka/akka/issues/17992 have impacted 1.0-M2 ? I > upgraded from M

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread Adam Shannon
Would https://github.com/akka/akka/issues/17992 have impacted 1.0-M2 ? I upgraded from M2 to 1.0 this weekend and I never saw the server dying from these requests. On Mon, Jul 20, 2015 at 9:26 AM, 'Johannes Rudolph' via Akka User List < akka-user@googlegroups.com> wrote: > On Mon, Jul 20, 2015 at

Re: [akka-user] Problem with TLS with 1.0

2015-07-20 Thread Thomas Zimmer
Can you tell me how to setup the correct workflow here? I would like to have: incoming data (tcp) -> tls -> logicFlow.in logicFlow.out -> tls -> outgoing (tcp) Cheers and thanks for the help On Monday, July 20, 2015 at 3:17:49 PM UTC+2, √ wrote: > > A Flow is a graph with 1 input and 1 output

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread 'Johannes Rudolph' via Akka User List
On Mon, Jul 20, 2015 at 3:59 PM, Nicolau Werneck wrote: > It is unfortunate that I missed my error logs, but I'm glad you guys are > taking a look at this! > > I confirmed that removing the Host header with curl just gives a 400, so it > can't but just this. I was using 1.0-RC4, so maybe it was re

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread Nicolau Werneck
It is unfortunate that I missed my error logs, but I'm glad you guys are taking a look at this! I confirmed that removing the Host header with curl just gives a 400, so it can't but just this. I was using 1.0-RC4, so maybe it was related to #17992? Thanks, ++nic On Monday, July 20, 2015 a

Re: [akka-user] Akka Streams - How to define a Flow depending on the data coming from the Source? (AKA dinamically)

2015-07-20 Thread Konrad Malawski
I think you might want to use a FlexiRoute http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-customize.html#Using_FlexiRoute And in it you'd decide "which way the element should go". You'd have 2 outputs from it, one being the async path, and the other one the other path. A

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread 'Johannes Rudolph' via Akka User List
On Mon, Jul 20, 2015 at 3:37 PM, André wrote: > I think the problem here is that we currently "absolutize" all requests > (code). > > This will always fail with HTTP/1.0 request as they are always relative and > don't carry a host header. > > I think the requestPreparation Flow in HttpServerBluePr

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread Adam Shannon
Johannes, Yes, that seems to be the only issue left that I have. I'm not sure if Nicolau is having any other issues. On Mon, Jul 20, 2015 at 8:33 AM, 'Johannes Rudolph' via Akka User List < akka-user@googlegroups.com> wrote: > Hi Adam, > > On Mon, Jul 20, 2015 at 3:25 PM, Adam Shannon > wrote:

Re: [akka-user] [akka-streams] Feedback on the design of Akka Streams

2015-07-20 Thread Konrad Malawski
Ok, so these have now be converted into PRs, thanks a lot netcomm! On Fri, Jul 17, 2015 at 5:44 PM, netcomm <1054618...@qq.com> wrote: > Shapes describe what you can connect to things,maybe use 'Connector' is > more Accurate, just a suggest, if i miss something, please correct me! > > 在 2015年7月17

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread André
I think the problem here is that we currently "absolutize" all requests ( code ). This will always fail with HTTP/1.0 request as they are always relativ

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread 'Johannes Rudolph' via Akka User List
Hi Adam, On Mon, Jul 20, 2015 at 3:25 PM, Adam Shannon wrote: > "All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) > status code to any HTTP/1.1 request message which lacks a Host header > field." > > Is from RFC 2616 > > I can confirm (the gist above) that akka-http is do

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread Adam Shannon
Viktor, "All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) status code to any HTTP/1.1 request message which lacks a Host header field." Is from RFC 2616 I can confirm (the gist above) that akka-http is doing that with curl -H "host:" However, what I haven't confirmed ye

Re: [akka-user] Problem with TLS with 1.0

2015-07-20 Thread Viktor Klang
A Flow is a graph with 1 input and 1 output, you are connecting the bidiflow (2 inputs and 2 outputs) to eachother, leaving no inputs nor outputs open, which means it cannot be a Flow. On Mon, Jul 20, 2015 at 2:58 PM, Thomas Zimmer wrote: > Hey, > > I really have problems understanding the TLS B

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread Viktor Klang
Adam, you'd like Akka Http to respond with a 400 in case Host is omitted? What does the spec mandate? On Mon, Jul 20, 2015 at 3:09 PM, Adam Shannon wrote: > Viktor, > > My main concern here has been the throwing of exceptions. It was a bit > confusing to see that (along with "Internal server e

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread Adam Shannon
Viktor, My main concern here has been the throwing of exceptions. It was a bit confusing to see that (along with "Internal server error, sending 500 response") when it seems akka-http is handling this fine. It seems like when trying to re-produce this with curl akka-http responds with a 400 as pe

[akka-user] Problem with TLS with 1.0

2015-07-20 Thread Thomas Zimmer
Hey, I really have problems understanding the TLS Bidi-Flows. The specs are not very helpful as they only do "echo" the input as fas as I understood and there is not official documentation. What I have so far: * A TCP flow (Flow[ByteString, ByteString]) * A logical flow (Flow[ByteString, ByteSt

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread Johannes Rudolph
Hi, On Sunday, July 19, 2015 at 10:43:07 PM UTC+2, Adam Shannon wrote: > > I have some logs of this happening to me as well. I'm running on EC2 in > us-east-1. I've got nginx and elb in front of these akka-http instances. > Here's a few stack traces from the instances as well as nginx access log

Re: [akka-user] Re: Server attacked. What could have been done?

2015-07-20 Thread Viktor Klang
Hi Adam, What should it do instead of throwing the exception? (In case it is legal according to the HTTP spec please point the section out to me, thanks!) On Mon, Jul 20, 2015 at 7:08 AM, Adam Shannon wrote: > I wouldn't say undesired behavior so much as something that we should work > to fix w