Re: [akka-user] Akka -- correct structure: advice for a novice

2016-08-28 Thread Konrad Malawski
Hi there, let me give you a perhaps surprising, but very real advice: don't solve problems you don't have. Unless you've proven you're bottleneck is the router (which I doubt that will be the bottleneck), go with the simplest thing that solves your problem – in your case it's simply creating a clus

Re: [akka-user] MalformedRequestContentRejection - typed error messages

2016-08-28 Thread Konrad Malawski
Hi Tim, I'm sorry but I don't quite get what you're after here? Since you never know where your handler will be used, there is no way to have it strictly typed. The exception handler should match on the type you're expecting and then do stuff with it. HTH On Thu, Aug 18, 2016 at 5:48 PM, Tim Pigd

Re: [akka-user] Re: Issue with default query parameters and custom unmarshalling

2016-08-28 Thread Konrad Malawski
I'm not able to reproduce, if you could post a reproducer as akka/akka issue then we'd be able to look at it. Thanks in advance On Mon, Aug 22, 2016 at 9:35 PM, wrote: > Good thought, though I checked and do not. Are you able to reproduce this > behavior? > > On Monday, August 22, 2016 at 11:26:

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 A

[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

Re: [akka-user] Akka Multithreading on Akka-Cluster

2016-09-05 Thread Konrad Malawski
This is not really enough information to say where or what the bottlenecks are. If you need a full architecture overview that's a commercial thing we can offer. Having that said, you did not mention what HTTP server you're using. Actors are simply multiplexed onto threads, so if you're doing block

Re: [akka-user] akka serialization - message boundary

2016-09-06 Thread Konrad Malawski
Hi there, not quite. If you use java serialization of X that contains Y things, then Java serialization serializes the entire thing. For example, if you serialized a List using java serialization, it also will serialize the things inside the list - that's how it works. Akka always wraps your seria

Re: [akka-user] akka serialization - message boundary

2016-09-06 Thread Konrad Malawski
This document talks about serialization in the context of persistence, but many of the patterns are the same for remoting: http://doc.akka.io/docs/akka/snapshot/scala/persistence-schema-evolution.html -- Konrad `ktoso` Malawski Akka @ Lightbend On 6 Septe

Re: [akka-user] Akka HTTP performance in 2.4.9

2016-09-06 Thread Konrad Malawski
Without looking at the code, two things to fix right away in your methodology: 1) You're running `ab` without persistent connections (also known as "useless mode"). Please run: `ab -k` to use keep-alive connections, which is what all http clients and browsers do. 2) Please do not benchmark using

Re: [akka-user] Any form of first-try / first-peek at Artery Akka remoting ?

2016-09-08 Thread Konrad Malawski
Yes we're working on it. Yes there's releases, just use them ;-) See 2.4-ARTERY versions: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.typesafe.akka%22%20AND%20a%3A%22akka-remote_2.11%22 -- Konrad `ktoso` Malawski Akka @ Lightbend On 8 September

Re: [akka-user] Configuration of SerializationBindings Programmatically?

2016-09-09 Thread Konrad Malawski
parseMap +1 -- Konrad `ktoso` Malawski Akka @ Lightbend On 9 September 2016 at 22:10:33, Viktor Klang (viktor.kl...@gmail.com) wrote: ConfigFactory.parseMap? -- Cheers, √ On Sep 9, 2016 22:01, "kraythe" wrote: > Yeah, that much I know. However, I have

Re: [akka-user] Enjoying Akka HTTP performance

2016-09-12 Thread Konrad Malawski
Hi Adam, thanks for sharing the runs! Your benchmarking method is good - thanks for doing a proper warmup and using wrk2 :-) Notice that the multiple second response times in node basically mean it's not keeping up and stalling the connections (also known as coordinated emission). It's great to se

Re: [akka-user] Enjoying Akka HTTP performance

2016-09-12 Thread Konrad Malawski
). I mean that node is slower than akka-http isn't something I wonder about. You'd be surprised what node people claim about its performance ;-) Am Montag, 12. September 2016 12:12:29 UTC+2 schrieb Konrad Malawski: > > Hi Adam, > thanks for sharing the runs! > Your bench

Re: [akka-user] Enjoying Akka HTTP performance

2016-09-12 Thread Konrad Malawski
gt;>> >>> >>> >>> Am Montag, 12. September 2016 14:52:48 UTC+2 schrieb √: >>>> >>>> What does wrk2 say? >>>> >>>> On Mon, Sep 12, 2016 at 2:37 PM, Christian Schmitt < >>>> c.sc...@briefdomain.de> wrote

Re: [akka-user] Akka Http Logging with traceId

2016-09-13 Thread Konrad Malawski
Reactive Monitoring is able to propagate MDC across Actors: https://www.lightbend.com/products/monitoring -- Konrad `ktoso` Malawski Akka @ Lightbend On 13 September 2016 at 08:57:24, Arun (sethia.a...@gmail.com) wrote: Thanks Jan. I am looking for somet

Re: [akka-user] OneForOneStrategy thread safety

2016-09-15 Thread Konrad Malawski
That depends what you do inside it though. My itself it is safe, it's just a function pretty much. Unless you side effect inside it it's fine. On 15 Sep 2016 4:47 p.m., "Wei" wrote: > Hello, > > Is OneForOneStrategy class thread safe? Can I share one instance of this > class with multiple actors

Re: [akka-user] [Akka-HTTP] Request for comment - Post render regex modifier

2016-09-19 Thread Konrad Malawski
Hi Derek, could you re-post this on github.com/akka/akka-http? I want to have a look but having a very chaotic week - it'd help me/us to have it as ticket - easier to find and come back to it than on akka-user. I think we should be able to help in some way or another if servers are doing "weird st

Re: [akka-user] [Akka-HTTP] Request for comment - Post render regex modifier

2016-09-19 Thread Konrad Malawski
6 at 2:53:59 PM UTC-4, Konrad Malawski wrote: > > Hi Derek, > could you re-post this on github.com/akka/akka-http? > I want to have a look but having a very chaotic week - it'd help me/us to > have it as ticket - easier to find and come back to it than on akka-user. > > I t

Re: [akka-user] Scala Akka Alignment

2016-09-20 Thread Konrad Malawski
You can see which version of Scala an Akka artifact is released for by looking at the artifact names: http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22akka-remote_2.11%22 So as you see, it's released for 2.11. That you're talking about jar files makes me thing you're mixing different akka versio

Re: [akka-user] [Akka Stream] Happens-before relation and runForEach

2016-09-20 Thread Konrad Malawski
final Source source = // ... final MutableInt max = new MutableInt(Integer.MIN_VALUE); final Procedure f = i -> { if (i > max.intValue()) { max.setValue(i); } }; final CompletionStage result = source .runForeach(f, materializer) .thenApply(__

Re: [akka-user] Streams - Tcp outgoing reconnecting

2016-09-22 Thread Konrad Malawski
Please check akka/* repositories :-) Such as akka/akka-stream-contrib – akka-contrib-extra is not a supported thing and was mostly driven by conductr some time ago, not very alive right now. In fact, we do have new reconnection facilities in that repo: https://github.com/akka/akka-stream-contrib/b

Re: [akka-user] How could I know if a streams completed from the outside

2016-09-26 Thread Konrad Malawski
Have you seen watchTermination on Source? /** * Materializes to `Future[Done]` that completes on getting termination message. * The Future completes with success when received complete message from upstream or cancel * from downstream. It fails with the same error when received error message fr

Re: [akka-user] Akka HTTP Stream listener stops processing databytes after a while

2016-09-28 Thread Konrad Malawski
Add a log() stage to the flow. -- Konrad `ktoso` Malawski Akka @ Lightbend On 28 September 2016 at 14:21:28, Tal Beno (tal.b...@gmail.com) wrote: I have an app which has 3 HTTP listeners like this one: val futureResponse1: Future[HttpResponse] = Http()

Re: [akka-user] Unmarshalling using javadsl

2016-09-28 Thread Konrad Malawski
If you're a Java user I'm not quite sure how you arrived at the concept of per request actors, esp implemented like that. a) This won't work - completing must be done in a route. And ... b) use the entityAs() directive, it is documented, please check the docs. Also: http://doc.akka.io/docs/akka/

Re: [akka-user] how to enable secure tcp socket connection on server side in Akka

2016-09-29 Thread Konrad Malawski
Please refer to the documentation: http://doc.akka.io/docs/akka/2.4.10/java/http/server-side-https-support.html#ssl-config-java It has a nice search box which you can use to search for "SSL". -- Konrad `ktoso` Malawski Akka @ Lightbend On 29 September 201

Re: [akka-user] Understanding akka.http.server.max-connections

2016-09-29 Thread Konrad Malawski
Number of open connections. Not websockets, but connections in general, AFAIR. On 29 Sep 2016 7:38 p.m., "Federico Nusymowicz" wrote: My websocket server will maintain many (mostly idle) connections. Does `akka.http.server.max-connections` place a limit on the number of open websockets? Or is

Re: [akka-user] akka 2.4.10 - connection reset by peer when consuming stream with parallelism == 1

2016-09-30 Thread Konrad Malawski
That means the other side has closed the connection. It could be an idle timeout. Are you sure data is consistently flowing, and not being idle for minutes? On 30 Sep 2016 16:59, "Eric Torti" wrote: > Hey guys, > > I am new to akka streams so I may be missing something big here. Using > akka-str

Re: [akka-user] Control how much cpu are used by the actor system?

2016-09-30 Thread Konrad Malawski
That's what containers are for though. Run your jvm in a container and restrict resources available to that one On 30 Sep 2016 19:48, "Roland Kuhn" wrote: > Hi Jean-François, > > the JVM does not offer the functionality you seek, you'll have to use your > operating system’s capabilities to restr

Re: [akka-user] Re: Memory leak: unexpected mailbox filling up

2016-10-06 Thread Konrad Malawski
That problem does not happen in Akka Streams, it explicitly manages flow-control by the way. On Thu, Oct 6, 2016 at 10:03 AM, Viktor Klang wrote: > Of course it builds up if you can't process the messages equal-or-faster > than you get them? > > -- > Cheers, > √ > > On Oct 6, 2016 09:49, "Alexan

Re: [akka-user] Re: Completion of a Graph with a Cycle

2016-10-12 Thread Konrad Malawski
Have you seen http://doc.akka.io/docs/akka/2.4/scala/stream/stream-dynamic.html#Controlling_graph_completion_with_KillSwitch ? -- Konrad `ktoso` Malawski Akka @ Lightbend On 12 October 2016 at 15:42:01, external.stefan.wach...@bosch-si.com ( external.stef

Re: [akka-user] Akka stream - implements Pause/Resume

2016-10-14 Thread Konrad Malawski
Please read this: - http://blog.akka.io/integrations/2016/08/29/connecting-existing-apis - and this: http://doc.akka.io/docs/akka/2.4/scala/stream/stream-customize.html Specifically, your trigger should be implemented as async-callback, as it comes from the outside but should "wake up" the stage t

Re: [akka-user] Re: Akka stream - implements Pause/Resume

2016-10-14 Thread Konrad Malawski
Have you read the blog post? In the async callback you can push(), that's what I meant. -- Konrad `ktoso` Malawski Akka @ Lightbend On 14 October 2016 at 10:11:09, Konrad 'ktoso' Malawski (ktos...@gmail.com) wrote: Please read this: - http://blog.akka.io/

Re: [akka-user] Type mismatch, expected: ToResponseMarshallable, actual: HttpEntity.Strict

2016-10-16 Thread Konrad Malawski
Make sure you have the latest version of the scala plugin. And I'd rather ask such questions on the Intellij issue tracker. Akka itself is doing the right thing as you mentioned... :) -- Konrad `ktoso` Malawski Akka @ Lightbend On 16 October 2016 at 15:4

Re: [akka-user] Re: ANNOUNCE: Akka HTTP 3.0.0-RC1

2016-10-18 Thread Konrad Malawski
ub.com/akka/akka-http/milestone/1?closed=1> milestone on > github. > > For this release we had the help of 14 committers – thank you! > > A special thanks to Jonas Fonseca <https://github.com/jonas> who did a > tremendously awesome job at migrating all the docs from s

Re: [akka-user] Re: ANNOUNCE: Akka HTTP 3.0.0-RC1

2016-10-18 Thread Konrad Malawski
ttp://doc.akka.io/docs/akka-http/current/scala/http/introduction.html still says: Akka HTTP is provided in a separate jar file, to use it make sure to include the following dependency: "com.typesafe.akka" %% "akka-http-experimental" % "3.0.0-RC1" — Eric On Oct 1

Re: [akka-user] Re: ANNOUNCE: Akka HTTP 3.0.0-RC1

2016-10-18 Thread Konrad Malawski
he following dependency: "com.typesafe.akka" %% "akka-http-experimental" % "3.0.0-RC1" — Eric On Oct 18, 2016, at 10:42, Konrad Malawski wrote: Yes, that's what all the fuss is about ;-) In fact, in RC it's already removed: http://search.maven.org/#artifactdetails%7C

Re: [akka-user] Re: [akka-stream] Problems with the shape creation

2016-10-19 Thread Konrad Malawski
Shapes don't need separate java or scala api, it's shared. You can just subclass a shape and make a class that directly represents your shape. If you want AmorphousShape then sure, but please note that it's purpose is to "forget about the types of those". If you want a well typed one simply exten

Re: [akka-user] Re: ANNOUNCE: Akka HTTP 3.0.0-RC1

2016-10-19 Thread Konrad Malawski
ssues can be found on the 3.0.0-RC1 > <https://github.com/akka/akka-http/milestone/1?closed=1> milestone on > github. > > For this release we had the help of 14 committers – thank you! > > A special thanks to Jonas Fonseca <https://github.com/jonas> who did a > tre

Re: [akka-user] Is contents of GraphDSL.create() {..} thread-safe for BidiFlow?

2016-10-19 Thread Konrad Malawski
This is not safe, outbound and inbound flows could be executing on different threads. It's not a question about the the DSL being safe - that's fine as it's only constructing stuff, but the graph you constructed is accessing shared state from (potentially) different threads - thus it is not safe.

Re: [akka-user] Re: Fetching remote file via akka-http singleRequest results in extremely high allocation rate

2016-10-19 Thread Konrad Malawski
Hi Vladyslav, firstly, no reason to get desperate :-) Glad you did some profiling, it would be super helpful next time around if you share more details about both your code an profile you're observing. It's hard to give advice what can be improved when given a blank canvas (no idea what your code l

Re: [akka-user] Re: withSupervisionStrategy passed a japi Function but compiler complains that its expecting a scala Function1

2016-10-26 Thread Konrad Malawski
Well that's exactly the thing we fixed. As you've found in the docs. We'll release a stable this week, please upgrade then. -- Konrad `ktoso` Malawski Akka @ Lightbend On 26 October 2016 at 13:29:52, murtuza chhil (chil...@gmail.com) wrote: Still looking

Re: [akka-user] Are messages published in an Akka Distributed Publish Subscribe cluster using a full or partial mesh?

2016-10-27 Thread Konrad Malawski
Given 3 nodes. And 30 actors in total. On node 1 only 3 actors subscribe to the topic, on node 2 all 10 actor subscrtibe to the topic, and on node 3 none do. When you emit a message from the node 2 into pubsub... There will be exactly 1 remote message sent - to node 1, from there on, locally it wi

Re: [akka-user] Are messages published in an Akka Distributed Publish Subscribe cluster using a full or partial mesh?

2016-10-27 Thread Konrad Malawski
6 at 00:57:22, Francis Reed (francis.r...@gmail.com) wrote: how about 30 nodes (machines) with a single actor on each all subscribed to the same topic. If node 1 sends a message to the pubsub on that topic, will 29 messages be sent (one to each node with 1 actor) ? On Thursday, October 27, 2016 at 6:52:3

Re: [akka-user] Are messages published in an Akka Distributed Publish Subscribe cluster using a full or partial mesh?

2016-10-27 Thread Konrad Malawski
ub-sub directly :) But not pub-sub, it's directly implemented on plain remoting. -- Konrad `ktoso` Malawski Akka <http://akka.io> @ Lightbend <http://lightbend.com> On 28 October 2016 at 00:58:22, Konrad Malawski ( konrad.malaw...@lightbend.com) wrote: Yes, the nodes need to get

[akka-user] ANNOUNCE: Akka 2.4.12 Released!

2016-10-28 Thread Konrad Malawski
The complete list of closed issues can be found on the 2.4.12 <https://github.com/akka/akka/milestone/98?closed=1> milestones on github. For this release we had the help of 26 committers – thank you all very much! Credits: commits added removed 13 2,197 103,612 Konrad Malawski

Re: [akka-user] Website Correction / http://akka.io/docs/

2016-11-06 Thread Konrad Malawski
Thanks for the PR Ivan, it's so nice to see someone actively participate in fixing things :-) Yep, it's as Ivan said, small typo - now fixed. Cheers! -- Konrad `ktoso` Malawski Akka @ Lightbend On 5 November 2016 at 11:03:36, Ivan Vyshnevskyi (sain...@gma

Re: [akka-user] Re: Exposing Akka actors through a REST API

2016-11-11 Thread Konrad Malawski
So my question is if there is some framework or library to easily do this mapping, from the REST end-points to the corresponding ActorRefs... I've seen people do that, however I'd argue it's a terrible anti-pattern to just "expose whatever internal state you have onto the HTTP APIs". It's like po

Re: [akka-user] Re: Exposing Akka actors through a REST API

2016-11-13 Thread Konrad Malawski
I think we misunderstood each other somehow. I understood your goal is to have "one route" that somehow directly routes requests to representative actors (somehow it sounded to me like you have deep hierarchies you want to expose like that). In that sense the "route" would be driven by the structu

Re: [akka-user] terminate actor

2016-11-17 Thread Konrad Malawski
Hi there, Read the docs on stopping actors please: http://doc.akka.io/docs/akka/snapshot/scala/actors.html#Stopping_actors E.g. it'd be context.stop(self) inside the actor. The order in which you shut things down also does not really make much sense: - you shut down the entire actor system, - but

Re: [akka-user] Problems with Persistence when rolling nodes.

2016-11-18 Thread Konrad Malawski
Depends if you down them or not. Please read up on downing (split brain resolver docs are also a great read), don't use auto-downing but do use cluster.leave() or .down() to down nodes, then balancing happens. -- Konrad `ktoso` Malawski Akka @ Lightbend On

Re: [akka-user] Entity streaming

2016-11-21 Thread Konrad Malawski
Thanks for reporting Richard - seems there's a bug somewhere, I'm looking into it. Seems it doesn't compose nicely with existing predefined primitive marshallers (like String here), if it was wrapped in a type (say Thing("One") then it works, which is what all our tests were doing). Please track t

Re: [akka-user] Entity streaming

2016-11-21 Thread Konrad Malawski
ion on this. PS: For case classes, e.g. using spray-json or any json library to generate the marshallers (see akka-http-json) it'll work properly. On Mon, Nov 21, 2016 at 3:47 PM, Konrad Malawski < konrad.malaw...@typesafe.com> wrote: > Thanks for reporting Richard - seems th

Re: [akka-user] Understanding scala.concurrent.Await#result

2016-11-22 Thread Konrad Malawski
Why would it – the 42 is completed immediately. It'd be different if you'd say Future { Thread.sleep(...); 42 } that actually makes the future take a long time. Your first example just takes "a long time, to get to an immediately completing future. The timeout is on the Future, not on "getting to

Re: [akka-user] ActorSelection.resolveOne from Java

2016-11-24 Thread Konrad Malawski
This was just added a few days ago: https://github.com/akka/akka/commit/693cb6a58b1b67a2126c249911d02022c34d014a#diff-8b5bd26200f1856e0b577c0a124e3e7aR95 Would be nice if you could PR docs in the place where you expected it perhaps? -- Konrad `ktoso` Malawski Akka @ Lightbend <

Re: [akka-user] ActorSelection.resolveOne from Java

2016-11-24 Thread Konrad Malawski
ouple of minutes later today to do it. > > Tal > > > On Thursday, November 24, 2016 at 10:57:36 AM UTC+2, Konrad Malawski wrote: >> >> This was just added a few days ago: >> https://github.com/akka/akka/commit/693cb6a58b1b67a2126c2499 >> 11d02022c34d014a#diff-8b5bd26

Re: [akka-user] Re: Ramifications of calling Await.result in akka http

2016-11-26 Thread Konrad Malawski
Hi there, 3 styles answers to the question :-) *Short version:* Don't do it. Blocking the default dispatcher is a very very very bad thing, do it on a dedicated dispatcher. *Documentation version: * First, this is very well documented here: http://doc.akka.io/docs/akka-http/current/scala/http/han

Re: [akka-user] Re: How can Akka HTTP be configured to accept more concurrent connections?

2016-11-30 Thread Konrad Malawski
Thanks for the info that it was a Mac issue. Always benchmark on the actual hardware you'll be deploying to (usually linux) if checking scalability / performance :) -- Konrad `ktoso` Malawski Akka @ Lightbend On 30 November 2016 at 17:25:08, Benjamin Geer

Re: [akka-user] akka networking for thousands of small messages

2016-12-02 Thread Konrad Malawski
Hi, anyone knows if say I got 2 actors which send very quickly thousands of small messages between them. Millions of small messages is the happy case for Akka - this is exactly what Actors love :-) We've reached 700k+ 100byte sized messages per second on the new remoting recently, and aim to stil

Re: [akka-user] (akka-http) server.max-connections vs max socket opening/s

2016-12-06 Thread Konrad Malawski
Your benchmark is likely unrealistic - it should use consistent connections to give any kind of realistic numbers (clients always keep connections). ab is also not the best tool around (hasn't been since a long time), please try `wrk`. Your benchmark is effectively benchmarking materialization tim

Re: [akka-user] (akka-http) server.max-connections vs max socket opening/s

2016-12-06 Thread Konrad Malawski
Before using ab I was stressing the app with Gatling which does not reuse connections between users. In order to simplify my demonstration I switched to ab without keepalive to keep the same scenario. I will have a look to wrk. Please do remember to benchmark not the same box on which you're runni

Re: [akka-user] Akka Stream stalling with JsonFraming

2016-12-06 Thread Konrad Malawski
Is the JSON well formed and "normal" or something weird or maybe huge objects or something in there etc? Try to debug at which point it gets stuck. A minimized reproducer would help. -- Konrad `ktoso` Malawski Akka @ Lightbend On 6 December 2016 at 20:26:

Re: [akka-user] Akka Stream stalling with JsonFraming

2016-12-07 Thread Konrad Malawski
Excellent, thanks! -- Konrad `ktoso` Malawski Akka <http://akka.io> @ Lightbend <http://lightbend.com> On 7 December 2016 at 05:53:10, subo...@gmail.com (subo...@gmail.com) wrote: I figured it out. Submitting a pull request! On Tuesday, December 6, 2016 at 12:29:28 PM UTC-7, Kon

Re: [akka-user] Persistence with Avro

2016-12-09 Thread Konrad Malawski
Hi Richard, I fear not that many people use Avro. But I can in general answer your question about SerializerWithStringManifest - yeah it's usually the right way, since it's the most evolvable (you could even remove classes since it's not keyed by classes strictly). So that seems fine. Making sure

Re: [akka-user] Optimal Size Exploring Resizer vs default resizer when to use which one?

2016-12-09 Thread Konrad Malawski
I'd suggest trying out both and see what works for your use case. The exploring one will take some time to find the optimal spot so it may fluctuate a while until it finds that. We did not hear back much from users about it - would be very interesting to hear your feedback from testing - thanks in

Re: [akka-user] min-nr-of-members not getting applied

2016-12-09 Thread Konrad Malawski
Hi Richard, no, nothing special other than setting this. Some questions to help debugging this: - are you joining the nodes via seed-nodes? - are you sure the nodes have the role? - are you sure the configuration is being picked up? 1. final ActorSystem system = ActorSystem.create(); 2. Sys

Re: [akka-user] min-nr-of-members not getting applied

2016-12-09 Thread Konrad Malawski
+1, yes please! They're all binary and semantics compatible so there's no risk in upgrading. On Fri, Dec 9, 2016 at 3:20 PM, Endre Varga wrote: > .. and, please always use the latest version, which is 2.4.14 in this case. > > On Fri, Dec 9, 2016 at 3:19 PM, Konrad Malaws

Re: [akka-user] Re: How to force remove node from cluster?

2016-12-09 Thread Konrad Malawski
Have you tried issuing Down to that node via JMX (connecting to a different one of course)? On Dec 9, 2016 17:11, "Valery Dubrava" wrote: > Maybe there is a way to get more information about the problem? Could > somebody just give me a direction to digging? > > -- > >> Read the docs: htt

Re: [akka-user] Persistence with Avro

2016-12-09 Thread Konrad Malawski
Protobuf, sometimes JSON are the dominating ones I think. -- Konrad Malawski On 9 December 2016 at 18:33:42, Richard Rodseth (rrods...@gmail.com) wrote: > Yes, I've read the docs. Would you say most Lightbend customers use > Protobuf? I was leaning towards Avro since it seems to be

Re: [akka-user] Issue with akka-http-cors and headerValueByName

2016-12-12 Thread Konrad Malawski
The best place to ask would probably be: https://github.com/lomigmegard/akka-http-cors/issues The issue seems indeed a bit weird, best to ask its maintainer. -- Konrad `ktoso` Malawski Akka @ Lightbend On 12 December 2016 at 10:59:40, Vincent B (elsene...@

Re: [akka-user] How to observe back-pressure in akka stream

2016-12-14 Thread Konrad Malawski
Hi Alex, monitoring of streams is in our roadmap - we have all the building blocks prepared and know we can do way better monitoring than any rx-like technology, sadly the feature of monitoring itself is not out yet - please bear with us while we work on it through 2017. If you're interested in ea

Re: [akka-user] akka streams graph is not fully drained when Future[Done] completes

2016-12-16 Thread Konrad Malawski
My crystal ball tells me you may be observing timing artifacts which originate from the fact that you println one thing, but log the other. So there will be a timing difference when one or the other actually hits System.out. Agree with Viktor though, reproducers please for such cases :) -- Konr

Re: [akka-user] Newbie Question: akka cluster and auto rebalancing

2016-12-16 Thread Konrad Malawski
Welcome to Akka. Firstly, Hazlecast and Akka are not really the same beast. Akka is not "just a cache", it's active entities doing things - i.e. Actors, similar to like Erlang works with processes. So it may help to change the mindset a bit, since it's not a cache. It can however model very similar

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Konrad Malawski
Either of the two work. Use ask to integrate with the Actor. The complete has to be in the route - yes. This is a feature we added while we reflected on this while moving Spray to become Akka HTTP. In Spray people would forget to call complete() and it would still compile, now you have to complete

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Konrad Malawski
ete it where you want? -- Cheers, √ On Dec 20, 2016 10:40 AM, "Konrad Malawski" wrote: > Either of the two work. Use ask to integrate with the Actor. > > The complete has to be in the route - yes. This is a feature we added > while we reflected on this while moving Spray to b

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Konrad Malawski
sl.server.RequestContext => scala.concurrent.Future[akka.http.scaladsl.server.RouteResult] case Success(result) => ctx.complete(StatusCodes.OK) On Tuesday, December 20, 2016 at 11:40:56 AM UTC+2, Konrad Malawski wrote: > > Either of the two work. Use ask to integrate with the

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Konrad Malawski
wrote: I'm not sure but maybe this article could help you on "how to complete a request directly from an actor" : https://markatta.com/codemonkey/blog/2016/08/03/actor-per-request-with-akka-http/ On Tuesday, December 20, 2016 at 12:46:18 PM UTC+1, Konrad Malawski wrote: > >

Re: [akka-user] Completing request outside of main controller

2016-12-20 Thread Konrad Malawski
1:29 PM UTC+2, Julien L. wrote: > > I'm not sure but maybe this article could help you on "how to complete a > request directly from an actor" : https://markatta.com/ > codemonkey/blog/2016/08/03/actor-per-request-with-akka-http/ > > > > On Tuesday, Decemb

Re: [akka-user] Completing request outside of main controller

2016-12-21 Thread Konrad Malawski
y from an actor" : https://markatta.com/ > codemonkey/blog/2016/08/03/actor-per-request-with-akka-http/ > > > > On Tuesday, December 20, 2016 at 12:46:18 PM UTC+1, Konrad Malawski wrote: >> >> As I've said, this is a feature in comparison with Spray. >> We ex

Re: [akka-user] Re: akka-http route question

2016-12-22 Thread Konrad Malawski
Glad you found it. If you care about efficiency please use the log.warning("[{}] with [{}]", req.uri, req.method.value) style of logging, it does not needlessly allocate/build strings if a given log level is disabled. Also mentioned as one of my akka tips in the zen of akka talk: https://www.youtub

RE: [akka-user] Completing request outside of main controller

2016-12-22 Thread Konrad Malawski
On 21 December 2016 at 14:04:04, Sidney Feiner (sidney.fei...@startapp.com) wrote: Done J You mean, as in pull-request? (Thanks a ton if so!) Didn't see any come in hm... Did you submit the PR? -- Konrad -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >>

Re: [akka-user] Scaling Akka Streams

2016-12-23 Thread Konrad Malawski
Your question is overly generic to give a specific answer I'm afraid. Yes, you can very easily spread processing load by using Akka Cluster, Cluster Sharding and yes those could run Akka Streams. But the exact implementation and guidelines would depend on the exact semantics you're trying to achiev

Re: [akka-user] Keep-Alive header

2016-12-24 Thread Konrad Malawski
Share your code. What are you doing and what's the expected outcome. On Dec 24, 2016 09:00, "Alan Burlison" wrote: > I'm using akka-http to implement a REST server and despite what the > documentation says, it isn't adding a keep-alive header despite the client > setting the appropriate headers.

Re: [akka-user] RESTCONF streaming for events can be enabled on akka.http.

2016-12-26 Thread Konrad Malawski
RESTCONF seems rather very technology specific... First time I see it mentioned to be honest. What are you trying to achieve? -- Konrad Malawski On 26 December 2016 at 10:37:59, aarti (leoartsha...@gmail.com) wrote: > Hi, > Can anyone guide me how can we enable RESTCONF streaming for eve

Re: [akka-user] How to decline a particular SnapshotOffer on recovery?

2016-12-29 Thread Konrad Malawski
There is no way to "reject but try a different snapshot". The offered snapshot is the latest one matching the criterium, and you either use it or not - "ignoring it". There's no "yeah not that one but another one". How would the lib know what you're looking for? Keep offering all snapshots you pos

Re: [akka-user] Correct way to "wait" for polling elements from a Source in Akka Streams

2016-12-30 Thread Konrad Malawski
Read the docs about GraphStage and custom stream processing elements. It had all the utilities needed for this. We also explained them on the Akka blog: Akka.io/blog so check that out :) On Dec 30, 2016 23:29, "Drew Kutcharian" wrote: > Hi, > > I have a use case where I poll a datasource for ite

Re: [akka-user] How to call a Future-based test from a Route?

2016-12-31 Thread Konrad Malawski
Have you seen the complete list of directives? There's many directives with "Async" that means that they work on Futures. http://doc.akka.io/docs/akka-http/10.0.1/scala/http/routing-dsl/directives/alphabetically.html -- Konrad `ktoso` Malawski Akka @ Lightbend

Re: [akka-user] Pause Reading/Request with FileIO

2017-01-02 Thread Konrad Malawski
There is no "all at once here" it's processing line by line, pulling more data as needed. I don't see why you're worried about the all-at-once – that's exactly what Akka Streams solve, it is bounded memory processing of that file. Amount of data in memory will be chunk-size * number of buffers (bet

Re: [akka-user] JavaTestKit, Probes and ExpectMsg

2017-01-02 Thread Konrad Malawski
Akka's Testkit is not meant to replace existing matcher libraries such as junit, testng, hamcrest or fest-assert. Simply use the existing testing libraries with the testkit. If you want better assertions simply val msg = expectMsgType... and apply your assertions on it then. In short: Akka's testk

Re: [akka-user] How to call a Future-based test from a Route?

2017-01-02 Thread Konrad Malawski
Yup, should roll :) How about sharing in a blog or docs about how to go about building such? I think that'd be very interesting to people who're faced similar questions as you were just a few days ago :) -- Konrad `ktoso` Malawski Akka @ Lightbend On 2 Ja

Re: [akka-user] Pause Reading/Request with FileIO

2017-01-02 Thread Konrad Malawski
la -- Marcin On Monday, 2 January 2017 10:37:12 UTC+1, Konrad Malawski wrote: > > There is no "all at once here" it's processing line by line, pulling more > data as needed. > I don't see why you're worried about the all-at-once – that's exactly what >

Re: [akka-user] What are the pitfalls of using Akka Remote (in particular Artery) over WAN?

2017-01-03 Thread Konrad Malawski
Roland (previous tech lead of the project) answered the question on Stack Overflow rather well ;-) If you can share more details what you're trying to do there would be something to talk about, but so far nothing to add to what Roland already said in the response you linked. -- Konrad `ktoso` Mal

Re: [akka-user] akka-http non-standard status codes

2017-01-04 Thread Konrad Malawski
Everything is configurable :-) I see we missed to document that setting. We documented how to do it for custom media types here: http://doc.akka.io/docs/akka-http/current/scala/http/routing-dsl/directives/method-directives/extractMethod.html#custom-http-method Which is basically the same process

Re: [akka-user] akka-http non-standard status codes

2017-01-04 Thread Konrad Malawski
rror(intValue)(reason, defaultMessage) else throw new IllegalArgumentException("Can't register status code in non-standard region") Best, Patrick On Wednesday, January 4, 2017 at 12:49:21 PM UTC-5, Konrad Malawski wrote: > > Everything is configurable :-) > > I see we

Re: [akka-user] akka-http non-standard status codes

2017-01-04 Thread Konrad Malawski
(500 to 599 contains intValue) ServerError(intValue)(reason, defaultMessage) else throw new IllegalArgumentException("Can't register status code in non-standard region") Best, Patrick On Wednesday, January 4, 2017 at 12:49:21 PM UTC-5, Konrad Malawski wrote: > > Everyt

Re: [akka-user] akka-http non-standard status codes

2017-01-04 Thread Konrad Malawski
2017 7:14 PM, "Konrad Malawski" wrote: > Please read my response in detail: > Use the 4 parameter version: StatusCodes.custom(666, "BadStatusCode", "The > number of the beast", false, false) > > Since it's not a standard range you mus

Re: [akka-user] akka-http non-standard status codes

2017-01-04 Thread Konrad Malawski
eilly (padjo.orei...@gmail.com) wrote: Aha. Did not realize there was a separate method. Thanks a lot for your help! Best, Patrick On Wednesday, January 4, 2017 at 1:15:41 PM UTC-5, Konrad Malawski wrote: > > 5* parameter :) > > -- > Konrad `ktoso` Malawski > Akka <http://akka

Re: [akka-user] Example about cluster sharding

2017-01-05 Thread Konrad Malawski
Some time ago we implemented the Reactive Maps sample. It uses an Akka cluster with sharding, see description here: https://github.com/typesafehub/ReactiveMaps/blob/master/tutorial/index.html Get it using activator: http://www.lightbend.com/activator/template/reactive-maps or just clone the above

Re: [akka-user] Code in Akka-HTTP documentation doesn't seem to compile

2017-01-05 Thread Konrad Malawski
Sure `RawHeader.create` exists: https://github.com/akka/akka-http/blob/master/akka-http-core/src/main/java/akka/http/javadsl/model/headers/RawHeader.java#L11 Otherwise we would not have been able to release these docs - they've compiled and validated and only then we release :) You seem to be mixi

Re: [akka-user] Akka Artery

2017-01-06 Thread Konrad Malawski
Hi Gavin, the question boils down to when you expect to hit prod. We're still working on improving stability and production-hints-on-configuring/debugging Artery. In general since this sounds like a new project I would suggest you start using Artery and provide us with feedback if something feels

Re: [akka-user] Akka Artery

2017-01-06 Thread Konrad Malawski
nt to blog about eventually – watch the blog ;-) On Fri, Jan 6, 2017 at 11:13 AM, Konrad Malawski < konrad.malaw...@lightbend.com> wrote: > Hi Gavin, > the question boils down to when you expect to hit prod. > We're still working on improving stability and > producti

<    4   5   6   7   8   9   10   11   >