[akka-user] Newbie Questions About PersistentView and Populating Read Datastores

2015-07-14 Thread Amiri Barksdale
I've been reading up here on PersistentActor, and I think I get how that works to perform commands and write the result to an event store. I also think I understand that PersistentViews can subscribe to a PersistentActor and receive notification of each event stored for that PersistentActor

[akka-user] Message Broadcasting in an akka cluster

2015-07-14 Thread Vishnu Sharavan Nag
Hi, Is there a way to broadcast a message across the nodes in a cluster without using an intermediate actor like a mediator actor in distributed pub-sub or a shard region actor in cluster sharding? BR, Vishnu -- Read the docs: http://akka.io/docs/ Check the FAQ:

Re: [akka-user] Parallel operation on list using future

2015-07-14 Thread Roland Kuhn
14 jul 2015 kl. 07:04 skrev Maatary Okouya maatarioko...@gmail.com: Hi, I was just wondering as a general advise if the following made sense. I have a list, that i need to filter according to the following criteria: Let say the list contain things of type A, B, C and D and i want

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

2015-07-14 Thread Ajay Kamble
Hello All, We are using Akka Streams to process 400,000 xml documents, run it through series of transformations and then save it to a database. We are using basic transformation and here is how our stream code looks, Source(Set(allDocumentUris)) .map(uri = getDocumentFromNetwork(uri))

[akka-user] SslTls example

2015-07-14 Thread Mathias Bogaert
Hi, Is there an example available where SslTls is used with Akka HTTP client/server? Thanks, Mathias -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives:

[akka-user] Re: Newbie Questions About PersistentView and Populating Read Datastores

2015-07-14 Thread Magnus Andersson
Hi I looked into this question in the past. There are some long threads in the mailing lists and aggregated views seems to be something that will be considered for Akka in the future (unless I misunderstood the threads) but it is only after akka-http and akka-streams are matured. As for doing

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

2015-07-14 Thread Magnus Andersson
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 that confused me. Because now it worked fine! /Magnus Den söndag 12 juli 2015 kl. 15:39:10 UTC+2 skrev √: On Sun, Jul

[akka-user] Re: SslTls example

2015-07-14 Thread Johannes Rudolph
Hi Mathias, there may not be any good examples yet. On the server side you need to supply an `HttpsContext` to the `Http.bind()` method with all the SSL settings. On the client side there are either HTTPS variants like `Http.newHostConnectionPoolTls` or if you use the highest-level API you

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

2015-07-14 Thread leslie . leder
I see. So no happy path programming while not loosing the error case with reactive streams? This is a quite a bit disillusioning. Should be mentioned in all those shiny reactive stream presentations ;-) Is there some per stream exception handling mechanism instead which would materialize with

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

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

2015-07-14 Thread Johannes Rudolph
Hi Leslie, On Tuesday, July 14, 2015 at 1:38:02 PM UTC+2, leslie...@googlemail.com wrote: When programming with functions this kind of issue is solved quite elegantly by using a for comprehension: Not a solution but a comment. In a for comprehension with usual types

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

2015-07-14 Thread leslie . leder
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 javascript: wrote: I see. So no happy path programming while not loosing the error case with reactive streams? This is a quite a bit disillusioning. Should be

[akka-user] Re: default-dispatcher = CallingThreadDispatcher ?

2015-07-14 Thread Hosam Aly
Hi, I am trying to use the `CallingThreadDispatcherConfigurator`, but unfortunately the test blocks as soon as I try to instantiate an actor, with a deadlock that looks similar to an akka issue https://github.com/akka/akka/issues/17253. Have you faced a similar situation before? Do you have

Re: [akka-user] Re: default-dispatcher = CallingThreadDispatcher ?

2015-07-14 Thread Konrad Malawski
Hi Hosam, why do you want to run Akka using 2 threads? Where do you configure the calling thread dispatcher? --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 14 July 2015 at 17:02:16, Hosam Aly (hosama...@gmail.com) wrote: Hi, I am trying to use the `CallingThreadDispatcherConfigurator`,

[akka-user] Message Broadcasting in an akka cluster

2015-07-14 Thread Jim Hazen
You could implement the mediator yourself and include all your business logic there. That said, why do this? What's the fear of an extra actor dealing with these concerns and providing separation? I don't think it's possible to use an external implementation and not have separation. --

[akka-user] Why does FlexiMerge mandate same type on all inlets?

2015-07-14 Thread Magnus Andersson
Hi I'm trying to build an EitherRoute and EitherMerge flows. I've completed the EitherRoute which has one inlet that accepts Either[L,R] and two outlets that produces either L or R. When I'm constructing the EitherMerge I run into problems. -- Read the docs: http://akka.io/docs/

[akka-user] Re: Why does FlexiMerge mandate same type on all inlets?

2015-07-14 Thread Magnus Andersson
Sorry, post button pressed by mistake. Continued: FlexiMerge only seems to be able to handle inlets of the same type. I wish to have a preferred merge that accepts two inputs, L and R and then produce Either[L,R]. I would use the read preferred. Why this limitation and how can I work around

Re: [akka-user] Re: default-dispatcher = CallingThreadDispatcher ?

2015-07-14 Thread Hosam Aly
Hi Konrad, Thanks for the quick reply! I actually wish I could run it with just 1 thread. I wish my tests could become totally synchronous. I am trying to find out how to do that. I am currently configuring it in application.conf. Any suggestions would be appreciated! Thank you, Hosam Aly

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] Asynchronous file reading

2015-07-14 Thread Konrad Malawski
The nice thing with Akka streams and a Source[ByteString, _] is that you can easily swap it for a different source without changing the rest of your impl :-) The current impl uses nio.FileChannel with ByteBuffers which proved to give very good performance - and I've benchmarked a number of impls

[akka-user] Re: akka actor - performance issue

2015-07-14 Thread flydaf
1. Mistake, not 8000k ms , should be 8k ms 2. Mensioned ~13% time difference in perf. time get bigger with growing number of CountingActors. -- Read the docs: http://akka.io/docs/ Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html Search the archives:

[akka-user] Re: Why does FlexiMerge mandate same type on all inlets?

2015-07-14 Thread Joe Edwards
Inlets are naturally Contravariant (an inlet that reads A can be viewed as an inlet that reads B : A), but that breaks down slightly when you're viewing it 'from the other side' - as the Outlet of something else. Perhaps there should be a view of the Inlet which can be used in a merge which is

[akka-user] akka actor - performance issue

2015-07-14 Thread flydaf
Hi everyone! I working on some scala computing some game theory problem using Akka. Basically I've got three types involved : 1. ComputingActor - does the job, running 1 actor for 1 experiment 2. ResultsActor - collects results from computing actors and sends to JobScheduler when job's done 3.

[akka-user] Re: akka actor - performance issue

2015-07-14 Thread Nicolau Werneck
How many CPU cores do you have, and how many simultaneous actors are you running? You should at least see a speedup of close to 2x with two actors, but as you increase the number of actors you will eventually reach a limit due to overheads and serial portions of the program. Processing might

[akka-user] Re: Modeling simple TCP protocol that isn't always request/response in akka-stream

2015-07-14 Thread Chad Retz
I just had to do this and I found the AsyncStage which allows out-of-band messages to get added to the stream. It and the DetachedStage are not yet documented[0] but after reading enough other code and taking some guesses, I was able to get out-of-band messages into my IMAP server via an

[akka-user] Problem creating a balancing router for a stream sink

2015-07-14 Thread Nicolau Werneck
I am trying to write an ActorSubscriber to use as a sink to am akka stream. This actor has a router to the processing of the incoming data. My code is working just fine right now, I have it up on GitHub

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

2015-07-14 Thread Nicolau Werneck
I'm just starting to learn, but AFAIK order is like you would expect: you can't receive OnNext aftyer OnComplete. Also you should be terminateing at OnComplete, not at OnNext. I am not sure how your code is working, but apparently you are receiving a bunch of Futures, and attaching callbacks

Re: [akka-user] Asynchronous file reading

2015-07-14 Thread Nicolau Werneck
I just want to make sure I am using the most promising alternative for I/O... I was reading files on my own with a low-level Java library, and I wasn't using nio yet. I wasn't sure if I was going to update it to use Java 8 stuff, try out akka.io, or move to akka-stream. I think I am going with