Re: [akka-user] Re: Akka-Http perf difference chunked vs non-chunked

2016-06-01 Thread Konrad Malawski
I don't see the project attached anywhere - could you put it on github instead? Thanks for prepping a reproducer. -- Konrad `ktoso` Malawski Akka @ Lightbend On 1 June 2016 at 11:05:05, daleksan (david.aleksandrow...@gmail.com) wrote: Hello Johan,

Re: [akka-user] handleWithSyncHandler, handleWith, handleWithAsyncHandler

2016-06-01 Thread Konrad Malawski
Use Async and complete with Future.successful / Future.failed which don't go via async ;) -- Konrad `ktoso` Malawski Akka @ Lightbend On 1 June 2016 at 10:28:29, RamuR (ramu.rajaseka...@gmail.com) wrote: - low-level-server-side-api.html - - The

Re: [akka-user] spray cache and akka http

2016-06-01 Thread Konrad Malawski
Quite honestly it's just one simple file you could copy and adapt for Akka HTTP: https://github.com/spray/spray/tree/master/spray-caching/src/main/scala/spray/caching We'd gladly see this as contribution in Akka HTTP actually, just need to find a place for it. Let us know if you'd like to

Re: [akka-user] Akka Websocket Strict vs non Streamed

2016-05-31 Thread Konrad Malawski
It returned an Akka Stream there :-) So you should learn a bit about Akka Streams to know how to handle those: http://doc.akka.io/docs/akka/2.4.6/scala/stream/stream-quickstart.html and take it from there. It's basically as simple as streamedData.map(_.utf8String).runWith(Sink.foreach(it =>

Re: [akka-user] How to properly use an ActorPublisher that fetches from a database?

2016-05-30 Thread Konrad Malawski
When you say database could it be you mean an SQL database? Because for those Slick 3 (also known as Reactive Slick) exposes queries as reactive streams so you can directly consume them using Akka Streams (Source.fromPublisher(myquery...)) -- Konrad `ktoso` Malawski Akka @

Re: [akka-user] aakka-http: how to get encoded URI from a HTTP request?

2016-05-24 Thread Konrad Malawski
Enable it: # Enables/disables the addition of a `Raw-Request-URI` header holding the # original raw request URI as the client has sent it. akka.http.server.raw-request-uri-header = off and then you'll get a magic header which contains the raw URI in each request. I already wondered why they are

Re: [akka-user] Akka-Http with Jackson confusion over proper usage of completeWithFutureResponse

2016-05-23 Thread Konrad Malawski
Thanks for trying the new JavaDSL and reporting the issue Daniel! I sadly have to confirm it's a mistake in the DSL, completeWithFuture should take Marshaller[T, RequestEntity]. I've logged an issue and submitted a PR to fix it right away:  https://github.com/akka/akka/issues/20592 We'll ship

Re: [akka-user] how do i correctly use the Flow.batch?

2016-05-18 Thread Konrad Malawski
Streames are fused by default right now so the entire pipeline is sleeping once you did that. You should try sprinkling an .async call around the fast (or slow) stages. --  Konrad `ktoso` Malawski Akka @ Lightbend On 19 May 2016 at 03:18:45, Yang Yang (wjingyao2...@163.com) wrote: hi , i got a

Re: [akka-user] In an Akka cluster, can I programmatically discover which node has a particular cluster singleton?

2016-05-17 Thread Konrad Malawski
(I'm not clear if you have N singletons, that they all reside on the same node though?) Yes, unless you give tell some of them to be on a specific role. As seen in  http://doc.akka.io/docs/akka/current/scala/cluster-singleton.html#An_Example -- Konrad -- >> Read the docs:

Re: [akka-user] Need pointers for akka durable mailbox using rabbitmq

2016-05-17 Thread Konrad Malawski
Please don't use Durable mailboxes, they're deprecated for a reason – they're really bad as they *block* the sender. It's replacement is Akka Persistence, read up on it – it allows you to build apps using event sourcing. Though what you describe does not sound like you need that... what's your

Re: [akka-user] Akka 2.4.5 broken actor creators

2016-05-17 Thread Konrad Malawski
ToObj(i -> > context().actorOf(Props.create(priceProcessorCreator).withMailbox("bounded-mailbox-" > + 2048 / CONCURRENCY_LEVEL))). > collect(toCollection(() -> new > ObjectArrayList<>(CONCURRENCY_LEVEL; > > > > On Tuesday, May 17, 2016

Re: [akka-user] Akka 2.4.5 broken actor creators

2016-05-17 Thread Konrad Malawski
When talking about "that code does not work", please paste the code under discussion. On Tue, May 17, 2016 at 9:39 AM, Guido Medina wrote: > My creators are not working with Akka 2.4.5, they have been working up to > now, > My actor creators are either static classes or

Re: [akka-user] Akka-HTTP, Upload, Sending 2xx response before end of request was received

2016-05-12 Thread Konrad Malawski
It's exactly as the error message explains – you're doing an "early response", which not all HTTP Clients can survive. Akka's HTTP client would survive it, but blocking APIs often wouldn't. The thing is that you write the response `complete(OK)` before the incoming data has finished streaming.

Re: [akka-user] [2.4.4] connection level http client Api misses requests

2016-05-07 Thread Konrad Malawski
And this is both by design and an actual feature - other clients are not able to do that as well and end to end as akka http does. Glad you found it. Always consume the entities. We'll eventually provide some helpers , but not strictly needed. On May 7, 2016 10:48, "Edmondo Porcu"

Re: [akka-user] Injecting messages on inactive stream

2016-05-06 Thread Konrad Malawski
We don't have a built-in for that, however the ping case has come up rather often, so I'd actually be in favour of including such an op along with the timer based ones we already have. Would you be interested in making a GraphStage which does this and we'd possibly pull it in along the existing

Re: [akka-user] Akka client behind nat issue

2016-05-06 Thread Konrad Malawski
In Akka 2.3.x it's only available in Reactive Platform – sa...@lightbend.com  for more information; since it's legacy support basically. In Akka 2.4.x it's available just-so. --  Konrad `ktoso` Malawski Akka @ Lightbend On 6 May 2016 at 14:50:43, enovo.s...@gmail.com (enovo.s...@gmail.com)

Re: [akka-user] Metrics/Time taken for message to pass through a flow

2016-05-05 Thread Konrad Malawski
We actually have an operator which does this, however it will be deprecated (we don't want it in core Akka, and it will be moved out to a "contrib" package). You can enable it via  import akka.stream.extra.Implicits.TimedFlowDsl See here to learn how to use it: 

Re: [akka-user] Re: A couple of akka-http questions

2016-05-05 Thread Konrad Malawski
I'd say the future is bright – we're investing heavily in it (though the last months have been slown down by the need of finishing the JavaDSL, but now that's almost there so we can focus on features and polishing more :-)). Perf wise we're almost there, persistent connections are doing great,

Re: [akka-user] Native LevelDB crashes Akka tests

2016-05-04 Thread Konrad Malawski
Could be better to ask on the LevelDB communities, I don't think we've seen such problems. We don't recommend LevelDB for anything else than just trying out Persistence - for real apps you should pick a distributed journal most of the time. --  Konrad `ktoso` Malawski Akka @ Lightbend On 3 May

Re: [akka-user] How to handle exception thrown in parent actor

2016-05-02 Thread Konrad Malawski
Who's the parent of the persistent actor? :-) Persistent actors can be normal children – then you simply handle it in the parent. --  Konrad `ktoso` Malawski Akka @ Lightbend On 3 May 2016 at 00:38:38, Amruta (parulek...@gmail.com) wrote: I have defined supervision strategy in my persistent

[akka-user] Re: Akka streams TLS info available in later stages

2016-04-30 Thread Konrad Malawski
tions I could come up with to get the discussion going. As > for rewriting the TLS stage to a GraphStage, I think it makes sense to do > that when not introducing new functionality, to lower the risk when > refactoring. > > Kind regards > Magnus Andersson > > Den torsdag 28 april

Re: [akka-user] Re: Scheduler overflow

2016-04-28 Thread Konrad Malawski
) wrote: If I have not misunderstood the reported issue this is not about scheduling something 50 days into the future, but after 50 days the scheduler stops working. Scheduled tasks were typically around 8 ms. On Thu, Apr 28, 2016 at 12:07 PM, Konrad Malawski <konrad.malaw...@lightbend.

Re: [akka-user] Re: Scheduler overflow

2016-04-28 Thread Konrad Malawski
Is 50 days long enough? I think there is no right or wrong answer to that, a quick solution maybe will be to change from Integer to Long which will be an easy fix with a minimal effort, that should extend it to like 500 days or more? No, because for long term scheduling you want to make sure the

[akka-user] Re: Akka streams TLS info available in later stages

2016-04-28 Thread Konrad Malawski
Hi Magnus, As far as I remember this is not available, please open a ticket and let's discuss there. We likely won't be able to focus on it, but it would be a nice contribution.. Also, the TLS stage needs to be rewritten to GraphStage, but that's a rather big and painful task (needs to be done

Re: [akka-user] Https Protocol Configuration with JavaDSL

2016-04-26 Thread Konrad Malawski
Manually specifying the protocols via ConnectionContext.https(...) does not seem to work. The method accepts a List of protocols as Optional<> parameter - however looking into the implementation at javadsl.ConnectionContext : 23 it seems these parameters are actually ignored and not passed on.

Re: [akka-user] Https Protocol Configuration with JavaDSL

2016-04-26 Thread Konrad Malawski
And thanks for noticing the bug about not passing though params - we'll fix. --  Konrad `ktoso` Malawski Akka @ Lightbend On 26 April 2016 at 18:00:16, andreasjsch...@gmail.com (andreasjsch...@gmail.com) wrote: Hi, after switching from the experimental branch of http to http-core 2.11-2.4.4 I

Re: [akka-user] Https Protocol Configuration with JavaDSL

2016-04-26 Thread Konrad Malawski
This is a bug in the DSL. We've been focused on the new DSL and missed this omission in the current one. The workaround is to call this before you bind the app: void useHttps(ActorSystem system) { final HttpExt scalaHttp = (HttpExt) akka.http.scaladsl.Http.get(system); ​ try {

[akka-user] Re: migrating from an earlier version of akka-streams ..

2016-04-26 Thread Konrad Malawski
(I did a quick mock Transaction type, your Monoid should work fine there ofc). -- Konrad On Sunday, 24 April 2016 21:42:43 UTC+2, debasish wrote: > > Hi - > > I am trying to migrate some akka-streams code from an earlier version > (akka-stream-experimental 1.0.RC4) .. please have a look at the

[akka-user] Re: migrating from an earlier version of akka-streams ..

2016-04-26 Thread Konrad Malawski
Hi Debasish, sorry for the delay, team meeting got us focused on planning things. It seems that in your case you don't need anything very weird, have you seen `to`? val txnSink: Sink[Transaction, Future[Transaction]] = Sink.fold[Transaction, Transaction](Transaction.zero)(_ + _) val netTxn:

Re: [akka-user] Better way to use CompletableFuture in an Actor

2016-04-24 Thread Konrad Malawski
I'm assuming you're using Java, please tell about this explicitly when asking questions :-) CompletionStage<...> futureResponse = http client calls thingy akka.pattern.PatternsCS.pipe(futureResponse, context.dispatcher).to(self()); set a flag that you're waiting or become() into such state, for

Re: [akka-user] Spray-json support and FromResponseUnmarshaller

2016-04-24 Thread Konrad Malawski
Hi there, the Unmarshaller type you wrote is correct, however the infrastructure is async in any case – inside withMaterialized you return a Future. implicit val um: Unmarshaller[Future[String], String] = ??? val eventualString: Future[String] = Unmarshal(Future("")).to[String](um,

Re: [akka-user] Is it possible to define a stream for set difference?

2016-04-24 Thread Konrad Malawski
What if the Sources are infinite? It's not trivial to solve in generic setting - as you never know if the millionth element from B wouldn't invalidate the first element from A, so you have to keep information around for the entire streams and only once they complete you can signal the new

Re: [akka-user] akka-http, response with "application/json" media type

2016-04-22 Thread Konrad Malawski
Content-Type is special – it should come with/from the data you're completing with – please don't hardcode it like that (it won't work, and that's on purpose). Here's how you'd use JSON in a real world app: object TestServer extends App with SprayJsonSupport with DefaultJsonProtocol {

Re: [akka-user] Re: Akka streams and Akka cluster story

2016-04-22 Thread Konrad Malawski
Well, I kinda get the "level of abstraction" but what about a cluster  node failure running my Akka streams stages?  They are strictly local – how would you deal with an Iterator's iteration blowing up?  Having that said, we do actually work on "Acknowledged Sources / Sinks", the first of which

Re: [akka-user] Akka streams and Akka cluster story

2016-04-22 Thread Konrad Malawski
In terms of level of abstraction Akka Streams are "like Iterator" ;-) They're not as high level as you might expect them to be it seems to me. They're a building block, using which, and Sink/Source to Actors you can integrate the two. The root cause of the rift there is that Actor semantics do

Re: [akka-user] ERROR running-akka-http-microservice-activator-template

2016-04-22 Thread Konrad Malawski
No idea what's bad from just that snippet. That template is maintained by The Iterators, so you should probably tell them it's broken in their repo: https://github.com/theiterators/akka-http-microservice by opening an issue, thanks! --  Konrad `ktoso` Malawski Akka @ Lightbend On 22 April 2016

Re: [akka-user] Developing with Intellij

2016-04-21 Thread Konrad Malawski
All the "fake" red in my code is where i use directives or shapeless. The parameters directive is always red for me (too many arguments error, doesn't see the magnet). There is zero macros and zero shapeless in the routing DSL – we rewrote the routing infra Spray had in Akka HTTP to _not_

Re: [akka-user] Developing with Intellij

2016-04-21 Thread Konrad Malawski
HttpRequest. Any ideas? Thanks On Thursday, April 21, 2016 at 1:07:03 PM UTC+1, Konrad Malawski wrote: You didn't say which versions of things you're using, please include such info :-) For me it works, all routes "green" in Intellij 15-EAP. I've been using the gen-idea plugin, but impo

Re: [akka-user] Developing with Intellij

2016-04-21 Thread Konrad Malawski
You didn't say which versions of things you're using, please include such info :-) For me it works, all routes "green" in Intellij 15-EAP. I've been using the gen-idea plugin, but importing from existing also should work - others on the team work like that. --  Konrad `ktoso` Malawski Akka @ 

Re: [akka-user] Re: akka http websocket and haproxy

2016-04-21 Thread Konrad Malawski
Thanks for sharing it works for you, would you mind sharing what you had to change in case someone else on the group (or in the future) has a similar question? That'd be awesome, thanks in advance :-) --  Konrad `ktoso` Malawski Akka @ Lightbend On 21 April 2016 at 12:25:12,

Re: [akka-user] Akka HTTP Java Directives examples

2016-04-20 Thread Konrad Malawski
it in 2.4.5 which is just a few days away actually. -- Konrad Malawski From: Daniel Stoner <daniel.sto...@ocado.com> <daniel.sto...@ocado.com> Reply: Daniel Stoner <daniel.sto...@ocado.com> <daniel.sto...@ocado.com> Date: 20 April 2016 at 14:02:21 To: Konrad Malawski <k

Re: [akka-user] [akka-http] Customizing exception messages for async tasks in routes

2016-04-19 Thread Konrad Malawski
That's what ExceptionHandler is for in Akka HTTP: more docs here:  http://doc.akka.io/docs/akka/2.4.4/scala/http/routing-dsl/directives/execution-directives/handleExceptions.html#description Happy hakking! --  Konrad `ktoso` Malawski Akka @ Lightbend On 20 April 2016 at 00:49:49, Edmondo Porcu

Re: [akka-user] Re: Akka HTTP performance for short lived connections

2016-04-18 Thread Konrad Malawski
I see some results, but no code that is being benchmarked – please always post benchmarked code together with benchmark, otherwise it's hard to tell what's actually going on. On Mon, Apr 18, 2016 at 9:19 PM, Johan Andrén wrote: > Yet another thing to test could be to

Re: [akka-user] Re: Akka Http Client handling 'Connection: close' and 'Transfer-Encoding: chunked'

2016-04-16 Thread Konrad Malawski
FYI, 2.4.4 was released: http://akka.io/news/2016/04/14/akka-2.4.4-released.html On Thu, Apr 14, 2016 at 1:13 AM, wrote: > Nice. Thanks. Looks like 2.4.4 has that fixed and it's tagged. Waiting for > that to show up on Maven Central. > >> >>> -- > >> Read the docs:

Re: [akka-user] Issue with Akka recovery

2016-04-16 Thread Konrad Malawski
Which version of Cassandra are you using? We've seen a number of problems in older versions: https://github.com/krasserm/akka-persistence-cassandra/issues/113 On Thu, Apr 14, 2016 at 6:11 PM, Amruta wrote: > Hi, > > I am using cassandra for journaling and storing snapshot

Re: [akka-user] Akka HTTP performance for short lived connections

2016-04-16 Thread Konrad Malawski
It's in our plans, can't promise dates though; the infamous 3DRealms "when it's done" would fit I guess... :-) On Sun, Apr 10, 2016 at 5:47 PM, Adam wrote: > Hi, > > I'm wondering if there's an expected (even rough) date for when Akka HTTP > will have similar (or hopefully

Re: [akka-user] AKKA persistence with big loading issue

2016-04-14 Thread Konrad Malawski
. The messages is being sent out in a loop but with sleep for 2s for every 100 messages. Thanks, Yan On Thursday, April 14, 2016 at 9:40:01 AM UTC-5, Konrad Malawski wrote: Hi there, we'll need more details on message size, versions, and timing of the messages to be able to hint at anything

Re: [akka-user] AKKA persistence with big loading issue

2016-04-14 Thread Konrad Malawski
Hi there, we'll need more details on message size, versions, and timing of the messages to be able to hint at anything :) --  Konrad `ktoso` Malawski Akka @ Lightbend On 14 April 2016 at 16:38:57, Yan Pei (yan@gmail.com) wrote: Good Morning All, I am having issue with AKKA persistence

Re: [akka-user] [akka-http-experimental] Testkit not published

2016-04-09 Thread Konrad Malawski
Because its not experimental anymore :) Trim that word On Apr 9, 2016 13:49, "Luis Ángel Vicente Sánchez" wrote: > Hi, > > It seems that the akka-http-experimental-testkit has not been publishe for > either akka 2.4.2 or 2.4.3. Source: > > >

Re: [akka-user] Compiler saying "NotUsed" should be "BoxedUnit"

2016-04-08 Thread Konrad Malawski
Don't mix these versions. Akka streams is part of Akka since 2.4.2, among others also for exactly this reason. Please use Akka streams 2.4.2 with akka 2.4.2. Same with 2.4.3, etc. They move together now. Happy talking! On Apr 8, 2016 18:43, "James P" wrote: > Hi Folks, > >

Re: [akka-user] Cancel a Scheduler by terminating its ActorSystem

2016-04-07 Thread Konrad Malawski
Yes, although that's a bit like asking "can I stop a car by driving it into a tree?" :-) In general you should cancel scheduled events (schedule() returns a cancellable), instead --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 7 April 2016 at 12:09:59, Kayode Odeyemi

Re: [akka-user] Aborting tcp connection in Akka 2.4.3 with Http().singleRequest()

2016-04-06 Thread Konrad Malawski
Firstly, it's a DEBUG level message – it's nothing "bad" happening. Simply after some time of no data being passed through a connection is is being shut down – it's an "idle timeout", otherwise we may end up having thousands of connections open which are doing nothing. Please read the docs on

Re: [akka-user] ANNOUNCE: Akka 2.4.3 released!

2016-04-05 Thread Konrad Malawski
Please refer to it's scala doc for the time being:  http://doc.akka.io/api/akka/2.4.3/#akka.stream.KillSwitches$ --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >>

Re: [akka-user] Akka 2.4.3 cannot read response body when using http 1.0 request

2016-04-05 Thread Konrad Malawski
Let's continue the discussion in the ticket. As Viktor found, it'd seem the 1.0 spec simply does not support this though...? On Tue, Apr 5, 2016 at 2:29 PM, xiaog zh wrote: > https://github.com/akka/akka/issues/20236 > > Can somebody give me a little clue or even guide me

Re: [akka-user] stream of objects over http

2016-04-04 Thread Konrad Malawski
) wrote: Hey! Thanks for your answer It's nice receiving your help, but could you provide a little snippet in Java? I don't speak Scala.. :(  El lunes, 4 de abril de 2016, 12:19:09 (UTC+2), Konrad Malawski escribió: I have a (stashed) PR implementing exactly what you ask for here, however we

Re: [akka-user] stream of objects over http

2016-04-04 Thread Konrad Malawski
I have a (stashed) PR implementing exactly what you ask for here, however we first need to ship the new JavaDSL before I can revive this PR. My work in progress PR was here: https://github.com/akka/akka/pull/18745 People have actually copied it and used on prod I hear ;-) Anyway, it's a feature

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-03-31 Thread Konrad Malawski
actor, so closing actor would close also flow's actors, obviously it is not and flow is keep on consuming incoming messages even though actor is long gone. On Wednesday, 30 March 2016 00:32:24 UTC+2, Konrad Malawski wrote: Helloł, I notice that after unbind I cannot create new connection (ie. from

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-03-31 Thread Konrad Malawski
t creating flow from actor will make such flow child of the actor, so closing actor would close also flow's actors, obviously it is not and flow is keep on consuming incoming messages even though actor is long gone. On Wednesday, 30 March 2016 00:32:24 UTC+2, Konrad Malawski wrote: Helloł, I notice

Re: [akka-user] Re: Can I use in-memory Actor state as a search engine ?

2016-03-31 Thread Konrad Malawski
+1 Ryan. I understood this is a hobby project, where it might be fun to challange yourself, but I wouldn't recommend reinventing search unless "reinventing search" is your entire business ;-) --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 31 March 2016 at 22:46:41, 'Ryan Tanner' via

Re: [akka-user] Can I use in-memory Actor state as a search engine ?

2016-03-30 Thread Konrad Malawski
Technically it's doable , but I'm not sure if that'll reduce complexity :-) Search really has to be "good" in order to be useful, just "fast but bad results" often won't satisfy anyone, thus I'm not sure implementing your own custom search engine is a good idea (unless that is exactly the goal

Re: [akka-user] akka 2.4.2 [java] stopping http-server and flow handling IncomingConnection

2016-03-29 Thread Konrad Malawski
Helloł, I notice that after unbind I cannot create new connection (ie. from a browser) but old, alive connection can still send requests. Am I missing something? Please no bold to highlight question, it looks scary :-) That's exactly how it works, by design. I did notice however that we do not

Re: [akka-user] akka-http - proper usage of HeaderDirectives.headerValueByType

2016-03-29 Thread Konrad Malawski
I'm in the middle of writing a blog post about that directive, it's one of the more "hardcore" ones in terms of hijacking scala mechanisms. In this case it's hijacking auto-tupling.. To get rid of the message type: headerValueByType[`Authorization`](()) If you give me a week or so there will

Re: [akka-user] NullPointerException when concatenating routes (akka-http)

2016-03-29 Thread Konrad Malawski
--  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 29 March 2016 at 04:28:40, Pouria Mellati (pou...@takor.com.au) wrote: Thanks Konrad, this should fix the issue! Yup, happy hakking! I think this sort of issue should be pointed out by the compiler, rather than at runtime. Not sure if

Re: [akka-user] How to get parent of router from routee?

2016-03-27 Thread Konrad Malawski
If it were me, I'd instead make this explicit part of the protocol - i.e. introduce this Actor via a message to the worker. If you just rely on "parent of my parent" then you lock yourself into this structure and make it harder to refactor if you change your mind about the hierarchy you need.

Re: [akka-user] NullPointerException when concatenating routes (akka-http)

2016-03-24 Thread Konrad Malawski
Hi there, you're running into "val referring to not yet initialized val" problems. This can happen if you have traits linearize (http://ktoso.github.io/scala-types-of-types/#type-linearization-vs-the-diamond-problem), in such order that one trait refers with a `val` to another before the first

Re: [akka-user] akka streams

2016-03-23 Thread Konrad Malawski
They're not experimental. They are included in Akka 2.4.2 - stable. You're probably referring to the "Old versions" part on akka.io/docs – don't use old versions ;-) --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 23 March 2016 at 11:51:05, Madabhattula Rajesh Kumar

Re: [akka-user] What's status of porting spray-caching?

2016-03-23 Thread Konrad Malawski
Hi all! According to early plans by Jonas Boner spray-caching was expected to be part of akka-http module. For now I can't find any caching utilites in latest akka-http 2.4.2. Oh wow that's very early plans :) Some things changed over the years since that announcement - check the news posts on

Re: [akka-user] Rejections in Akka HTTP Java API

2016-03-22 Thread Konrad Malawski
There's a completely new javadsl coming in the next weeks, it will have rejections (and docs for them) :) Thanks for your patience! On Mar 22, 2016 15:37, "Adam" wrote: > Hi, > > I see Rejections are only described in the Scala version of the docs. > Is that on purpose? >

Re: [akka-user] Akka game state

2016-03-20 Thread Konrad Malawski
On Sun, Mar 13, 2016 at 7:12 PM, Владимир Морозов wrote: > If two Player's actors live in two different remote actor systems - how > safely transfer item from one player to other (read transactionally or > guaranteed) > We don't do distributed transactions, they're the

Re: [akka-user] Akka-camel alternatives

2016-03-20 Thread Konrad Malawski
Camel is still very good at what it does IMHO. It's been around for a long time, and perhaps it shows in some aspects, however the number of integrations it provides is really huge, so that's still a great thing about it. Akka-Camel has not really seen much chances in the last years, but having

Re: [akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-20 Thread Konrad Malawski
New Java API is comign in very large steps, I think the new one you'll like a lot and come back to plain Akka :-) On Mon, Mar 14, 2016 at 5:13 PM, Guido Medina wrote: > Also there are other aspects you should be aware like back-pressure which > is better handled at Akka, to

Re: [akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Konrad Malawski
Also, please don't do that: cluster.leave(cluster.selfAddress()); system.terminate(); It is wrong. You need to give the cluster gossip enough time to complete the leaving "nicely". Proper graceful shutdown means you need to wait for _your own_ address to come back as MemberRemoved

Re: [akka-user] Akka Streams xcustom balance junction using Akka Streams graphstage is not working as intended

2016-03-19 Thread Konrad Malawski
What you're trying to build here is pretty similar to "Balance", so readint it's source may help you out: https://github.com/akka/akka/blob/master/akka-stream/src/main/scala/akka/stream/scaladsl/Graph.scala#L596 Also please note that the current impl: - will eventually blow up with double-push or

Re: [akka-user] Re: Intercept STDOUT of other process

2016-03-19 Thread Konrad Malawski
UTC-5, Konrad Malawski wrote: Hi there, Please don't immediately cross post your questions here and stack overflow, it makes it harder to track answered questions. It's ok to cross post if after a while you did not receive an answer, but please don't do so immediately. In order to "inte

Re: [akka-user] How to pass a Spring security context to all actors in a Akka system?

2016-03-19 Thread Konrad Malawski
machine? >>>> >>>> So my question for this community is: How is identity passed into an >>>> Akka System? Or put differently, how do you solve the issue of >>>> authorization within an Actor? As an Actor is responsible for the state of >>>> a

[akka-user] Re: Intercept STDOUT of other process

2016-03-19 Thread Konrad Malawski
Hi there, Please don't *immediately* cross post your questions here and stack overflow , it makes it harder to track answered questions. It's ok to cross post if after a while you did not

Re: [akka-user] akka.stream.scaladsl.One2OneBidiFlow$OutputTruncationException$: null exception

2016-03-19 Thread Konrad Malawski
This will be addressed by: https://github.com/akka/akka/issues/19777 Also, please upgrade to Akka 2.4.2, here's the migration guide: http://doc.akka.io/docs/akka/2.4.2/scala/stream/migration-guide-2.0-2.4-scala.html :-) Lots of things have been fixed in 2.4. -- ktoso On Thu, Mar 17, 2016 at

Re: [akka-user] Akka HTTP POST accepted media types

2016-03-19 Thread Konrad Malawski
Thank you so much, Christian On Friday, 18 March 2016 12:03:27 UTC, Konrad Malawski wrote: Hi, there's some things that can be improved here (I'll follow up later), however the first thing that confused me: You mention (and handle) text/plain everywhere, yet your CURL example is about text/cs

Re: [akka-user] Re: Talking to Akka Actors from non Java/Scala languages

2016-03-19 Thread Konrad Malawski
Hi there, AFAIR it's not that hard to just use the raw 0MQ APIs and bridge into Actors when you need to. On Tue, Mar 15, 2016 at 3:13 PM, Brandon Barker wrote: > Maybe I shouldn't be digging up an old discussion, but I'm curious what > 0MQ interface people are now

Re: [akka-user] How to stop an Actor using akka-http's actor-per-request example without getting an Abrupt Termination?

2016-03-19 Thread Konrad Malawski
Yeah, thanks Samuel for linking to the issue. Interested parties please watch that issue and PR :) On Tue, Mar 15, 2016 at 9:51 AM, Samuel Tardieu wrote: > I think this is a bug: https://github.com/akka/akka/issues/20032 > > > Le mar. 15 mars 2016 à 03:57, Sam Smoot

Re: [akka-user] Re: Clarification on unreachable nodes in cluster

2016-03-19 Thread Konrad Malawski
:24:58, Guido Medina (oxyg...@gmail.com) wrote: How long is enough time? I tried sleep 1 sec between leave and terminate calls and it didn't work. On Friday, March 18, 2016 at 5:13:50 PM UTC, Konrad Malawski wrote: Also, please don't do that:        cluster.leave(cluster.selfAddress

Re: [akka-user] Re: ${spray.version} not find

2016-03-19 Thread Konrad Malawski
I don't know about Spray to be honest actually. In Akka we certainly include the akka.version in config. --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 15 March 2016 at 18:59:52, abhishek jain (aa.jai...@gmail.com) wrote: I am using sbt assembly to generate a fat jar file... On

Re: [akka-user] How to pass a Spring security context to all actors in a Akka system?

2016-03-18 Thread Konrad Malawski
Hi there Bernd, I think this is more of a Spring Security question... I don't really know if those strategies they provide work in such contexts. In general you could ask such question on a Spring group and explain that the context needs to survive being used from one thread at a time, but it

Re: [akka-user] UDP server java

2016-03-18 Thread Konrad Malawski
Have you read up on the docs about UDP in Java? http://doc.akka.io/docs/akka/2.4.2/scala/io-udp.html#Bind__and_Send_ -- konrad -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >>

Re: [akka-user] Re: CORS Support Akka-http

2016-03-18 Thread Konrad Malawski
Thanks for sharing Lomig! I only skimmed through so far but looks very good already! I've added it to my board of things to look at in detail, it's a bit long but I hope to get there eventually!  You can also add it to the akka.io/community page so people can find it from there :-) (We aim to

Re: [akka-user] Restarting FSMs , and avoiding undesired side-effects

2016-03-15 Thread Konrad Malawski
Thanks for the info Johan! I'll take a look at the suggestions. I also think I have an alternate design where I may be able to avoid the problem entirely. I've convinced my team to at least start a prototype with Akka and I'm looking forward to it. One other question - I've seen the Typsafe

Re: [akka-user] akka.http.scaladsl.model.EntityStreamSizeException: null when processing Chunked POST request [2.4.2]

2016-03-14 Thread Konrad Malawski
Yeah that's the one though please note that it can be separately configured for server (akka.http.[server].parsing.max-content-length), full docs on it here:  http://doc.akka.io/docs/akka/2.4.2/scala/http/common/http-model.html#limiting-message-entity-length --  Cheers, Konrad 'ktoso’ Malawski

Re: [akka-user] Akka Http Websockets without SPI

2016-03-11 Thread Konrad Malawski
Hi there, Very glad you're enjoying Akka HTTP, and thanks for the question – seems docs can be made more clear (please let us know what lead you to this conclusion so we can fix it, full answer below): I can use the Akka Http Websockets as described in the documentation, but it looks like it

Re: [akka-user] Querying Snapshot messages using Akka Persistence Query

2016-03-11 Thread Konrad Malawski
But which datastores? The event journals are often different entities than the SnapshotStore. If it's the same, it's technically doable, however then it's implementation dependent – there is no general answer about this :) --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 11 March 2016

Re: [akka-user] Akka typed and persistent actors

2016-03-09 Thread Konrad Malawski
He surely could. But what's the point of it? Only the PersistentActor will be recovered in case of failure, not the Typed one. Two points which make it worthwhile: - In case of failure a PersistentActor stops. Thus, having it supervised by the Typed one makes sense as we can restart it there

Re: [akka-user] Re: Is akka.http.scaladsl.HttpExt.cachedHostConnectionPoolHttps buggy ?

2016-03-09 Thread Konrad Malawski
Thanks for reporting, will have a look into it. Thanks for the reproducer – is it actually usable without having some external settings / account there? Also, please use `ContentTypes` instead of RawHeaders for modeling content types. Ticket is here: https://github.com/akka/akka/issues/19985

Re: [akka-user] akka 2.4.2 java - How to create custom ContentType

2016-03-09 Thread Konrad Malawski
in java, I cannot goole anything like that On Tuesday, 8 March 2016 17:50:31 UTC+1, Konrad Malawski wrote: All Scala DSL model types extend the Java ones, so you can co over the ScalaDSL to create them, and pass them into any place that expects JavaDSL types. Thanks in advance for the ticket

Re: [akka-user] Open-Source Monitoring Tool - Akka 2.4.2

2016-03-09 Thread Konrad Malawski
Our http://resources.typesafe.com/monitoring/docs/ monitoring has seen an internal release of supporting 2.4.2 already. You can get access to it via getting a sub:  http://www.lightbend.com/services/expert-support via this form: https://www.lightbend.com/company/contact Hope this helps. I'm not

Re: [akka-user] akka 2.4.2 java - How to create custom ContentType

2016-03-08 Thread Konrad Malawski
Seems we might be missing some factory methods on the MediaTypes trait,  the scaladsl has methods for returning more specific types, such as `applicationWithCharset` etc. Would you please open a ticket about "feature parity of creating MediaTypes for JavaDSL"? Thanks in advance! Please note

Re: [akka-user] akka-http proxy support

2016-03-08 Thread Konrad Malawski
Correct, HTTPS Proxies are not supported yet, see ticket:  https://github.com/akka/akka/issues/16153 Sadly we're not sure when we'll get the chance to work on this yet. For the time being you may want to try Play's WS library, though I'm not sure if they support this feature hm... (They're

Re: [akka-user] Akka.NET or Alternative

2016-03-07 Thread Konrad Malawski
We know the fine chaps over at Akka.NET a bit and I think you should give them a try :-) It's hard for me to say if the impl is nice and idiomatic for .NET, however as you seem to have an Akka app migrating should be rather simple – they're very much 1:1 with "Akka.JVM" as far as I remember.

Re: [akka-user] [akka-http-2.4.2] HttpConnectionTimeoutException logged at ERROR

2016-03-04 Thread Konrad Malawski
Hi there, it's not a bug, it's about shutting down connections when no data is passed through it. It's fixed already and will be part of the 2.4.3 release:  https://github.com/akka/akka/pull/19915 Thanks for reporting! --  Cheers, Konrad 'ktoso’ Malawski Akka @ Lightbend On 4 March 2016 at

Re: [akka-user] Re: A simple question?

2016-03-02 Thread Konrad Malawski
Hi Oscar, Akka definitely makes a lot of sense even just locally – Actors are also a concurrency abstraction (much nicer to work with than threads). One would need to know more about your project to say more however. For example, while we have Actors, some things are better modeled as Akka

Re: [akka-user] Akka Persistence - callback for persistAll when all events have been saved

2016-02-28 Thread Konrad Malawski
A defer() just after the persistAll call should pretty much be what you need, unless I missed something :) On Feb 28, 2016 15:23, "Łukasz Gąsior" wrote: > Hi, > > Is there a way to execute a handler when all events have been saved using > persistAll? > i.e. have (handler:

Re: [akka-user] Googling docs

2016-02-24 Thread Konrad Malawski
Hi there, I'm very glad you found it useful! yeah, it's something on our radar to improve – specifically 2.0.3 should redirect people to 2.4.2+. It's somewhat of a special case as URL needs more change than just changing the version in it, so we didn't yet squeeze in the time to fix that... If

<    1   2   3   4   5   6   7   8   9   10   >