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

2015-07-20 Thread Konrad Malawski
rect me! > > 在 2015年7月17日星期五 UTC+8上午5:48:26,Konrad Malawski写道: >> >> 1. what is the different between Module and Shape? >>> >> Modules are internal things. >> Shapes are "ports", you have FlowShape, SinkShape, SourceShape, >> MyVeryOwnCustom

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

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

2015-07-21 Thread Konrad Malawski
Hi Radek, Thanks for the feedback! There is recover() but that's not really the same; What you effectively ask for is recoverWith() , but we don't have it yet (it was discussed though, a "nice to have"). The real

Re: [akka-user] How can a stream connect to an actor?

2015-07-21 Thread Konrad Malawski
+1 for mapAsync + ask  :-) --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 21 July 2015 at 11:59:41, Viktor Klang (viktor.kl...@gmail.com) wrote: mapAsync + ask? On Tue, Jul 21, 2015 at 11:53 AM, wrote: In the  code example http://doc.akka.io/docs/akka-stream-and-http-experimental/1

Re: [akka-user] cannot find com.typesafe.akka:akka-http-testkit-scala-experimental_2.11:1.0

2015-07-23 Thread Konrad Malawski
Hi Leon, drop the `scala`, the artifact name is: akka-http-testkit-experimental See here: http://search.maven.org/#artifactdetails%7Ccom.typesafe.akka%7Cakka-http-testkit-experimental_2.11%7C1.0%7Cjar I don't see the wrong artifact name being mentioned on http://akka.io/docs/ where did you find me

[akka-user] Re: cannot find com.typesafe.akka#akka-http-testkit-scala-experimental_2.11;1.0

2015-07-23 Thread Konrad Malawski
Hi Leon, drop the `scala`, the artifact name is: akka-http-testkit-experimental See here: http://search.maven.org/#artifactdetails%7Ccom.typesafe.akka%7Cakka-http-testkit-experimental_2.11%7C1.0%7Cjar I don't see the wrong artifact name being mentioned on http://akka.io/docs/ where did you find

[akka-user] Re: cannot find com.typesafe.akka:akka-http-testkit-scala-experimental_2.11:1.0

2015-07-23 Thread Konrad Malawski
Hi Leon, drop the `scala`, the artifact name is: akka-http-testkit-experimental See here: http://search.maven.org/#artifactdetails%7Ccom.typesafe.akka%7Cakka-http-testkit-experimental_2.11%7C1.0%7Cjar I don't see the wrong artifact name being mentioned on http://akka.io/docs/ where did you find

[akka-user] Re: cannot find com.typesafe.akka#akka-http-testkit-scala-experimental_2.11;1.0

2015-07-23 Thread Konrad Malawski
The question seems double posted, let's continue in this thread please: https://groups.google.com/forum/#!topic/akka-user/O4UmqHbP7e4 -- konrad W dniu czwartek, 23 lipca 2015 10:14:40 UTC+2 użytkownik Leon napisał: > > My sbt can find all dependencies listed on http://akka.io/docs/ > except com

Re: [akka-user] Problem with Akka 2.4 Snapshot and Play Framework 2.3.8

2015-07-24 Thread Konrad Malawski
Hi Vaughn, Akka 2.4 is finally dropping java 6 support and requires java 8. It's more than just being compiled with 8, it actually uses types and APIs only available in 7+. Java 6 has been end of lifed a very long time ago. Java 7 actually as well since April this year, except fixes for customers

Re: [akka-user] Getting started Akka-Http?

2015-07-24 Thread Konrad Malawski
Akka http reached 1.0 so look for the 1.0 docs, instead of 1.0-M2 ;-) Correct link: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/http/client-side/index.html Read more about the release here: http://akka.io/news/2015/07/15/akka-streams-1.0-released.html Happy hakking! On Ju

Re: [akka-user] journal.max-message-batch-size and size of events passed to persist() method

2015-07-27 Thread Konrad Malawski
Hi Yaroslav! What do you mean? It is applied - we flush a write when the accumulated events reach lenght of that configured setting: eventBatch.reverse.foreach { p ⇒ addToBatch(p) if (!writeInProgress || maxBatchSizeReached) flushJournalBatch() If you mean the persistAll(Seq()) than that's di

Re: [akka-user] journal.max-message-batch-size and size of events passed to persist() method

2015-07-27 Thread Konrad Malawski
[A](events: immutable.Seq[A])(handler: A ⇒ Unit): Unit` in Akka 2.3 Looks like this has been fixed in Akka 2.4, thanks Konrad. On Monday, July 27, 2015 at 11:48:04 AM UTC+3, Konrad Malawski wrote: Hi Yaroslav! What do you mean? It is applied - we flush a write when the accumulated events reach lengh

Re: [akka-user] Is there any example/documentation for PersistentFSMActor?

2015-07-28 Thread Konrad Malawski
Hi Nader, yes, what you describe sounds like a great use case for PeristentActors in general (and well PersistentFSMActor simply being a DSL on top of it). In fact I've seen a ticketing system in the wild implemented like that and they've enjoyed it as far as I could tell :-) Take a deep dive into

Re: [akka-user] Any akka-http books in the works?

2015-07-28 Thread Konrad Malawski
Hi Jon! I'm not aware of books featuring Akka Http yet. One has to keep in mind that the 1.0 just launched last week or so, so it's a bit early for books to appear I think :-) The most up to date "book" would be the docs currently, so I'd highly recommend reading through and voicing any feedbac

Re: [akka-user] NoClassDefFoundError: akka/japi/function/Function using Akka Streams 1.0

2015-07-29 Thread Konrad Malawski
Seems you're mixing up dependencies. Please don't use 2.3.9, use 2.3.12 (see your akka-actor dependency). --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 29 July 2015 at 22:52:05, sfosb...@twilio.com (sfosb...@twilio.com) wrote: The subject pretty much says it all.  I have the following i

Re: [akka-user] How split a flow?

2015-07-30 Thread Konrad Malawski
Hi there, you could do it like you mention (pseudocode): Broadcast ~> Flow[].filter(even) ~> Broadcast ~> Flow[].filter(odd) ~> However we have a built-in that serves those kinds of "route things depending on something" situations well: FlexiRoute Here are the docs for it:  http://doc.akka.io/do

Re: [akka-user] Akka for agar.io clone

2015-07-31 Thread Konrad Malawski
Hi Kamil! That looks like a pretty fun game / project actually! Yes I think Akka would match the problem here pretty well, since you can model the entities (and their respective websockets) as Actors. While pretty old, you might enjoy Piotr Kukiełka's sample app where he does something a bit simil

[akka-user] Re: PersistentFSMActor and non persistent events

2015-08-01 Thread Konrad Malawski
Hi there, that's simple to do with just using vars inside the Actor. I see you might want to keep the "become with data" style though... This needs to get some time spent on looking into it. If you'd have some time to investigate how to best expose this in the API and maybe prep a PR that'd be gr

Re: [akka-user] Re: PersistentFSMActor and non persistent events

2015-08-01 Thread Konrad Malawski
15 at 4:03:38 PM UTC+1, Konrad Malawski wrote: Hi there, that's simple to do with just using vars inside the Actor. I see you might want to keep the "become with data" style though... This needs to get some time spent on looking into it. If you'd have some time to investigate h

Re: [akka-user] Re: akka-persistence: LocalSnapshotStore ignores timestamps in SnapshotSelectionCriteria

2015-08-03 Thread Konrad Malawski
Hi there, sorry I missed this thread previously. This change has some background story to it, but perhaps we missed something when Criteria is used for the delete... I'll open a bug and have a look at it. The reason was to abandon the deleteSnapshot(seqNr, timestamp) API, as the timestamp is act

Re: [akka-user] Re: akka-persistence: LocalSnapshotStore ignores timestamps in SnapshotSelectionCriteria

2015-08-03 Thread Konrad Malawski
By looking at the patch it seems it's a bug indeed - would you submit the patch as a PR Stephen? I opened up an issue, so you could open a PR referencing the issue nr:  https://github.com/akka/akka/issues/18112 Thanks a lot for finding this and the patch! --  Cheers, Konrad 'ktoso’ Malawski Akka

Re: [akka-user] Re: REST service with Akka and Java

2015-08-06 Thread Konrad Malawski
For Akka HTTP the experimental means that we reserve the right to change APIs slightly, but it's not going away it that's what worries you. We're planning to focus on its performance these weeks (it's not very fast yet). On Thu, Aug 6, 2015 at 9:05 AM, wrote: > Thank you André, this looks inter

Re: [akka-user] Re: Is it ok to use Apache CXF with Akka?

2015-08-07 Thread Konrad Malawski
Hi there, in general the answer is somewhat along the lines of: Because Akka is built from the ground up around asynchronous processing, it's a better match for building such systems. If other tools "add some async stuff", yet it is not really the core of what they do you'll find some mismatches

Re: [akka-user] Re: Is it ok to use Apache CXF with Akka?

2015-08-07 Thread Konrad Malawski
But, my question was about to use Apache CXF together with Akka in an asynchronous way (see example code) and if this ok from a technical perspective? Should just work I guess :-) Not the optimal setup but should just work, yeap. -- Konrad -- >> Read the docs: http://akka.io/doc

Re: [akka-user] Re: Is it ok to use Apache CXF with Akka?

2015-08-07 Thread Konrad Malawski
Happy hakking! :-) On Fri, Aug 7, 2015 at 3:46 PM, wrote: > Thanks for your help. > > Cheers > Rob > > > Am Freitag, 7. August 2015 15:29:40 UTC+2 schrieb Konrad Malawski: >> >> But, my question was about to use Apache CXF *together* with Akka in an >> asy

Re: [akka-user] Is there any example/documentation for PersistentFSMActor?

2015-08-08 Thread Konrad Malawski
That's because *Persistent*FSMActor lives in akka-*persistence* :-) See here:  http://doc.akka.io/docs/akka/current/scala/persistence.html#Dependencies Notice that it's graduating from experimental mode in a few weeks (into Akka 2.4). --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 27 Ju

Re: [akka-user] Is there any example/documentation for PersistentFSMActor?

2015-08-09 Thread Konrad Malawski
M? Is there a time for this in 2.4? Thanks, Leonid On Saturday, August 8, 2015 at 11:51:01 PM UTC+3, Konrad Malawski wrote: That's because *Persistent*FSMActor lives in akka-*persistence* :-) See here:  http://doc.akka.io/docs/akka/current/scala/persistence.html#Dependencies Notice that it

Re: [akka-user] Is there any example/documentation for PersistentFSMActor?

2015-08-09 Thread Konrad Malawski
12:37:42 AM UTC+3, Konrad Malawski wrote: Hi Leonid, we're aiming to start the RC phase for 2.4.x ASAP (2-3 weeks is the current goal); I don't think we'll have time enough in the team to spend on de-duplicating code between those FSMs, we'd definitely be very thankful f

Re: [akka-user] Event sourcing with akka persistence in practice

2015-08-10 Thread Konrad Malawski
Hi there Sudhi! For a highly scalable distributed service that I'm building, I'm considering using event sourcing pattern.  Yup, that could be a good match, let's see what you need. I'm planning to use Akka clustering with persistent actors for this application. I have a few questions related

Re: [akka-user] Using cluster aware pool routers with remote deployment

2015-08-12 Thread Konrad Malawski
Uff, indeed :-) Gotta watch out and only keep as many ActorSystems as you really intent to have. Glad you found the solution, happy hakking! --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 10 August 2015 at 10:31:31, n...@rubell.com (n...@rubell.com) wrote: Hi, I am trying to use round-

Re: [akka-user] Customize akka logger (using java)

2015-08-17 Thread Konrad Malawski
Hello and welcome to the list, Have you read http://doc.akka.io/docs/akka/current/java/logging.html#SLF4J ? --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 17 August 2015 at 10:06:17, Pinaki C (cpinaki.m...@gmail.com) wrote: Newbie in akka.I want to customize akka logger to use my own.How

Re: [akka-user] Monitor system for Akka cluster

2015-08-17 Thread Konrad Malawski
Hi Yifei, Metrics (most of them) like that can be collected using Takipi for Akka or kamon.io. We're working on improving the monitoring situation but don't have anything concrete to announce yet. On Tue, Aug 1

Re: [akka-user] [Akka 2.1.4] ConsistentHash router and memory issues

2015-08-17 Thread Konrad Malawski
It may be possible to backport the ConsistentRouter, you can give it a shot, however it would have to be in your codebase as 2.1 has been EndOfLife-ed some time ago, we don't maintain it anymore. For a number of other reasons (stability and perf improvements) I'd highly recommend putting an update

Re: [akka-user] Event sourcing backend/plugin with scalable pub/sub

2015-08-18 Thread Konrad Malawski
pose Kafka subscribers as Akka Streams - see reactive-kafka). --  Cheers, Konrad Malawski Akka @ Typesafe On 17 August 2015 at 10:06:15, leon...@liveperson.com (leon...@liveperson.com) wrote: One of the possible use cases of event sourcing we’d like to implement is subscribing to domain events cha

Re: [akka-user] When 2.4 RC1 is due to be released ?

2015-08-19 Thread Konrad Malawski
Release notes of M4? What M4... :-) M3 was last friday – Aug 14th. RC1 is coming this friday – Aug 21st. Hope this helps. --  Cheers, Konrad Malawski Akka @ Typesafe On 19 August 2015 at 12:14:46, gutzeit (gutz...@gmail.com) wrote: Release notes of M4 mention August 14, its not the case

Re: [akka-user] When 2.4 RC1 is due to be released ?

2015-08-19 Thread Konrad Malawski
Typo in the announcement :-) The announcement was drafted and posted on the 14th, "next week" = 21st. Sorry for the confusion, I'll fix the notes on the akka.io website. --  Cheers, Konrad Malawski Akka @ Typesafe On 19 August 2015 at 12:25:22, Dima Gutzeit (gutz...@gmail.com)

Re: [akka-user] When 2.4 RC1 is due to be released ?

2015-08-19 Thread Konrad Malawski
Typo fixed, thanks for reporting;  https://github.com/akka/akka.github.com/pull/236 --  Cheers, Konrad Malawski Akka @ Typesafe On 19 August 2015 at 12:25:22, Dima Gutzeit (gutz...@gmail.com) wrote: My bad, M3 :). "The aggressive plan is to release 2.4.0-RC1 by the end of next week (Augus

Re: [akka-user] [Review request] Probabilistic domain service idempotency with HyperLogLog

2015-08-19 Thread Konrad Malawski
I don't really get what you're trying to achieve here. I am familiar with HyperLogLog, however I don't see how an approximate-count data structure how would it help in achieving idempotence? On Tue, Aug 18, 2015 at 8:50 PM, Grzegorz Duszyński wrote: > I'm evaluating an approach to domain service

Re: [akka-user] Event sourcing backend/plugin with scalable pub/sub

2015-08-19 Thread Konrad Malawski
> Another option is using some combination of Kafka/Cassandra. This will > require some adapting, handling 2 systems instead of one, possible lack of > sync, writing more code, etc. > Which is actually very much in the spirit of event sourcing and eventual consistency. I'm not sure what kind of dat

Re: [akka-user] Re: Don't use -optimize scalac flag with Akka

2015-08-19 Thread Konrad Malawski
Hi Alessandro, I'm not sure to be honest. We have not revisited if this is indeed the case on 2.11 and 2.12 (which has gotten a new optimiser (fully rewritten)). One thing that still applies for sure is that if scalac inlines things you aggresively binary compatibility may not hold as you'd expect

Re: [akka-user] Re: Don't use -optimize scalac flag with Akka

2015-08-19 Thread Konrad Malawski
I made it a ticket to make sure we re-visit this: https://github.com/akka/akka/issues/18268 -- konrad W dniu środa, 19 sierpnia 2015 16:35:42 UTC+2 użytkownik Konrad Malawski napisał: > > Hi Alessandro, > I'm not sure to be honest. We have not revisited if this is indeed the

Re: [akka-user] Event sourcing backend/plugin with scalable pub/sub

2015-08-20 Thread Konrad Malawski
I'm tempted to write a service that would use Kafka and Cassandra as backends and expose subscriptions per entity. Not sure yet if it's doable at scale. An "exercise left for the ambitious reader" one might say ;-) Capability wise definitely makes sense to me and we've seen such setups "in the f

Re: [akka-user] [akka-streams] Http source design question?

2015-08-20 Thread Konrad Malawski
Hi John, good observation, however this has not shown up in our initial benchmarking as a bottle-neck so far AFAIR. We're taking a systematic aproach and first improving the perf of the "biggest bang for the buck" elements of Akka Http. Currently this means we're focusing on fusing and need to impl

Re: [akka-user] [akka-streams] ActorSubscriber to ActorPublisher flow -- how to?

2015-08-20 Thread Konrad Malawski
out custom processing stages:  doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-customize.html --  Cheers, Konrad Malawski Akka @ Typesafe On 20 August 2015 at 17:12:55, Alexey Shuksto (seig...@gmail.com) wrote: Hello there, I could not find answer to this particular question neith

Re: [akka-user] How to implement etop for Akka?

2015-08-20 Thread Konrad Malawski
Hi Eax, I think that re-using an implementation (Kamon for example) for the collection of data is a good first step, you'll want to avoid re-inventing the wheel there (and the horrible pains of weaving instrumentation into the codebase manually ;-)). Perhaps it's possible to re-use Kamon's infra

Re: [akka-user] Event sourcing backend/plugin with scalable pub/sub

2015-08-20 Thread Konrad Malawski
I'd write to a primary journal and use the (Akka) query side to populate the other journal. Yes they may be a bit behind, but depending on needs that could be optimised (query side could be pushed to). Have you looked into Akka Persistence Query yet? We implemented something for leveldb this week

Re: [akka-user] Akka Streams fanout Question

2015-08-22 Thread Konrad Malawski
What you're looking for is a Broadcast operation. Here's docs about how to use it:  http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-graphs.html --  Cheers, Konrad Malawski Akka @ Typesafe On 22 August 2015 at 12:16:58, Christian Schmitt (c.schm...@brie

Re: [akka-user] Akka Streams fanout Question

2015-08-22 Thread Konrad Malawski
asis for your code:  http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-graphs.html#Constructing_Flow_Graphs and just remote the Merge from there :-) --  Cheers, Konrad Malawski Akka @ Typesafe On 22 August 2015 at 13:03:07, Christian Schmitt (c.schm...@briefdomain.de) wrote: Thanks

Re: [akka-user] Akka Streams fanout Question

2015-08-22 Thread Konrad Malawski
Somehow Google points to the M2 release which only has FlowGraph {implicit b =>} which of course doesn’t work.  The 1.0 documentation is really good (if you find it..) Ah I see, yes that's something we should work on with our SEO optimisation I think... I also thought of putting up a warning a

Re: [akka-user] [offtopic] Bibliography in distributed systems

2015-08-24 Thread Konrad Malawski
Here's some of my todo-list: https://www.wunderlist.com/lists/123387810 (rather slugishly updated) You can also browse through the archive of http://sckrk.com (a reading club we run in Kraków), there's a number of very nice ones in there. On Mon, Aug 24, 2015 at 2:02 PM, wrote: > Hello, > I'm ne

Re: [akka-user] Cluster sharding on a single node cluster. Does it make sense?

2015-08-27 Thread Konrad Malawski
I wouldn't see it as a bad thing to use sharding locally to achieve the "lazily create actors for me" semantics that it implements. You're right that it's designed for a more powerful context - i.e. it is *cluster* sharding, to shard the load across a number of nodes, but hey - who says you won't n

Re: [akka-user] Death watch from outside an actor

2015-09-01 Thread Konrad Malawski
Yes, create an Actor that's responsible for watching the other one. You could build something that hides the "make an Actor" from the developer using that pattern, i.e. it'd complete a future or something, however there needs to be an Actor involved in the watching (even if hidden away). --  Ch

Re: [akka-user] Using Akka http for large uploads not uploading entire file

2015-09-02 Thread Konrad Malawski
Hi Charlie, I'll try to reproduce the problem you described - it definitely should not happen, so we may be looking at a bug here. Is there anything else other than the snippet (thanks for pasting it!) that might be related to the issue you're seeing? Does the same happen if you replicate the po

Re: [akka-user] Using Akka http for large uploads not uploading entire file

2015-09-02 Thread Konrad Malawski
Actually, follow up question – since the snippet seems incomplete. How are you running the mapAsync? In the snippet you posted there is no materialization of the  formdata.parts.mapAsync(1) part. You should have some run() at the end of the stream, otherwise it does nothing. For example you coul

Re: [akka-user] Using Akka http for large uploads not uploading entire file

2015-09-02 Thread Konrad Malawski
, I'm starting to think it may be an issue outside of akka. We have Node proxying the request over to the akka server and it might be something funky going on there.  Sorry to have wasted your time. Charlie On Wednesday, September 2, 2015 at 3:02:28 PM UTC+1, Konrad Malawski wrote: Actually,

[akka-user] Re: Using CircuitBreaker within outbound Http stream Flow

2015-09-02 Thread Konrad Malawski
Hi Chris, that's definitely in the plans – here's the ticket for it: https://github.com/akka/akka/issues/15307 You can build elements like this currently, however you're right that it could be provided as an out of the box thing and certainly be pretty useful. Thanks for the feedback! If you hav

Re: [akka-user] Akka Mobile

2015-09-02 Thread Konrad Malawski
Hi Joseph, we're not actively working on supporting Akka on DVM or ART (Android runtimes). Akka is aimed primarily at backend settings, not as much for mobile. Having that said, I know Akka 2.3.x "just worked" on Android a while ago, because it looks "enough like Java" from the feature set's pers

Re: [akka-user] Will development of Spray continue simultaneously with Akka Http?

2015-09-03 Thread Konrad Malawski
Hello Eax, Akka Http can be seen as the "Spray 2.0". It's been developed together by us and Mathias and Johannes (the original Spray team), if that clears up the relationship of those two. Once we get performance nailed with Akka Http we will start recommending to migrate to Akka Http from Spra

Re: [akka-user] [akka-streams] Java7 - output type for map

2015-09-04 Thread Konrad Malawski
Hmm, weird - this should just work (sanity checked a similar example locally). Can you paste a full snippet of code that showcases the problem? I don't see how it shouldn't work here. Are you sure you're importing the right Function interface? --  Cheers, Konrad `ktoso` Malawski Akka @ Typesafe

Re: [akka-user] [akka-streams] Java7 - output type for map

2015-09-04 Thread Konrad Malawski
Cool 😎 happy hakking! On Sep 4, 2015 19:36, "Jeroen Kransen" wrote: > Sorry, it was indeed a wrong Function. With akka.japi.function.Function it > works fine! > > Op vrijdag 4 september 2015 18:19:51 UTC+2 schreef Konrad Malawski: >> >> Hmm, weird - this

Re: [akka-user] Re: ANNOUNCE: Akka 2.4.0-RC2 (RELEASE CANDIDATE)

2015-09-05 Thread Konrad Malawski
Hi Guido, can you explain a bit more where you see the JMH dependency pop up? It should only be in the akka-bench project, which is not published. Akka-actor seems clean to me:  http://search.maven.org/#artifactdetails%7Ccom.typesafe.akka%7Cakka-actor_2.11%7C2.4.0-RC2%7Cjar --  Cheers, Konrad `kt

Re: [akka-user] Splitting Seq[String] in Akka-stream flow

2015-09-07 Thread Konrad Malawski
Why not .map(json => makeTheString(json))? On Sep 7, 2015 13:30, "Ivan Baisi" wrote: > Hi all, > > So I have a problem I cannot find out how to solve. > > I have a flow that receives many elements, and as I have to access a db > with that data, I have to group them so I query the db once instead

Re: [akka-user] Splitting Seq[String] in Akka-stream flow

2015-09-07 Thread Konrad Malawski
; I'm doing something like that for now: >> >> .map({ x => x.foldLeft("")((fStr, str) => fStr + str + "\r\n") }) >> >> but this ends up in many json in one kafka message, and what I'd like to >> achieve is having one json per message being p

Re: [akka-user] Re: reference.conf conflicts in fat jar (I think)

2015-09-14 Thread Konrad Malawski
Hi all, I'd highly discourage fiddling with published artifacts (i.e. by unzipping and changing files in there). You should use a plugin like https://github.com/sbt/sbt-assembl in which you configure all reference.conf files to be concatenated, then your application.conf simply overwrites any set

Re: [akka-user] Re: AKKA Cluster split brain and reconnect

2015-09-14 Thread Konrad Malawski
Hi guys, The tools linked by Morten seem interesting, I'll give them a read later :) I have party solved the issue by removing auto-down from the configuration  Good, it's not a good idea to rely on auto-downing (as it's pretty naive and 1-by-1 timer based) in production. We recommend using exp

Re: [akka-user] Unit testing Akka-http low level API

2015-09-14 Thread Konrad Malawski
Hi Val, notice that the high-level API has it's own routing DSL etc, which makes it need a nice testing abstraction. The low-level API on the other hand is plain Akka Streams, i.e. Flow / Source / Sink of HttpRequest and HttpResponse. This means that the TestKit for it is, in fact, the same as f

Re: [akka-user] [akka-http] Where did Spray's anyParams go?

2015-09-14 Thread Konrad Malawski
Hi Matthew, it's one of the few directives we were pondering if we need to port then or not as it was considered rather rarely used, here's the ticket: https://github.com/akka/akka/issues/15934 In Spray it had a bug which was fixed only recently, so we'll need to forward port the fix as well: https

Re: [akka-user] [akka-http] Where did Spray's anyParams go?

2015-09-15 Thread Konrad Malawski
rward as resources allow. > > On Mon, Sep 14, 2015 at 6:05 PM, Konrad Malawski > wrote: > >> Hi Matthew, >> it's one of the few directives we were pondering if we need to port then >> or not as it was considered rather rarely used, here's the ticket: >> ht

Re: [akka-user] [akka-stream] Two publisher one subscriber hangs?

2015-09-16 Thread Konrad Malawski
Hi there Anil, it's an explicit design choice that Akka Streams have made, to make all fan-in and fan-out operations explicit. Also, the Reactive Streams protocol you reverted to (publisher / subscriber) is defined on a 1:1 basis,  as Endre mentioned, it should have actually thrown an exception w

Re: [akka-user] [akka-stream] Two publisher one subscriber hangs?

2015-09-16 Thread Konrad Malawski
I opened a ticket to make sure the error is signalled properly in this situation: https://github.com/akka/akka/issues/18486 --  Cheers, Konrad `ktoso` Malawski Akka @ Typesafe On 16 September 2015 at 12:39:47, Endre Varga (endre.va...@typesafe.com) wrote: Hi, It is invalid to attach two publi

Re: [akka-user] [akka-stream] Two publisher one subscriber hangs?

2015-09-16 Thread Konrad Malawski
Good catch, thanks Endre :-) --  Cheers, Konrad `ktoso` Malawski Akka @ Typesafe On 16 September 2015 at 12:46:53, Endre Varga (endre.va...@typesafe.com) wrote: On Wed, Sep 16, 2015 at 12:42 PM, Konrad Malawski wrote: Hi there Anil, it's an explicit design choice that Akka Streams have

[akka-user] ANNOUNCE: Akka 2.3.14 Released

2015-09-16 Thread Konrad Malawski
e%3A2.3.14>. Credits commits added removed 2 73 7 Patrik Nordwall 1 1 1 Konrad Malawski 1 1 0 luben karavelov Happy hAkking! -- Cheers, Konrad 'ktoso' Malawski Akka <http://akka.io/> @ Typesafe <http://typesafe.com/> --

Re: [akka-user] Creating a reconnecting TCP client

2015-09-17 Thread Konrad Malawski
Hi there, I actually implemented something like a “reconnect” a number of times (most of them ending up in overcomplication though…). The style we ended up with is indeed an Actor which encapsulates the connection handling, and gets notified if the stream is completed (i.e. .toMat(Sink.onComplete

Re: [akka-user] Akka-http server occasionally pausing

2015-09-17 Thread Konrad Malawski
Thanks for the snippet, sadly it's not something we can run independency... Would you be able to prep a reproducer we can run independently somehow? Looking at the code I don't see anything very wrong with it - would be great if you'd be able to isolate the problem somehow. On Tue, Sep 8, 2015 at

Re: [akka-user] Re: Akka HTTP authentication

2015-09-17 Thread Konrad Malawski
Hi Rahul, good catch, that directive has not been ported yet. We're thinking if it should reside in core akka or as an external library, here's the ticket about it: https://github.com/akka/akka/issues/18472 You could for now simply re-use the spray one (should be copy-paste-able): https://github.c

Re: [akka-user] [akka persistence]: modeling user sessions

2015-09-17 Thread Konrad Malawski
Hi there, In general we provide architecture guidance and reviews as a commercial service available to our customers, so if you're interested in a deep dive into architecture details with us, please use the contact form . >From a high level view though: -

Re: [akka-user] [akka-http] No response is returned when the request payload exceeds the configured max-content-length

2015-09-17 Thread Konrad Malawski
Thanks for reporting, we definitely should render a 413 in this case I'd say. I opened a ticket for tracking this and will have a look into it soon, thanks! https://github.com/akka/akka/issues/18509 On Mon, Sep 14, 2015 at 2:57 PM, birynk wrote: > Hi, > > We are using akka-http 1.0 to implement

Re: [akka-user] [akka-http] Where did Spray's anyParams go?

2015-09-17 Thread Konrad Malawski
.. :) > > > On Tuesday, September 15, 2015, Konrad Malawski > wrote: > >> Thanks for the info! >> That confirms my thinking that it's a nice-to-have but not actually that >> useful in prod setting (took note here >> https://github.com/akka/akka/

Re: [akka-user] Akka-Http handle Multipart formData

2015-09-17 Thread Konrad Malawski
Hi Lucian, As discussed on gitter, I believe this is doable using the formFields directive for example: formFields('json, 'file.as[StrictForm.FileData]) { case (json: String, file: StrictForm.FileData) => // not tested though... I agree that this should be a) very simple and b) well documented, w

Re: [akka-user] [akka-http] No response is returned when the request payload exceeds the configured max-content-length

2015-09-17 Thread Konrad Malawski
Hey again, I ran a test using a very simple server and I can not reproduce the problem you describe, everything works as expected, see a detailed response: https://github.com/akka/akka/issues/18509 Could you provide a reproducer which would show when this does not work as expected? Thanks in adv

Re: [akka-user] Re: Akka HTTP authentication

2015-09-17 Thread Konrad Malawski
would be maintainable. Help from the community to maintain the LDAP integration would be awesome, anyone interested? --  Cheers, Konrad `ktoso` Malawski Akka @ Typesafe On 17 September 2015 at 15:20:41, Konrad Malawski (kt...@typesafe.com) wrote: Hi Rahul, good catch, that directive has not

Re: [akka-user] Unit testing Akka-http low level API

2015-09-22 Thread Konrad Malawski
Noted, will do :) On Sep 22, 2015 19:30, "Val P" wrote: > Thank you, that helps. Yes, it would be helpful to have a note in the > documentation, or even an example on how to test the low level examples in > the documentation. > > > On Monday, September 14, 2015

[akka-user] [whoops] Accessing response entity as String in Akka Http

2015-09-24 Thread Konrad Malawski
I mis-clicked when accepting this email to be pushed to the mailing list, sorry Jose! Posting on Jose's behalf, will answer soon: I need to sign the response, and the signature depends on the response entity as a String, so far I have achieve this but I couldn't figure out how to do it without

Re: [akka-user] dynamodb snapshot plugin

2015-09-28 Thread Konrad Malawski
Hi Paul! I'm aware of this journal implementation: https://github.com/sclasen/akka-persistence-dynamodb/ however it has not been updated to 2.4 SPIs yet. I'm not sure if it has also implemented a snapshot-store, I think not (by skimming it for 10seconds). You may want to reach out to that plugin's

Re: [akka-user] akka persistence and custom serlializer

2015-09-29 Thread Konrad Malawski
Hi there, please always state which journal you're using when talking about serialization in Akka Persistence. It's up to the Journal to decide how to serialize things, it does not have to use Akka Serialization at all (!). In your case I believe you're using the in memory-journal, thus the seri

Re: [akka-user] Whatch Tcp socket unbound connections

2015-09-29 Thread Konrad Malawski
When you unbind you get a future that completes once unbinding has completed: ``` val binding: Future[ServerBinding] =   Tcp().bind("127.0.0.1", ).to(Sink.ignore).run()   binding.map { b =>     b.unbind() onComplete {        case _ => // ...      }   } ``` If this is missing from the docs th

Re: [akka-user] Re: Akka Http Client - Unmarshal Cookies

2015-09-30 Thread Konrad Malawski
Glad you found it Jean-Pierre, that's exactly the way to go :) I opened up a ticket to explain it more explicitly in the docs: https://github.com/akka/akka/issues/18604 Happy hakking! On Wed, Sep 30, 2015 at 9:29 AM, Jean-Pierre Thomasset < jpthomas...@gmail.com> wrote: > Answering to myself, in

Re: [akka-user] Whatch Tcp socket unbound connections

2015-09-30 Thread Konrad Malawski
xplicitly unbind the Tcp >> connection, right? I don't want that. I want to monitor when the Tcp socket >> is unbound due to a connection closed by the client or a connectivity issue. >> >> Cheers, >> Leo >> >> On Tuesday, 29 September 2015

Re: [akka-user] ANNOUNCE: Akka 2.4.0 Released

2015-10-01 Thread Konrad Malawski
Great catch, thanks Wolfgang! I'll fix that. --  Cheers, Konrad `ktoso` Malawski Akka @ Typesafe On 1 October 2015 at 13:39:00, Wolfgang Friedl (wolfgang.fri...@hotmail.com) wrote: Looking forward to use 2.4.0 :) I just found that in the documentation for the persistence module (http://doc.ak

Re: [akka-user] ANNOUNCE: Akka 2.4.0 Released

2015-10-01 Thread Konrad Malawski
Fix submitted: https://github.com/akka/akka/pull/18622 Thanks again Wolfgang :) --  Cheers, Konrad `ktoso` Malawski Akka @ Typesafe On 1 October 2015 at 13:42:34, Konrad Malawski (konrad.malaw...@typesafe.com) wrote: Great catch, thanks Wolfgang! I'll fix that. --  Cheers, Konrad `

Re: [akka-user] Re: Size limitation for data upload in akka http

2015-10-08 Thread Konrad Malawski
Hi there, Yes, please increase that setting, it does the limiting by counting how many bytes where sent and if it's exceeded aborts. No, increasing this setting to a large number will *not* cause the file be buffered in completeness in memory (!) - while using Akka HTTP you're safe from those

Re: [akka-user] Akka HTTP keep-alive timeout

2015-10-09 Thread Konrad Malawski
Hi there, we recently implemented the needed internal infrastructure for timeouts to be implemented efficiently, however have not yet wired up the Http / TCP level idleTimeout option to actually do it, the ticket covering it is: https://github.com/akka/akka/issues/16597 So it's a simple setting

Re: [akka-user] Persistence of dynamic hierarchy of actors with short/medium length of life

2015-10-09 Thread Konrad Malawski
Hi Robert, In order to get this right you'll need to pivot your thinking about serialization a bit, i.e. the problem statement of "serializing dynamic hierarchy of actors" is not a good one to try to design for directly – actors are entities "which do stuff and have state". The hierarchy is not rea

Re: [akka-user] "Returning" a value from an ActorPublisher?

2015-10-10 Thread Konrad Malawski
Hi there, If the stream completes the actor will be stopped, you can use the usual `postStop` method to "do things in there" i.e. signal this max processed element or something else somewhere. If you can draw up a more specific example we could work on that. Do you want to expose this value as t

Re: [akka-user] Akka-Stream not truncating and failing

2015-10-11 Thread Konrad Malawski
Are there any performance issues with the seconds approach (scala.io.Source.fromFile(file).getLines()))? If I remember correctly 5 to 10 times slower than SynchronousFileSource, *and* the Source.fromFile used (like in the above) example leaks open FileInputStreams which you never close. Synchro

Re: [akka-user] [akka-http] mapInnerRoute is not working

2015-10-12 Thread Konrad Malawski
Hi Jack, please don't double post questions to multiple forums at the same time, it makes tracking if something is resolved or not yet much harder for us. Or post the solution on the relevant cross-posted threads once you have found it, so others can benefit from fiding it, thanks a lot in advance!

Re: [akka-user] "Returning" a value from an ActorPublisher?

2015-10-12 Thread Konrad Malawski
out it once we release 1.1 would be really valuable, thanks! Hope this helps, happy hakking! On Sun, Oct 11, 2015 at 1:06 AM, Jan Algermissen wrote: > > > On Saturday, October 10, 2015 at 11:18:20 PM UTC+2, Konrad Malawski wrote: >> >> >> Since an ActorPublisher can get

Re: [akka-user] Fast publisher, slow consumer for incoming tcp connections

2015-10-13 Thread Konrad Malawski
Not generate elements  I don't think its possible for incoming connections if I am correct?  You kind of can...  If your connection accepting flow is very slow, we won't accept the connections inside Akka IO. However the Kernel (i.e. Linux) will finish the TCP handshake in any case and it has a

Re: [akka-user] How is Initial Demand Generated in this Example?

2015-10-13 Thread Konrad Malawski
Hi Abhijit, truth is, you should never depend on actual demand numbers for any kind of correctness of your algorithm. Stages (i.e. fan-in, fan-out, linear etc) can contain arbitrary request strategies and by itself (and by design) it's not a good idea to try to depend on actual demand numbers. Dig

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