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 act

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

2016-05-02 Thread Konrad Malawski
ng is there another way to handle this scenario through Akka (by defining some strategy at system level) or just use Java Exception handling? On Monday, 2 May 2016 16:39:46 UTC-5, Konrad Malawski wrote: Who's the parent of the persistent actor? :-) Persistent actors can be normal children

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] 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, a

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:  https://github.com/akka/akka/

Re: [akka-user] Illegal to close over saveSnapshot within persistAll

2016-05-06 Thread Konrad Malawski
BTW: If you want to store the snapshot after the persistAll has called all its callbacks you could instead do defer { saveSnapshot }. --  Konrad `ktoso` Malawski Akka @ Lightbend On 6 May 2016 at 10:41:02, Magnus Andersson (mag...@magnusart.com) wrote: Hi Yes, the buffer.isEmpty and checkSnaps

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) wrote

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] Re: Injecting messages on inactive stream

2016-05-06 Thread Konrad Malawski
LOL, me too – totally forgot we have that one...! Of course we do. Happy hakking / Have a nice weekend :-) --  Konrad `ktoso` Malawski Akka @ Lightbend On 6 May 2016 at 19:15:38, rklaehn (rkla...@gmail.com) wrote: Never mind. I guess I should stop coding and just enjoy the nice weather... http:

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" wrote: > I un

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

2016-05-07 Thread Konrad Malawski
or it, and I hope to get to work on it relatively soon. --  Konrad `ktoso` Malawski Akka @ Lightbend On 7 May 2016 at 08:35:37, Edmondo Porcu (edmondo.po...@gmail.com) wrote: This would be easier to find if one could enable logging on streams. Is there such a feature ? Sent from my iPhone On 7

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] 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 standard classes but the

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

2016-05-17 Thread Konrad Malawski
> context().actorOf(Props.create(priceProcessorCreator).withMailbox("bounded-mailbox-" > + 2048 / CONCURRENCY_LEVEL))). > collect(toCollection(() -> new > ObjectArrayList<>(CONCURRENCY_LEVEL; > > > > On Tuesday, May 17, 2016 at 8:44:03 AM UTC+1, Ko

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 use

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: http://a

Re: [akka-user] akka-http Http.outgoingConnectionHttps and self-signed certs

2016-05-17 Thread Konrad Malawski
Have you attempted to "do the right thing" ™? Which is to add the certificate to a trust store, instead of disabling all TLS features? It's actually not that hard and documented here:  http://typesafehub.github.io/ssl-config/CertificateGeneration.html Also, you can always drop down to the raw lo

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] 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 the

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. Happy hakking! --  Konrad `ktoso

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 no

Re: [akka-user] How do I get connected Inlet and Outlet ? Akka 2.4.6

2016-05-24 Thread Konrad Malawski
Throttle a Flow? Sorry, I did not dive deep into your code, as perhaps there's no need to, because: http://doc.akka.io/docs/akka/2.4.6/scala/stream/stages-overview.html#throttle and throttle on http://doc.akka.io/api/akka/2.4.6/#akka.stream.scaladsl.FlowOps --  Konrad `ktoso` Malawski Akka @ Lig

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 @ Lightb

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 => printl

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 contribu

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] 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, thanks

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

2016-06-01 Thread Konrad Malawski
I made a ticket for it, we'd happily someone do the porting / contribution: https://github.com/akka/akka/issues/20679 -- Konrad `ktoso` Malawski Akka @ Lightbend On 1 June 2016 at 09:48:12, Mohnish Kodnani (mohnish.kodn...@gmail.com) wrote: Hi, We have a

Re: [akka-user] Am I Reinventing the Wheel?

2016-06-01 Thread Konrad Malawski
I was working on a supervisor that lazy creates actors based on some key and then will forward messages to that actor. That's Cluster Sharding :-) http://doc.akka.io/docs/akka/snapshot/scala/cluster-sharding.html Technically you can use it on one node too, yeah. Happy hAkking! -- Konrad `ktos

Re: [akka-user] akka directive for uploading multiple files

2016-06-02 Thread Konrad Malawski
Look into the implementation of the directive and extend it for multiple I'd say. We'd be very happy to accept a PullRequest with such feature! -- Konrad `ktoso` Malawski Akka @ Lightbend On 2 June 2016 at 08:25:43, Leo Wolf (leo.lai.w...@gmail.com) wrote:

Re: [akka-user] Using Akka HTTP and another lib that also requires an ActorSystem

2016-06-02 Thread Konrad Malawski
Don't use objects ;-) Use classes, and pass the system around to those who need it. class MyRepo(system: ActorSystem) { ... } -- Konrad `ktoso` Malawski Akka @ Lightbend On 2 June 2016 at 12:33:23, Luciano Molinari (lucmolin...@gmail.com) wrote: Hi all,

Re: [akka-user] Considerations when pushing millions of messages through DistributedPubSub?

2016-06-02 Thread Konrad Malawski
(Which is the reason we're currently re-implementing remoting, to be able to survive rates of up to a million per second - more on github.com/akka/akka-meta). -- Konrad `ktoso` Malawski Akka @ Lightbend On 2 June 2016 at 22:20:24, loe...@posteo.de (loe...@

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

2016-06-03 Thread Konrad Malawski
Right we have a ticket that sounds rather similar I believe (auto toStricting up unto a given limit), I agree it's a good idea. -- Konrad `ktoso` Malawski Akka @ Lightbend On 3 June 2016 at 11:21:00, daleksan (david.aleksandrow...@gmail.com) wrote: I can

[akka-user] Re: Akka/Spray CPU usage is 100%

2016-06-06 Thread Konrad Malawski
I'd suggest moving over to Akka HTTP (as Spray hasn't been developed since 2 years or so). See Akka documentation for using Akka HTTP -- Konrad On Monday, 6 June 2016 18:45:03 UTC+2, abhishek jain wrote: > > I have created a very basic Restful service in Spary. Locally it is all > working fine.

[akka-user] [ANNOUNCE] Announcing the new Akka Team Blog (Let it Crash!)

2016-07-06 Thread Konrad Malawski
Dear hakkers, We're very excited to be able to introduce the new and fresh Akka Team Blog! It's available here: blog.akka.io And we've already kick started it with 2 posts: - An Akka Community Update (July 2016) in which w

Re: [akka-user] Re: [ANNOUNCE] Announcing the new Akka Team Blog (Let it Crash!)

2016-07-06 Thread Konrad Malawski
I added some rel links, that's likely it. Thanks for rasing the issue :) On Jul 6, 2016 19:59, "Andrew Gaydenko" wrote: > Thanks! > At that moment for some reason Firefox hasn't found the refs. Now it does. > Sorry for noise. > > -- > >> Read the docs: http://akka.io/docs/ > >> Ch

[akka-user] ANNOUNCE: Akka 2.4.8 released!

2016-07-08 Thread Konrad Malawski
hoping to see more of those in the future. Thanks a lot! Credits: commits added removed 121292 176 Konrad Malawski 71251 41 Hawstein 5 314 41 Patrik Nordwall 4 81 23 Endre Sándor Varga 4 758 35 gosubpl 3 97 10 Richar

Re: [akka-user] Exception during Actor construction

2016-07-11 Thread Konrad Malawski
Please read the cluster docs: http://doc.akka.io/docs/akka/2.4/java/cluster-usage.html#A_Simple_Cluster_Example as the error hints at. -- Konrad `ktoso` Malawski Akka @ Lightbend On 11 July 2016 at 09:23:56, Drisha Roy (drish...@gmail.com) wrote: hi, I a

Re: [akka-user] Using WithoutSizeLimit of akka-http on specific route entity than using max-content-length setting at config level

2016-07-11 Thread Konrad Malawski
All directives have proper documentation, please read it: http://doc.akka.io/docs/akka/2.4.8/scala/http/routing-dsl/directives/misc-directives/withoutSizeLimit.html#example Happy hakking -- Konrad `ktoso` Malawski Akka @ Lightbend On 11 July 2016 at 09:2

Re: [akka-user] General Question on AKKA

2016-07-11 Thread Konrad Malawski
Like we explained many times, Akka Streams is NOT competing with Spark nor Flink–it's complementing them. Those are distributed stream processing engines. Akka Streams is a building block, that could be used to build such. So the question asked here can be translated as "Hadoop or Iterator?", wher

Re: [akka-user] akka-http receiving file upload without copying the file to memory

2016-07-13 Thread Konrad Malawski
`Strict` indicates "the entire thing is in memory. (run away before it blows up!!!)". How did you get this entity? Normally we don't expose Strict entities, you likely have converted to it explicitly => thus, loading the entire upload into memory. Don't do toStrict or any of these operations, just

Re: [akka-user] akka-http receiving file upload without copying the file to memory

2016-07-13 Thread Konrad Malawski
m> On 13 July 2016 at 16:04:14, Simao Mata (sima...@gmail.com) wrote: Ah, that explains it then. I am using `formFields('file.as[StrictForm.FileData])` to extract the file from the form. So is there a way I can get that data and not put it in memory? Thanks! On Wed, Jul 13, 2016,

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

2016-07-14 Thread Konrad Malawski
Use the community provided ones. There's no need for us to ship one if community has stepped up and provided libraries, as is the case here I believe :-) -- Konrad `ktoso` Malawski Akka @ Lightbend On 14 July 2016 at 15:26:04, Matan Safriel (dev.ma...@gmai

Re: [akka-user] problem connecting with TCP for file IO

2016-07-16 Thread Konrad Malawski
u can simply from.via(thingy) etc. Hope that's it, if not let me know and will have a proper look tomorrow. Cheers -- Konrad Malawski From: debasish Reply: akka-user@googlegroups.com Date: 16 July 2016 at 21:59:30 To: Akka User List Subject: [akka-user] problem connecting with TCP f

Re: [akka-user] SBT dependencies for Akka Sample Twitter Streaming Activator Template

2016-07-17 Thread Konrad Malawski
I'd propose you open a ticket in that persons / projects github repo: https://github.com/vrcod/akka-sample-twitter-streaming#master It's more likely to result in some response the nearer to the project this is communicated. You also can submit a PR updating the deps, I'm sure the guy would be happ

Re: [akka-user] Akka Streams Graph Editor tool

2016-07-17 Thread Konrad Malawski
You may enjoy these Omnigraffle stencils: https://www.graffletopia.com/stencils/1493 by Derek Wyatt -- Konrad `ktoso` Malawski Akka @ Lightbend On 16 July 2016 at 17:44:18, Sergey Sopin (sopin1...@gmail.com) wrote: Hi, Is there any tool which allows to d

Re: [akka-user] Akks in Scala console

2016-07-17 Thread Konrad Malawski
You're missing a bunch of dependencies, you also need akka-actor, akka-http-experimental, akka-http-core etc. Please use a proper build tool, like sbt in which you can add: in build.sbt: libraryDependencies += "com.typesafe.akka" %% "akka-http-spray-json-experimental" % "2.4.8" this will resolve

Re: [akka-user] Re: actor lookup and restart

2016-07-19 Thread Konrad Malawski
Don't do static global state, it's a bad code smell in general. -- Konrad `ktoso` Malawski Akka @ Lightbend On 19 July 2016 at 10:05:11, James (breath...@gmail.com) wrote: Thank you Rob, Another way is to pass the actorRef to a static object, which can

Re: [akka-user] Re: Akka WebSocket as an Api

2016-07-19 Thread Konrad Malawski
Wanted to ask about your considerations for tradeoffs for using Play vs straight Akka-Http-Stream and Websockets? Akka is a toolkit. Play is a framework. If it's a "web app" Play would be better. If it's "raw api" I would recommend Akka HTTP though quite honestly it's a personal preference thing (

Re: [akka-user] Make HTTPS request using akka-http to jenkins server

2016-07-20 Thread Konrad Malawski
Please read: http://doc.akka.io/docs/akka/2.4.8/scala/http/client-side/client-https-support.html#clientsidehttps and: http://typesafehub.github.io/ssl-config/ Note that you're using SSLContext.getDefault, pretty sure that's not a good idea for you. Also, what's the error? Please post the exceptio

Re: [akka-user] Re: Make HTTPS request using akka-http to jenkins server

2016-07-20 Thread Konrad Malawski
Pretty sure there's a stack trace there though? What happens on default settnigs – dont manually set the JVM default context. -- Konrad `ktoso` Malawski Akka @ Lightbend On 20 July 2016 at 14:13:39, Ajinkya Shukla (ajinkyashukl...@gmail.com) wrote: I get

Re: [akka-user] Creating Actor w/ Props having Value Class Argument(s)

2016-07-20 Thread Konrad Malawski
Because the type (wrapper) is not there at runtime. AnyVal is a Scala compiler optimisation, so we can't figure out the right constructor (always / safely) in runtime. A resolution would be to "if thing has one field, and that value matches we use that field" which could lead to very weird behavio

Re: [akka-user] How to use WebSockets with ActorPublisher?

2016-07-20 Thread Konrad Malawski
Could you provide a sample snippet that we could help out with? Context helps to get quicker help. -- Konrad `ktoso` Malawski Akka @ Lightbend On 20 July 2016 at 16:03:30, Jakub Liska (liska.ja...@gmail.com) wrote: hey, I hit a deadend with combination o

Re: [akka-user] How to use WebSockets with ActorPublisher?

2016-07-20 Thread Konrad Malawski
rRef) val stateChangeSource = Source.fromPublisher(stateChangePublisher) And I can send messages to stateChangePublisherRef and push them to Browser... On Wednesday, July 20, 2016 at 4:07:13 PM UTC+2, Konrad Malawski wrote: > > Could you provide a sample snippet that we could help out with? &g

Re: [akka-user] Creating Actor w/ Props having Value Class Argument(s)

2016-07-20 Thread Konrad Malawski
figure out the right constructor (always / safely) in runtime. Thanks On Wednesday, July 20, 2016 at 9:44:33 AM UTC-4, Konrad Malawski wrote: > > Because the type (wrapper) is not there at runtime. > AnyVal is a Scala compiler optimisation, so we can't figure out the right > co

Re: [akka-user] How to use WebSockets with ActorPublisher?

2016-07-20 Thread Konrad Malawski
Ref[User.OutgoingMessage](10, OverflowStrategy.fail). > mapMaterializedValue > > the actorRef can be passed to a different Actor that would feed it > messages and it would all behave like ActorPublisher, right? > > On Wednesday, July 20, 2016 at 4:21:35 PM UTC+2, Konrad Malawski wro

Re: [akka-user] akka http client only excecute the `max-connections` times ~

2016-07-21 Thread Konrad Malawski
You're not using the data you've requested, thus stalling the connections. This is by design. Akka HTTP is a *streaming* HTTP Client. Please read the docs about this: http://doc.akka.io/docs/akka/2.4/scala/http/implications-of-streaming-http-entity.html -- Konrad `ktoso` Malawski Akka

Re: [akka-user] Error about download akka proj from github and open it as a proj in intellij

2016-07-21 Thread Konrad Malawski
Hi Leo, what PR are you working on? But I found out there are lots of errors in build.sbt in every directory. For instance, For the most part you can ignore these if intellij doesn't pick them up. The import into intellij from sbt feature works properly. And, I create a test.scala in akka.http.

Re: [akka-user] A problem ablout Akka cluster brain crack

2016-07-21 Thread Konrad Malawski
See here about a long discussion of the topic: http://doc.akka.io/docs/akka/rp-16s01p05/scala/split-brain-resolver.html auto-down is not very reliable. if you don't want to use SBR, then you can implement a simple quorum (or monitoring system) based downing yourself. -- Konrad `ktoso` Malawski A

Re: [akka-user] Re: akka-http web socket issue

2016-07-21 Thread Konrad Malawski
Yes it works. What's wrong about Streamed? That's a feature that it's streaming the data – consume it using the dataBytes contained in the Streamed message. -- Konrad `ktoso` Malawski Akka @ Lightbend On 21 July 2016 at 10:45:03, allobi...@gmail.com (allob

Re: [akka-user] [Cluster] Association failed even though cluster.leave(cluster.selfAddress) was called?

2016-07-25 Thread Konrad Malawski
What do you do after you call leave? -- Konrad `ktoso` Malawski Akka @ Lightbend On 25 July 2016 at 20:27:29, kraythe (kray...@gmail.com) wrote: In our code prior to shutting down a node we issue the following call. val cluster: Cluster = Cluster.get(sys

Re: [akka-user] [Cluster] Association failed even though cluster.leave(cluster.selfAddress) was called?

2016-07-25 Thread Konrad Malawski
Well the node leaving does nothing but shut down. The other nodes go on with life of course. That's exactly the problem though: You exit the JVM before anyone has the chance to even receive the Leave message. You should await the gossip message, basically: Cluster.subscribe(self, classOf[MemberR

Re: [akka-user] High-level Server-Side API Minimal Example not working

2016-07-26 Thread Konrad Malawski
Hi there, I just copy pasted the file and have to say "it works here". Are you sure you have dependencies for akka-http-experimental in your build? It works since ContentTypes is part of the akka.http.scaladsl.model package, and that we've imported all the symbols from at the top of the file: imp

Re: [akka-user] Dose akka suit parallelism?

2016-07-27 Thread Konrad Malawski
Concurrency enables parallelism. So yes. -- Konrad `ktoso` Malawski Akka @ Lightbend On 27 July 2016 at 08:11:51, Qr Wang (zodi...@gmail.com) wrote: Hello everyone, I know akka is a concurrency framework.But does it fit parallelism coding?Or just use -- >

Re: [akka-user] Does akka have implement indirect probe?

2016-07-27 Thread Konrad Malawski
Hi Yutao, no, the Akka Cluster gossip does not perform indirect probing. Since Akka messaging is direct between nodes (in most cases), indirect reachability (with direct non-reachability) would still mean messages to Mj would be lost, even if we could route messages "around there via Mk". Such rou

Re: [akka-user] Why isn't akka PersistenceQuery using the Event Adapter configuration?

2016-07-29 Thread Konrad Malawski
I believe this was by design actually if I remember correctly, as we considered the read side may want to operate on the raw events by default. Let's say that in the same app that needs adapters for the PersistentActors you want to project a view from historical data, thus you may not want to appl

Re: [akka-user] Get ActorSystem as part of a stream materialization process

2016-07-30 Thread Konrad Malawski
Not using safe APIs. But instead I'd turn around the question and ask what you're trying to achieve? Perhaps there's a cleaner way than reaching out to the ActorSystem. -- Konrad `ktoso` Malawski Akka @ Lightbend On 30 July 2016 at 22:39:47, oleksiys (kvr.

Re: [akka-user] Get ActorSystem as part of a stream materialization process

2016-07-30 Thread Konrad Malawski
a watch for the master actor and kill the stream using KillSwitch, once master actor shuts down. As an alternative I can probably create a branch in the flow, filter off all the possible events/messages and attach the master actor as a Sink.actorRef. WDYT? Thanks. WBR, Alexey On Sat, Jul

Re: [akka-user] Get ActorSystem as part of a stream materialization process

2016-07-30 Thread Konrad Malawski
(feel free to copy paste the entire impl and use as-is if you want to btw) -- Konrad `ktoso` Malawski Akka <http://akka.io> @ Lightbend <http://lightbend.com> On 31 July 2016 at 00:52:56, Konrad Malawski (konrad.malaw...@lightbend.com) wrote: I like the idea, this can indeed be

Re: [akka-user] Re: [akka-streams] Trying to mimic socket level programming , connect client and then send data if connection is available

2016-08-01 Thread Konrad Malawski
Source.single completes the stream (closes the connection) once it has signalled the data. Simply put a Source.maybe behind it (a.concat(b)) or use a different source, like unfold or an iterator). -- Konrad `ktoso` Malawski Akka @ Lightbend On 1 August 201

Re: [akka-user] Default for akka.http.server.remote-address-header

2016-08-01 Thread Konrad Malawski
If you need it, you'll find the option. Why make everyone pay the price of fabricating that header :-) Also, it's a bit weird – people are not expecting headers that were not in the request to show up. It's a more natural learning curve that you discover the feature and opt into it. -- Konrad `k

Re: [akka-user] Default for akka.http.server.remote-address-header

2016-08-01 Thread Konrad Malawski
two headers, you wouldn’t want to magically see a third added. So no performance implications that you know of? On August 1, 2016 at 1:19:32 PM, Konrad Malawski ( konrad.malaw...@lightbend.com) wrote: If you need it, you'll find the option. Why make everyone pay the price of fabricating that

Re: [akka-user] Re: Websockets and Flow.fromSinkAndSource

2016-08-01 Thread Konrad Malawski
Please read the docs on this topic: http://doc.akka.io/docs/akka/2.4/scala/http/client-side/websocket-support.html#Half-Closed_WebSockets -- Konrad `ktoso` Malawski Akka @ Lightbend On 1 August 2016 at 20:17:56, Aditya Prasad (akpra...@gmail.com) wrote: t

Re: [akka-user] Re: How to read XML inputstream (with SAX parser) received by akka-http?

2016-08-02 Thread Konrad Malawski
Yeah, that'd be good to collect usecases and demadn there. Though with SAX it won't be automagical ever, they always require manually writing the parsing AFAIR -- Konrad `ktoso` Malawski Akka @ Lightbend On 2 August 2016 at 10:29:21, André (andre.ruedi...@

Re: [akka-user] Re: How to read XML inputstream (with SAX parser) received by akka-http?

2016-08-02 Thread Konrad Malawski
Stream because of SAX parser) the data when the first bits are received. I'm not able to wait and load all data into memory before to use it. I can not yet find the way to do it. I need a little help :) Le mardi 2 août 2016 10:31:01 UTC+2, Konrad Malawski a écrit : > > Yeah, that&#

Re: [akka-user] Re: [ANNOUNCE] Akka 2.4.9-RC1 Released! (Akka HTTP Performance and Entity Streaming)

2016-08-03 Thread Konrad Malawski
Hi Jason, sadly the sbt-osgi plugin did something rather silly (I went in and fixed the plugin today) breaking the release if Java Marshallers are used. See here for details and workaround: https://github.com/akka/akka/issues/21105 Thanks for trying out the release candidate and thanks for your un

Re: [akka-user] Akka Cluster (with Sharding) not working without auto-down-unreachable-after

2016-08-04 Thread Konrad Malawski
Just to re-affirm what Justin wrote there. Auto downing is "auto". It's dumb. That's why it's not safe. The safer automatic downing modes ones are in doc.akka.io/docs/akka/rp-16s01p05/scala/split-brain-resolver.html Yes, that's a commercial thing. If you don't want to use these, use EC2's APIs -

Re: [akka-user] Akka Stream

2016-08-04 Thread Konrad Malawski
Yes, this is the right place. Announcements are here, as well as general community discussions. For news only you may want to subscribe to: akka.io/news And for blogs from the core team there's akka.io/blog -- Konrad `ktoso` Malawski Akka @ Lightbend On 4

Re: [akka-user] Re: Multipart Fileupload problem with Akka 2.4.8 and 2.4.9-RC1

2016-08-04 Thread Konrad Malawski
Glad that was it Scott. I'd recommend keeping an akka.version property in properties in Maven, and bump it there each time instead of specifically keeping the version in all dependencies explicitly. Hope this helps, happy hakking! -- Konrad `ktoso` Malawski Akka @ Lightbend

Re: [akka-user] Akka Stream

2016-08-04 Thread Konrad Malawski
e. I can only input the one that is defined by the source. On Thursday, 4 August 2016 13:57:28 UTC+1, Konrad Malawski wrote: > > Yes, this is the right place. > Announcements are here, as well as general community discussions. > > For news only you may want to subscribe to: akka.io

Re: [akka-user] Stream within Actor Supervision

2016-08-04 Thread Konrad Malawski
Hello there, please read the docs on Stream error handling: http://doc.akka.io/docs/akka/2.4.9-RC1/scala/stream/stream-error.html#stream-error-scala -- Konrad `ktoso` Malawski Akka @ Lightbend On 4 August 2016 at 23:47:27, Gary Struthers (agilej...@earthli

Re: [akka-user] Re: Akka Java IO TLS

2016-08-04 Thread Konrad Malawski
I have found handing SSL/TLS from JVM a PITA. Why you don't put the SSL termination in front of the Akka HTTP endpoint (e.g. nginx) ? I'd honestly +1 that (a lot). -- Konrad `ktoso` Malawski Akka @ Lightbend -- >> Read the docs: http://akk

Re: [akka-user] Stream within Actor Supervision

2016-08-04 Thread Konrad Malawski
If you write *custom* GraphStages, then *you* need to decide what supervision means in that context – then is supports it: https://github.com/akka/akka/commit/5382014133d01cd38729d731763841680f93a42c#diff-3203199ba389ee802eef94486f26dc88R41 -- Konrad `ktoso` Malawski Akka @ Ligh

Re: [akka-user] Stream within Actor Supervision

2016-08-05 Thread Konrad Malawski
Stream errors are *in* the stream. It does not blow up the Actor, nor should it. What's your use case? -- Konrad `ktoso` Malawski Akka @ Lightbend On 5 August 2016 at 09:31:16, Gary Struthers (agilej...@earthlink.net) wrote: I think I understand. The oth

Re: [akka-user] Re: Multipart Fileupload problem with Akka 2.4.8 and 2.4.9-RC1

2016-08-05 Thread Konrad Malawski
Hi Scott, OSGi messed up our RC1 release. Sorry for the trouble, though glad we did the RC which is there for finding such issues before we release a stable version. The bug is explained in https://github.com/akka/akka/issues/21105 and I've fixed both root cause and sbt plugin so we'll never have

Re: [akka-user] What means of akka cluster roles leader?

2016-08-15 Thread Konrad Malawski
Hi Yutao, look at the return type – Option, so it's a single element. It returns the leader of a given role (role == multiple nodes, 1 of them is the leader). I.e. it would host the the Singleton if it were constrained to this role. -- Konrad `ktoso` Malawski Akka @ Lightbend

Re: [akka-user] What means of akka cluster roles leader?

2016-08-15 Thread Konrad Malawski
Duh, my bad. I keep mistaking the use of oldest and leader in this somehow. Thanks for the correction Patrik! On 15 Aug 2016 13:50, "Patrik Nordwall" wrote: > > > On Mon, Aug 15, 2016 at 11:27 AM, Konrad Malawski < > konrad.malaw...@lightbend.com> wrote: > >

Re: [akka-user] Re: Access Denied Downloading standalone akka_2.11-2.4.9-RC2.zip

2016-08-15 Thread Konrad Malawski
Thanks for reporting, re-uploaded it. S3 was behaving weird it seems. -- Konrad `ktoso` Malawski Akka @ Lightbend On 15 August 2016 at 19:02:56, murtuza chhil (chil...@gmail.com) wrote: Its working now. -chhil On Monday, August 15, 2016 at 8:56:37 AM UT

Re: [akka-user] How materialized value is defined?

2016-08-17 Thread Konrad Malawski
Please read the docs: http://doc.akka.io/docs/akka/2.4/scala/stream/stream-customize.html#Custom_materialized_values -- Konrad `ktoso` Malawski Akka @ Lightbend On 17 August 2016 at 04:52:22, Guofeng Zhang (guofen...@gmail.com) wrote: Hi, The methods li

Re: [akka-user] Is compatible between AKKA 2.10_2.3.10 and AKKA 2.11_2.4.8?

2016-08-18 Thread Konrad Malawski
Scala 2.10 is not binary compatible with Scala 2.11 - it's a major version change in Scala. So no, it is impossible for a library, e.g. Akka to be "more compatible" than Scala itself. Akka 2.10_2.3.10 is NOT compatible with 2.11_2.4.8 but that's because the 2.10 != 2.11. Akka 2.11_.2.3.10 IS howev

Re: [akka-user] Meaning of the $ in the actor's path

2016-08-18 Thread Konrad Malawski
That it's a name generated by akka. You did not name your actor, so a default name was generated for it. Those are generated by using base64 on a sequence number. It's best practice to actually explicitly name your actor btw. On 19 Aug 2016 00:41, "Mark Kaberman" wrote: > I am creating my Akka

Re: [akka-user] [Akka-HTTP] How do I drop the connection from the Server?

2016-08-19 Thread Konrad Malawski
FYI for readers of this thread: We chatted this over on twitter https://twitter.com/derekwyatt/status/766652868052918272 In general it is not legal HTTP to not send a response code, so the typical proper way is to Connection: close and a 500 response code I'd say. The really killing a connection

Re: [akka-user] Akka Streams Graph Editor tool

2016-08-22 Thread Konrad Malawski
wrote: Hi again, Omnigraffle is very good program, but I use Windows :( Can you recommend something for it? Thanks! Regards, Sergey воскресенье, 17 июля 2016 г., 16:05:59 UTC+3 пользователь Konrad Malawski написал: > > You may enjoy these Omnigraffle stencils: https://www. > graffle

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

2016-08-22 Thread Konrad Malawski
Hmm... it could be. Quick question – do you perhaps have the ask pattern imported in this file? It could cause ambiguity with the ? from ask I just thought. -- Konrad `ktoso` Malawski Akka @ Lightbend On 22 August 2016 at 18:26:01, andrew.me...@bottlerock

Re: [akka-user] Akka based java web application deployment in Websphere 7

2016-08-22 Thread Konrad Malawski
correctly. I'd like to just mention that this isn't really the optimal way, but I understand it may be a situation of "Either in websphere, or not at all". If able to, Akka deployed standalone as runnable jar is the preferred way, as it's the most lightweight. Hope this he

Re: [akka-user] [akka-stream] Multi input/output flow

2016-08-25 Thread Konrad Malawski
Handlers have no shape. The GraphStage does. So your stage has some shape. And then you set as many handlers as you need. Still simple sources and sinks, but we just published a blog post explaining it a bit more: http://blog.akka.io/integrations/2016/08/25/simple-sink-source-with-graphstage --

Re: [akka-user] [akka-stream] Multi input/output flow

2016-08-25 Thread Konrad Malawski
not work in my case, so I need something new here. Could you please tell me how to create such multi inlet/outlet shape? Or please explain me if I don't understand something. Thanks a lot! четверг, 25 августа 2016 г., 17:50:00 UTC+3 пользователь Konrad Malawski написал: > > Handlers h

Re: [akka-user] [akka-stream] Multi input/output flow

2016-08-25 Thread Konrad Malawski
Java? Regards, Sergey четверг, 25 августа 2016 г., 21:16:44 UTC+3 пользователь Konrad Malawski написал: > > If it has more than 1 input and 1 output it's not a Flow anymore, so let's > not refer to it as a Flow. > It's a Graph of a given Shape. > > There's nothing sp

Re: [akka-user] Delay within GraphStageLogic

2016-08-25 Thread Konrad Malawski
Hi there, you'd extend TimerGraphStageLogic instead and call scheduleOnce or schedulePeriodicallyWithInitialDelay. The timer will call your onTimer method then. This is all documented here: http://doc.akka.io/docs/akka/2.4.9/scala/stream/stream-customize.html#Using_timers Please read all the Graph

Re: [akka-user] Unmarshaller not working for HttpEntity for text/html response for "Error in stage [unknown-operation]: Promise already completed"

2016-08-28 Thread Konrad Malawski
What Akka version are you on? We have a similar issue reported but in a slightly different place... https://github.com/akka/akka/issues/19981 What is the server responding with specifically? I'd be very suprised if on a normal usual response we fail toStricting() this is used by all tools, includ

<    3   4   5   6   7   8   9   10   11   >