Re: [akka-user] [Streams] Is ActorPublisher requested asynchronously or sequentially?

2015-05-25 Thread Viktor Klang
Fair enough! On Mon, May 25, 2015 at 1:28 PM, Jakub Liska liska.ja...@gmail.com wrote: Yeah, but I'm willing to prefer correctness over performance in this case because a month ago I was pretty sure that it was almost impossible to implement a non-blocking/asynchronous ActorPublisher. I don't

Re: [akka-user] [Streams] Is ActorPublisher requested asynchronously or sequentially?

2015-05-25 Thread Viktor Klang
Blocking is never ideal :) A non-blocking alternative might be to have it use pipeTo and send the actor a message and then react to that message. On Mon, May 25, 2015 at 1:08 PM, Jakub Liska liska.ja...@gmail.com wrote: Good thinking :-) Blocking the scroll async method right away seems to be

Re: [akka-user] Flow supervision decider

2015-05-25 Thread Viktor Klang
be wrapped (i.e. considered fatal, for the stream, and which should't). Tracking stream element processing failures is not a black-n-white thing for sure, but I tend to error in the direction of explicitness. Sent from my iPhone On May 20, 2015, at 3:13 PM, Viktor Klang viktor.kl...@gmail.com

Re: [akka-user] Flow from an Actor

2015-05-26 Thread Viktor Klang
Not knowing what your actor is trying to do, what about Flow.mapAsync + ask? -- Cheers, √ On 26 May 2015 14:54, Sam Halliday sam.halli...@gmail.com wrote: Hi all, I need to interface an Actor with an API that requires a Flow. The actor can receive a sealed trait family of inputs and will

Re: [akka-user] Cluster disconnection - Failed to write message to the transport

2015-05-26 Thread Viktor Klang
Hi Mozik, please upgrade to the latest version and report back if you still have the same problem. On Tue, May 26, 2015 at 2:03 PM, rno...@quixey.com wrote: Hi Everyone, I've been trying to set an Akka cluster with one master node and multiple workers. The workers are actor systems than run

Re: [akka-user] hundreds of thousands of instances for akka.dispatch.AbstractNodeQueue$Node - why?

2015-05-21 Thread Viktor Klang
Hi Eugene, Those two correspond to usage of the Scheduler to defer things for a specified amount of time. IIRC there was recently a discussion whether there could be a memory leak related to this. On Thu, May 21, 2015 at 6:35 PM, Eugene Dzhurinsky jdeve...@gmail.com wrote: Hello! I recently

Re: [akka-user] hundreds of thousands of instances for akka.dispatch.AbstractNodeQueue$Node - why?

2015-05-22 Thread Viktor Klang
Thread subject: [akka-user] system.scheduler.scheduleOnce consumes Heap over time -- Cheers, √ On 22 May 2015 08:59, Endre Varga endre.va...@typesafe.com wrote: On Thu, May 21, 2015 at 9:18 PM, Viktor Klang viktor.kl...@gmail.com wrote: Hi Eugene, Those two correspond to usage

Re: [akka-user] hundreds of thousands of instances for akka.dispatch.AbstractNodeQueue$Node - why?

2015-05-22 Thread Viktor Klang
Could be a scheduling artifact? -- Cheers, √ On 22 May 2015 15:29, Endre Varga endre.va...@typesafe.com wrote: On Fri, May 22, 2015 at 3:28 PM, Viktor Klang viktor.kl...@gmail.com wrote: Thread subject: [akka-user] system.scheduler.scheduleOnce consumes Heap over time That had

Re: [akka-user] Re: PinnedDispatcher with SingleConsumerOnlyUnboundedMailbox behaviour

2015-05-26 Thread Viktor Klang
but the Scala configurator should provide one of your lovely queues which I know are extremely optimized compared to ArrayBlockingQueue, LinkedBlocking and ConcurrentLinkedQueue Java counter parts, right? On Tue, May 26, 2015 at 5:54 PM, Viktor Klang viktor.kl...@gmail.com wrote: Hi Guido

Re: [akka-user] Re: PinnedDispatcher with SingleConsumerOnlyUnboundedMailbox behaviour

2015-05-26 Thread Viktor Klang
Hi Guido, the good news is that the ExecutorService for the Dispatcher is pluggable so you can provide your own, optimized version. Would love to hear how much of a difference it could make (JMH bench would be superb). On Tue, May 26, 2015 at 6:35 PM, Guido Medina oxyg...@gmail.com wrote: In

Re: [akka-user] Re: Looking for Code example to create akka.http.javadsl.testkitTestResponse

2015-08-13 Thread Viktor Klang
java.lang.Void? -- Cheers, √ On 13 Aug 2015 09:01, Akka Team akka.offic...@gmail.com wrote: Yes, that is a little unfortunate: the Scala type system allows the expression of non-termination (the bottom type—Nothing) which Java does not know about, so this it what happens “under the hood”

Re: [akka-user] Association with remote system ... has failed problem

2015-08-22 Thread Viktor Klang
As a general rule, it is quicker to try the latest release and see if that fixes the problem. On Sat, Aug 22, 2015 at 9:00 AM, tjackson5...@gmail.com wrote: I encounter a problem where the actor seems to stop its execution because of Association failure issue. Below is the error message

Re: [akka-user] Serialization Exception in hazelcast 3.5 with Scala

2015-08-20 Thread Viktor Klang
How is this related to Akka? On Thu, Aug 20, 2015 at 3:21 AM, M.Ahsen Taqi Kazmi ahsen.ifk...@gmail.com wrote: I am using Hazelcast 3.5 with scala i have a case class Abc i am trying to store object of my class in hazelcast from my client but it gives me some serialization exception here

Re: [akka-user] Is this the correct flow to retrieve bytes from an HttpResponse?

2015-07-30 Thread Viktor Klang
Happy hAkking! -- Cheers, √ On 30 Jul 2015 12:25, john.vie...@gmail.com wrote: I think you may be showing me an error in my design. the HttpResponse contains json which I then decode back to java Objects. These json payloads will never be 4 gb more 500kb - 10MB but I could be receiveing a

Re: [akka-user] [akka-streams] Consuming on TCP server side - is this really the best way?

2015-08-01 Thread Viktor Klang
this is excellent feedback, I think there's room for improvement for grokkability of Akka Streams, thanks Derek and Endre. -- Cheers, √ On 1 Aug 2015 13:12, Derek Wyatt de...@derekwyatt.org wrote: Endre Varga endre.va...@typesafe.com July 31, 2015 at 4:47 AM On Thu, Jul 30, 2015 at 9:07

Re: [akka-user] Can I share a mutable Context object between flows?

2015-08-01 Thread Viktor Klang
sounds like you should use a circular flowgraph instead. -- Cheers, √ On 1 Aug 2015 14:21, john.vie...@gmail.com wrote: no each stage or flow needs to add data to it. Like class Context{ String severPath; ByteString jsonBody Object result; } For example I have a

Re: [akka-user] Can I share a mutable Context object between flows?

2015-08-01 Thread Viktor Klang
if you have a clean handoff: no reading or writing to it once it is passed downstream, then it should work just fine. -- Cheers, √ On 1 Aug 2015 12:19, john.vie...@gmail.com wrote: I simplifies my stream if I use a mutable Context Object (one per request) which gets created in the source and

Re: [akka-user] Is this the correct flow to retrieve bytes from an HttpResponse?

2015-07-30 Thread Viktor Klang
What's the use-case? -- Cheers, √ On 30 Jul 2015 08:18, john.vie...@gmail.com wrote: // this is part of a BidiFlow FlowShapeTuple2TryHttpResponse, RequestResult, Tuple2ByteString, Object bottom = b.graph(Flow.Tuple2TryHttpResponse, Objectempty(). mapAsync(4,

Re: [akka-user] Is this the correct flow to retrieve bytes from an HttpResponse?

2015-07-30 Thread Viktor Klang
so if the user sends 4gb you want to load it all into memory and crash the jvm? :-) What's the use-case where you can't stream it? -- Cheers, √ On 30 Jul 2015 10:31, john.vie...@gmail.com wrote: the usecase is getting a complete ByteString from a from HttpResponse. I joinded a BidiFlow (

Re: [akka-user] How does Akka avoid Live Lock?

2015-08-06 Thread Viktor Klang
hi, what you describe is not a live lock, it is a dead lock. the reason why akka avoids them is that akka goes very far in not using locks. -- Cheers, √ On 6 Aug 2015 18:02, kraythe kray...@gmail.com wrote: Currently our use of Akka is limited and I would like to increase it. However, I am

Re: [akka-user] Akka stream dynamic flow

2015-07-27 Thread Viktor Klang
Sounds like a stream of max speeds to me. On Mon, Jul 27, 2015 at 3:15 PM, matheuslima...@gmail.com wrote: I'm developing a system that process GPS and telemetry data and trigger some events based on parameters. One example is speed violation. One stage on my flow performs speed violation

Re: [akka-user] Akka stream dynamic flow

2015-07-27 Thread Viktor Klang
what is a dynamic parameter, could you describe who can change it, when and how many times? -- Cheers, √ On 27 Jul 2015 14:24, Matheus Lima matheuslima...@gmail.com wrote: How can I create a dynamic flow? I'm developing a stream processing application and I have a specific stage that I need

Re: [akka-user] Re: Akka Persistence, Cassandra and compaction strategies (DTCS)

2015-07-24 Thread Viktor Klang
20k/h is 5.5 per second and given about 1kb per event, that is about 20mb per hour, this is 480mb per day, which is about 171gb per year, which, according to this http://www.mkomo.com/cost-per-gigabyte-update means that it will cost you about $5.13 per year (going down). Given compression, you

Re: [akka-user] Re: Akka Persistence, Cassandra and compaction strategies (DTCS)

2015-07-24 Thread Viktor Klang
operation. Are you saying you generally never delete anything from the event store, at all? Or do you delete manually when needed? Anders On 24 July 2015 at 10:33, Viktor Klang viktor.kl...@gmail.com wrote: 20k/h is 5.5 per second and given about 1kb per event, that is about 20mb per hour

Re: [akka-user] Re: streams - shutting down a flow / exposing a materialized value

2015-07-26 Thread Viktor Klang
There is no stream cancellation, there is only erronous or normal completion. What does the java/scaladoc say? -- Cheers, √ On 26 Jul 2015 09:17, David Pinn dp...@byandlarge.net wrote: No, but I might try to put one together. When the tick source is cancelled, should that cause cancellation

Re: [akka-user] Re: streams - shutting down a flow / exposing a materialized value

2015-07-26 Thread Viktor Klang
Requesting one element at a time would lead to low-to-no concurrency and high overhead per element. Check input buffer size in Attributes. -- Cheers, √ On 26 Jul 2015 17:50, David Pinn dp...@byandlarge.net wrote: I think this could happen if a stage immediately requests the next element once

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

2015-07-22 Thread Viktor Klang
); Am Dienstag, 21. Juli 2015 12:00:51 UTC+2 schrieb Konrad Malawski: +1 for mapAsync + ask :-) -- Cheers, Konrad 'ktoso’ Malawski Akka http://akka.io @ Typesafe http://typesafe.com On 21 July 2015 at 11:59:41, Viktor Klang (viktor...@gmail.com) wrote: mapAsync + ask? On Tue, Jul

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

2015-07-22 Thread Viktor Klang
You'd preserve the order with a statically partitioned routing table using consistent hashing as well. On Wed, Jul 22, 2015 at 11:43 AM, Gabriel Volpe volpegabr...@gmail.com wrote: So, if this is the case, maybe Akka streams is not the solution to my problem. It's working well with actors. I

Re: [akka-user] Re: streams - shutting down a flow / exposing a materialized value

2015-07-25 Thread Viktor Klang
Do you happen to have a minimized failing test case for that? On Sat, Jul 25, 2015 at 6:36 PM, David Pinn dp...@byandlarge.net wrote: This is pretty much exactly what I'm trying to do. I'm polling an external system every 20 seconds. I use a tick source to control the timing, zipping the

Re: [akka-user] Does an Event Bus have an order?

2015-07-23 Thread Viktor Klang
The comparison is needed because the Subscriber type of the LookupEventBus is a type parameter. On Wed, Jul 22, 2015 at 11:33 PM, john.vie...@gmail.com wrote: I am trying to understand the Event Bus abstraction. I am looking into LookupEventBus. Why do I need to implement compareSubscribers?

Re: [akka-user] Can I avoid a class cast when using outlets in FlowShape?

2015-07-14 Thread Viktor Klang
Great to hear, happy hAkking On Tue, Jul 14, 2015 at 10:51 AM, Magnus Andersson magnus.anders...@mollyware.se wrote: Hi Thanks Victor, you're right! For the record I did try this before writing the post above, but it wouldn't work. I must have had some other type error at the same time

Re: [akka-user] Re: akka streams - for comprehension counterpart

2015-07-14 Thread Viktor Klang
On Tue, Jul 14, 2015 at 4:51 PM, leslie.le...@googlemail.com wrote: Am Dienstag, 14. Juli 2015 15:42:33 UTC+2 schrieb √: Hi Leslie, On Tue, Jul 14, 2015 at 3:34 PM, leslie...@googlemail.com wrote: I see. So no happy path programming while not loosing the error case with reactive

Re: [akka-user] Sequence of events [OnComplete, OnNext, OnError] when using ActorSubscriber with akka streams

2015-07-14 Thread Viktor Klang
You are closing over internal actor state and are manipulating it from other threads (inside the onComplete callback of the future) You could possibly avoid the ActorSubscriber alltogether by using mapAsync + conflate and a periodic Sink. On Tue, Jul 14, 2015 at 9:18 AM, Ajay Kamble

Re: [akka-user] Promises and message passing

2015-07-15 Thread Viktor Klang
Because you can't serialize a promise (if the actor decides to send the message to another node) On Thu, Jul 16, 2015 at 4:51 AM, Jeff jknight12...@gmail.com wrote: Is there any reason why I wouldn't want to pass a Promise to a (local) ActorRef to be resolved? I know the Ask pattern exists,

Re: [akka-user] Akka Streams: How do I know when a flow is finished?

2015-07-15 Thread Viktor Klang
and reason about it. It was good to see some discussing about how to improve the reactive streams design. Cheers, Eric On 2015-06-16 5:02 AM, Viktor Klang wrote: On 16 Jun 2015 11:53, Endre Varga endre.va...@typesafe.com wrote: On Tue, Jun 16, 2015 at 11:50 AM, Viktor Klang viktor.kl

Re: [akka-user] Re: ANNOUNCE: Akka Streams HTTP 1.0

2015-07-15 Thread Viktor Klang
487 Konrad Malawski 3 28 49 2beaucoup 3 701 636 Viktor Klang 2 43 7 Rafał Krzewski 2 801 42 Alexander Golubev 1 8 8 Heiko Seeberger -- Cheers, Konrad 'ktoso’ Malawski Akka http://akka.io/ @ Typesafe http://typesafe.com

Re: [akka-user] Promises and message passing

2015-07-16 Thread Viktor Klang
Jeff, On Thu, Jul 16, 2015 at 8:38 PM, Jeff jknight12...@gmail.com wrote: If everything is local an no serialization is required, would it be worth it? From the documentation on the website, it indicates that Ask has a performance cost associated with it. Regrettably, my crystal ball is

Re: [akka-user] Re: Akka Cluster ⇒ AssociationError Error [Invalid address]

2015-07-18 Thread Viktor Klang
Hi Eugene, I assume you've read the following but in case you didn't: http://doc.akka.io/docs/akka/2.3.12/scala/cluster-usage.html#Failure_Detector -- Cheers, √ On 18 Jul 2015 03:54, Eugene Dzhurinsky jdeve...@gmail.com wrote: I did some experiments, varying the number of nodes in the

Re: [akka-user] Exceptions thrown by logger fn provided to FlowOps.log do not get handled by Resumer

2015-07-17 Thread Viktor Klang
Interesting. Please open an Issue. On Fri, Jul 17, 2015 at 8:31 PM, Tim Harper timchar...@gmail.com wrote: I noticed this today: implicit val ec = ExecutionContext.global case object LeException extends Exception(le fail) implicit val materializer =

Re: [akka-user] [akka-stream] Troubleshooting push-pull signal/token disappearance in a complex stream

2015-07-17 Thread Viktor Klang
Hi Jakub, most of the Akka team is on summer holidays, and it's now weekend… Would any of the awesome hAkkers on this ML be able to guide Jakub? s(I'm boarding a 9h flight as we speak). On Fri, Jul 17, 2015 at 5:21 PM, Jakub Liska liska.ja...@gmail.com wrote: Hi, how are you guys tracking it?

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

2015-07-19 Thread Viktor Klang
of these akka-http instances. Here's a few stack traces from the instances as well as nginx access logs. https://gist.github.com/SpicyMonadz/b844ce4503e145fda7ee These requests aren't killing my jvm instances fyi. I'm on akka-http-* 1.0 On Sun, Jul 19, 2015 at 2:33 PM, Viktor Klang viktor.kl

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

2015-07-19 Thread Viktor Klang
Do you have a copy of the actual HTTP request that we could use as a regression test? On Sun, Jul 19, 2015 at 8:26 PM, Ernesto Menéndez pya...@gmail.com wrote: I received the same request several times when I was hosting my service at DigitalOcean using akka-http RC4. I had to restart the

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

2015-07-20 Thread Viktor Klang
should work to fix within akka-http as to not throw the exception. I'm not seeing app crashes as have been reported by others. Ernesto, do you have a stand alone case? I could probably create one if not. On Sun, Jul 19, 2015 at 5:00 PM, Viktor Klang viktor.kl...@gmail.com wrote: Adam

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

2015-07-20 Thread Viktor Klang
, 2015 at 4:21 AM, Viktor Klang viktor.kl...@gmail.com wrote: Hi Adam, What should it do instead of throwing the exception? (In case it is legal according to the HTTP spec please point the section out to me, thanks!) On Mon, Jul 20, 2015 at 7:08 AM, Adam Shannon adam.shan...@banno.com wrote

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

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

Re: [akka-user] How scalable is this akka.io tcp client server integration?

2015-07-13 Thread Viktor Klang
John See the tcp section of the configuration, 1. tcp { 2. 3. # The number of selectors to stripe the served channels over; each of 4. # these will use one select loop on the selector-dispatcher. 5. nr-of-selectors = 1 6. 7. # Maximum number of open channels supported by

Re: [akka-user] How scalable is this akka.io tcp client server integration?

2015-07-13 Thread Viktor Klang
John, sorry, what threw me off was the client server part of the subject. On Mon, Jul 13, 2015 at 9:38 PM, john.vie...@gmail.com wrote: although I appreciate the reminder of the config. It doesn't help me with my question. I am not concerned with the accepting server side but with the

Re: [akka-user] Re: Oscillating CPU load with large akka based data processing job

2015-07-12 Thread Viktor Klang
Hi Nicolau, Your description is not weird at all—ForkJoinPool's Worker threads will scan for work when they have none of their own, which they do for about 2 seconds, and if they can't find work they'll decommission themselves. Note that the default configuration for Akka needs to be tuned for

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

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

Re: [akka-user] Stream - Concat needs a request 1

2015-07-21 Thread Viktor Klang
I think your guess is correct. And It is a bit surprising, yes, since Concat should at least subscribe to the second source (empty) once the first (welcome) completes, which should trigger an onSubscriber + onComplete. On Tue, Jul 21, 2015 at 11:34 AM, Jan Vincent Liwanag jvliwa...@gmail.com

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

2015-07-21 Thread Viktor Klang
mapAsync + ask? On Tue, Jul 21, 2015 at 11:53 AM, john.vie...@gmail.com wrote: In the code example http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/java/stream-io.html http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/java/stream-io.html connection.handleWith(echo,

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

2015-07-21 Thread Viktor Klang
Hi Thomas, Great to see you figured it out! I meant something along the lines of: val bidiFlow = BidiFlow.wrap(outboundFlow, inboundFlow)(Keep.none) bidiFlow atop tlsHandler join logicalFlow On Tue, Jul 21, 2015 at 9:45 AM, Thomas Zimmer t.zim...@eslgaming.com wrote: Thanks Chad and

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

2015-07-21 Thread Viktor Klang
Could you illustrate how you mean? On Tue, Jul 21, 2015 at 9:58 AM, Thomas Zimmer t.zim...@eslgaming.com wrote: One question in general: Is it better to have different FlowGraphs and set them up in one large or flow or join different Flows directly to each other? Regards, Thomas On

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

2015-07-21 Thread Viktor Klang
In my opinion, there is little value in creating the slots dynamically as you most likely will either: A) have more slots than CPUs, which means you won't get any performance improvement for doing it dynamically. or B) less slots than CPUs, in which case you can statically create them and use

Re: [akka-user] Durable Mailboxes - Not clearing the mailbox file

2015-10-27 Thread Viktor Klang
Clearing them would mean rewriting the file. On Tue, Oct 27, 2015 at 5:36 AM, Akash Thomas wrote: > Hi All, > > I am new to Akka development. > > I was trying to use FileBasedMailboxType and noticed that messages in the > file doesn't get cleared even after the messages

Re: [akka-user] Re: Akka config to include "common.conf" programmatically

2015-10-29 Thread Viktor Klang
make the common.conf the application.conf and then load the externally provided config with ConfigFactory.load? On Thu, Oct 29, 2015 at 5:03 PM, Guido Medina wrote: > I tried using withFallback(...) which has different semantics and > behavior, I need something that emulates

Re: [akka-user] Cleaning up on Flow completion

2015-10-27 Thread Viktor Klang
This is not going to answer your question but: def toFlow(handler: Handler) = { var ctxt: Option[Context] = None <--- *DO NOT DO THIS* Flow[(Context, State)].map { (in: (Context, State)) => { ctxt match { case Some(last) => if (!last.equals(in._1)) {

Re: [akka-user] Re: code that will block for some time, part of an actor or should I wrap it inside a Feature?

2015-11-11 Thread Viktor Klang
On Wed, Nov 11, 2015 at 4:02 PM, 'Konstantinos Kougios' via Akka User List < akka-user@googlegroups.com> wrote: > useful advice, thanks everyone. > > I wonder why continuations didn't catch up. continuations "blocking" would > be of no issue. I/O and even sleep(x) would be possible with no

Re: [akka-user] Re: code that will block for some time, part of an actor or should I wrap it inside a Feature?

2015-11-11 Thread Viktor Klang
n C by completing the process > > effectively the above is (on actorA) > > actorB.do(X1) > ... complete the process > > > > On 11/11/15 15:16, Viktor Klang wrote: > > > > On Wed, Nov 11, 2015 at 4:02 PM, 'Konstantinos Kougios' via Akka User List > < <akka

Re: [akka-user] Re: Can't see Content-Type in HttpRequest's header list

2015-11-08 Thread Viktor Klang
http://stackoverflow.com/questions/5661596/do-i-need-a-content-type-for-http-get-requests On 8 Nov 2015 09:48, "Akira Hayakawa" wrote: > def contentType(cth: Option[`Content-Type`]) = cth match { > case Some(x) ⇒ x.contentType > case None⇒

Re: [akka-user] Re: Future.sequence equivalent in Akka Streams

2015-11-08 Thread Viktor Klang
That sounds like a feature of questionable value, it's very easy to arrive at OOMEs with such a method. On Sun, Nov 8, 2015 at 9:24 PM, wrote: > I wasn't very clear in my original requirements. In the resulting Source, > I want its 1st element (i.e. its 1st sequence) to

Re: [akka-user] Re: Future.sequence equivalent in Akka Streams

2015-11-08 Thread Viktor Klang
On Sun, Nov 8, 2015 at 10:57 PM, wrote: > > That sounds like a feature of questionable value > I have multiple sources of time series data. Each source is over the same > time range and I'd like to aggregate them into one time series. So I use > this method then on each of the

Re: [akka-user] Source.queue completion signal

2015-11-08 Thread Viktor Klang
Hi Francesco, You could emulate what you want using this: scala> val (q, f) = Source.queue[Option[Int]](10, OverflowStrategy.backpressure).takeWhile(_.isDefined).map(_.get).toMat(Sink.foreach(println))(Keep.both).run() q: akka.stream.SourceQueue[Option[Int]] =

Re: [akka-user] Re: Future.sequence equivalent in Akka Streams

2015-11-08 Thread Viktor Klang
On Sun, Nov 8, 2015 at 11:38 PM, wrote: > >Why would you need to turn them into Seqs for that? > Becausethat's just the way I did it and it seems to be working. I find > it useful because it meets my business requirement. I'm not saying it's *the > answer*, I'm just seeking

Re: [akka-user] Re: FTP library

2015-11-16 Thread Viktor Klang
It would be awesome to have one based on Akka Stream TCP. Are there any FTP compliance test suites to use? -- Cheers, √ On 16 Nov 2015 18:04, "rklaehn" wrote: > Just in case somebody is interested: I decided to go with akka-camel. > Works fine for my simple use case.

Re: [akka-user] Re: Can't see Content-Type in HttpRequest's header list

2015-11-09 Thread Viktor Klang
Happy hAkking! On 9 Nov 2015 03:57, "Akira Hayakawa" <ruby.w...@gmail.com> wrote: > With some fixes on the client side explicitly adding Content-Type now > works. Thanks Viktor. > > On Sun, Nov 8, 2015 at 9:28 PM, Viktor Klang <viktor.kl...@gmail.com> > wr

Re: [akka-user] Source.queue completion signal

2015-11-09 Thread Viktor Klang
Happy hAkking! On Mon, Nov 9, 2015 at 9:14 AM, Francesco Di Muccio < francesco.dimuc...@gmail.com> wrote: > Nice, I didn't think about it. The failure can be implemented using an > Either, anyway I got the point, thank you very much. > > Il giorno domenica 8 novembre 2015 20:53:35 UTC+1, √ ha

Re: [akka-user] Akka Extension dependencies

2015-11-01 Thread Viktor Klang
Hi Andrey, Akka doesn't load them in parallel: private def loadExtensions() { immutableSeq(settings.config.getStringList("akka.extensions")) foreach { fqcn ⇒ dynamicAccess.getObjectFor[AnyRef](fqcn) recoverWith { case _ ⇒ dynamicAccess.createInstanceFor[AnyRef](fqcn, Nil) } match {

Re: [akka-user] Akka Extension dependencies

2015-11-01 Thread Viktor Klang
On Sun, Nov 1, 2015 at 9:11 PM, Andrey Kuznetsov wrote: > I see, thanks. But why such logic should be in a separate thread? > An Actor that is spawned that accesses an Extension, for instance > > > On Sunday, November 1, 2015 at 9:32:46 PM UTC+3, √ wrote: >> >> Hi Andrey, >>

Re: [akka-user] Akka Extension dependencies

2015-11-01 Thread Viktor Klang
gt; > > On Sun, Nov 1, 2015, at 12:13 PM, Viktor Klang wrote: > > > > On Sun, Nov 1, 2015 at 9:11 PM, Andrey Kuznetsov <f...@loathing.in> wrote: > > I see, thanks. But why such logic should be in a separate thread? > > > An Actor that is spawned that accesses an

Re: [akka-user] Efficient - transmit only once - broadcast?

2015-11-03 Thread Viktor Klang
transmit only once would imply 100% lossless communication, which does not exist afaik? -- Cheers, √ On 3 Nov 2015 18:07, "Rüdiger Klaehn" wrote: > UDP is limited to 65507 Bytes. Might be a bit small for large messages... > I assume serialization is optimal, but still the

Re: [akka-user] This is how we're using Event Sourcing with Akka Persistence

2015-11-03 Thread Viktor Klang
Thanks for sharing! We'd love to hear more about your experiences with Akka Persistence—what's great and what's not-so-great, in case you are able and willing to share that :) On Tue, Nov 3, 2015 at 10:51 PM, Morten Kjetland wrote: > Hi, > > We at NextGenTel have been using

Re: [akka-user] Efficient - transmit only once - broadcast?

2015-11-04 Thread Viktor Klang
delaying all other messages -- Cheers, √ On 4 Nov 2015 18:54, "'Konstantinos Kougios' via Akka User List" < akka-user@googlegroups.com> wrote: > > > On 04/11/15 06:10, Patrik Nordwall wrote: > > Publishing to topic with Distributed PubSub will only transfer the message > once per node that has

Re: [akka-user] Possible bug in akka.io.SimpleDnsManager?

2015-11-02 Thread Viktor Klang
Hi Kevin, a survey of the issue tracker reveals the following: https://github.com/akka/akka/issues/18814 On Sun, Nov 1, 2015 at 4:36 PM, Kevin Esler wrote: > I have some test code written using Scalatest which among things runs > akka-http client code to make requests

Re: [akka-user] Re: Behavior of Akka when you sleep in an actor

2015-10-14 Thread Viktor Klang
Thread.sleep's behavior is documented here: https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#sleep(long) On Wed, Oct 14, 2015 at 4:14 PM, Fahimeh Rahemi wrote: > Hi every body! > > I have a relative question; > I want to create some heavy and thread

Re: [akka-user] Re: [akka-stream] How to get materialization result in partial flow

2015-10-19 Thread Viktor Klang
Hi Alexey, I don't have any suggestion for a fix, but it does seem like your setup is a bit too entangled. If you take a step back and look at the lifecycle and propagation pattern needed by your solution, is it workable or does it make sense to consider other solutions? On Mon, Oct 19, 2015 at

Re: [akka-user] Abridged summary of akka-user@googlegroups.com - 10 updates in 5 topics

2015-10-19 Thread Viktor Klang
vior of Akka when you sleep in an actor >><#1507dc9ede05a829_1507c032c1327adf_group_thread_3> - 1 Update >>- Servlet and Actor >><#1507dc9ede05a829_1507c032c1327adf_group_thread_4> - 2 Updates >> >> Proposed major simplification of the Akka Streams

Re: [akka-user] Memory model, messages and remoting

2015-10-18 Thread Viktor Klang
Hi Florian, On Sun, Oct 18, 2015 at 8:00 PM, olf sync wrote: > Thanks √ for your response. > > I use https://github.com/romix/akka-kryo-serialization at the moment. > > I have a lot of actors on System B, which get messages from ONE actor from > system A. They get all the

Re: [akka-user] Re: Proposed major simplification of the Akka Streams FlowGraph APIs

2015-10-19 Thread Viktor Klang
ff like that instead of flatMap, you often >need to use join. Initially it takes browsing through lots of documentation >pages. After a while you get used to where to look for it. I guess I'd say >it's not as "search friendly" as Rx (for now). > > True. Adding it

Re: [akka-user] Re: Dynamic dependency Injection in AKKA

2015-10-19 Thread Viktor Klang
Let me be clear: We have no beef with enterprise Java :) As for Dependency Injection with Akka, this blog post should be informative: http://letitcrash.com/post/55958814293/akka-dependency-injection On Mon, Oct 19, 2015 at 10:13 AM, Richard Bradley < richard.bradley.softw...@gmail.com> wrote: >

Re: [akka-user] Modeling synchronous startup behavior

2015-10-19 Thread Viktor Klang
Hi Rich, and why can't it be executed in preStart()? On Mon, Oct 19, 2015 at 3:20 PM, Rich Henry wrote: > I had seen a previous post that didn't really seem to come to any definite > conclusion about this subject. > > I have some synchronous behavior I need to accomplish

Re: [akka-user] Modeling synchronous startup behavior

2015-10-19 Thread Viktor Klang
On Mon, Oct 19, 2015 at 4:11 PM, Rich Henry wrote: > I guess that's the why of question 2. Im not clear when the different > lifecycle phases, like preStart, occur. > > I would assume preStart occurs after object construction, and is > asynchronous to the system call used to

Re: [akka-user] Modeling synchronous startup behavior

2015-10-19 Thread Viktor Klang
Hi Rich, On Mon, Oct 19, 2015 at 4:50 PM, Rich Henry wrote: > I would if it told me when that chain of events starts and stops relative > to the actorOf call itself. > actorOf is asynchronous so that's completely separate from the lifecycle. > > My actor needs to register

Re: [akka-user] Re: Akka remote communication roadmap?

2015-10-15 Thread Viktor Klang
Current main focus is getting Akka Streams and Akka Http ready for prime time. In case someone is able/willing to take a stab at starting the migration of Akka Remote to Akka Streams right now, I'd love to advise / review etc but I have no spare cycles at the moment to do any actual work on it.

Re: [akka-user] Re: Akka remote communication roadmap?

2015-10-15 Thread Viktor Klang
Hi Guido, Would you be interested in contributing towards this? On Thu, Oct 15, 2015 at 11:02 AM, Guido Medina wrote: > Hi Viktor, > > Maybe you could abstract the transport API and create multiple > implementations, with both Netty and Aeron, Aeron might not be as fast as >

Re: [akka-user] Memory model, messages and remoting

2015-10-16 Thread Viktor Klang
Hallo! The same instance would be serialized twice, it is up to the configured Serializer implementation if it wants to memoize/cache etc it's up to it to do so. On Fri, Oct 16, 2015 at 10:33 AM, olf sync wrote: > Hallo everyone, > > first thanks for the great framework. I

Re: [akka-user] Strategies to Track if a Message Has been Submitted?

2015-10-20 Thread Viktor Klang
A Bloom filter? On Tue, Oct 20, 2015 at 9:07 AM, kraythe wrote: > Greetings, > > I have a situation where I have periodic tasks that will take several > minutes. The manager will submit thousands of requests to a particular > actor router. When the requests are received, They

Re: [akka-user] Capturing the message that killed an actor

2015-10-20 Thread Viktor Klang
Hi, when it comes to dealing with flow control, Akka Streams is unrivalled within Akka. On Mon, Oct 19, 2015 at 8:01 PM, Виктор Лобанов wrote: > Hi Viktor and Arne. > > Sorry for intrusion, but I have some thoughts about similar problem. > Recently I had similar design

Re: [akka-user] Re: Strategies to Track if a Message Has been Submitted?

2015-10-20 Thread Viktor Klang
Then you're basically down to a tradeoff in granularity of possible rework vs storage space / time: i.e. keeping track of highest-processed-contiguous-monotonically-increasing-task-id vs storing all messages and remove the ones which have been processed etc. On Tue, Oct 20, 2015 at 10:08 AM,

Re: [akka-user] Re: Proposed major simplification of the Akka Streams FlowGraph APIs

2015-10-20 Thread Viktor Klang
safety). > Right. It would be nice to keep a comparison between RxScala and Akka Streams for doing more "interesting" stream processing. > > On Mon, Oct 19, 2015 at 12:00 PM, Viktor Klang <viktor.kl...@gmail.com> > wrote: > >> >> >> On Sun, Oct 18,

Re: [akka-user] Re: Proposed major simplification of the Akka Streams FlowGraph APIs

2015-10-18 Thread Viktor Klang
Hi Adam, Thanks for your feedback! Responses inline On 18 Oct 2015 09:36, "Adam" wrote: > > Hi, > > > > I like most of the described changes. > > Here are my personal reservations: > > > > 1. I prefer a single method name with many overloads over many method names that say

Re: [akka-user] Capturing the message that killed an actor

2015-10-17 Thread Viktor Klang
Arne, if 2 actors have SafeReceive, send messages to eachother and they fail on processing OperationFailed, then you have a crash loop. What behavior are you implementing? (what are you going to use the exception and message for?) -- Cheers, √ On 15 Oct 2015 22:44, "Arne Claassen"

Re: [akka-user] Re: Akka remote communication roadmap?

2015-10-14 Thread Viktor Klang
For extremely low latency we'd want to use a transport like Aeron. On Wed, Oct 14, 2015 at 1:34 PM, Guido Medina wrote: > Very nice, I wasn't aware of it, IMHO it needs something like that as > proper remote communication is the foundation for distributed > micro-services,

[akka-user] Fwd: Proposed major simplification of the Akka Streams FlowGraph APIs

2015-10-17 Thread Viktor Klang
Hi everyone, I'm proposing the following (breaking) changes to the FlowGraph-related APIs, in order to make it consistent, with a smaller surface area and with more obvious demarcation of power-level for "dropping down to"/"tapping into" FlowGraph-mode. Most, if not all, of the migration can be

Re: [akka-user] Capturing the message that killed an actor

2015-10-15 Thread Viktor Klang
If the actor is doing something dangerous then its parent should have delegated that dangerous work to it so it should know what that message is. I.e. create a temporary actor to deal with the dangerous message and then it can send a message to sender in postStop? On Thu, Oct 15, 2015 at 7:38 PM,

Re: [akka-user] Servlet and Actor

2015-10-17 Thread Viktor Klang
Hi Joseph, that would not make sense as it would violate encapsulation of the Actor. What you can do however is to write a Servlet that sends messages to an Actor. On Sat, Oct 17, 2015 at 11:27 PM, Joseph Mansigian < aed.project.c...@gmail.com> wrote: > Is it possible for the same Java class to

Re: [akka-user] Explaining AKKA Thread Pool Execturor Config parameters

2015-10-12 Thread Viktor Klang
Hi Maatary, On Sun, Oct 11, 2015 at 9:27 PM, Maatary Okouya wrote: > Hi, > > As I understood that the fork-join-executor is the default dispatcher > when non is provided when creating the actor system > Can someone explain me the following: > > >1.

Re: [akka-user] Explaining AKKA Thread Pool Execturor Config parameters

2015-10-12 Thread Viktor Klang
te: > >> Understood, Many thanks. >> >> On Mon, Oct 12, 2015 at 6:08 AM, Viktor Klang <viktor.kl...@gmail.com> >> wrote: >> >>> >>> >>> On Mon, Oct 12, 2015 at 12:00 PM, Maatary Okouya < >>> maatarioko...@gmail.

Re: [akka-user] A simple Akka JMM question

2015-10-06 Thread Viktor Klang
Hi John, yes it will work, but keep in mind that it is *highly* discouraged to send mutable messages not only because it won't work across JVMs but also because nothing prevents you for accidental aliasing it. On Tue, Oct 6, 2015 at 9:46 AM, wrote: > Hi, > please see the

Re: [akka-user] A simple Akka JMM question

2015-10-06 Thread Viktor Klang
Hi, You can use the immutable builder pattern to get the same effect you're after. As for the memory visibility, The "why" is because it's very useful (and needed even for immutable data, if not properly constructed). The "how" is we use memory fences to assure that the CPU is not allowed to

<    1   2   3   4   5   6   >