[akka-user] Akka Cluster Performance

2015-07-15 Thread Prakhar Goyal
Hi, I've been trying to get an app running with Akka. I've got it running and stripped down code is available at https://github.com/prakgoya/jakka I'm trying to use 10 threads to publish using Publisher

[akka-user] Akka Cluster Performance

2015-07-15 Thread Prakhar Goyal
Hi, I've been trying to migrate an application from JGroups to Akka. I've created a simple clustering deployment. Stripped down working code is available at https://github.com/prakgoya/jakka The performance numbers for Akka are way less than Jgroups numbers. I'm trying to send messages using 10 t

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

2015-07-15 Thread netcomm
Hi Endre, i read Akka Stream sources to find the Domain model, now have some question: 1. what is the different between Module and Shape? 2. FlowModule、SinkModule、SourceModule they all extends from Module,but StageModule inherit from FlowModule,why StageModule not straightly inherit from Module?

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

2015-07-15 Thread leslie . leder
Sorry. I still cannot grip the point on how to pass errors or maybe exceptions down the stream in a neat way without stopping the stream. Swallowing errors (including programming faults) wouldn't be an option since its required for nearly all circumstances to send an appropriate reply to the cl

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

2015-07-15 Thread flydaf
I have got 4 cores/threads machine. I am running one experiment in one actor. Requirement for program is to run as much experiments as it's possible concurrently.Number of experiments must be parametrised. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >>>

[akka-user] Re: Message Broadcasting in an akka cluster

2015-07-15 Thread Vishnu Sharavan Nag
Hey Jim, I'm working on an application(delay sensitive) which requires replication of huge amount of data across the nodes of a cluster. I was wondering if this single actor could be a bottleneck when am dealing with large number of messages. Kindly suggest. Vishnu On Tuesday, 14 July 2015 2

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

2015-07-15 Thread Chad Selph
Thanks for the examples. I ended up just using ActorSink/ActorSubscriber and using akka-stream exclusively for the TCP layer (actors for the rest), but I may go back to the stream approach if I want to integrate stream backpressure into the protocol's backpressure. On Tuesday, July 14, 2015 at

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

2015-07-15 Thread Konrad Malawski
Dear hakkers, we—the Akka committers—are very pleased to announce the final release of Akka Streams & HTTP 1.0. After countless hours and many months of work we now consider Streams & HTTP good enough for evaluation and production use, subject to the caveat on performance below. We will conti

[akka-user] Re: Can I run akka-http/streams 1.0-RCx on akka-2.4-Mx until they are included? Can I use streams and persistence together?

2015-07-15 Thread Giovanni Alberto Caporaletti
"In the meantime both Streams and HTTP can be used with Akka 2.4 artifacts since these are binary backwards compatibility with Akka 2.3." I guess that answers my first question! Cheers! p.s.: typo in the announcement compatibility -> compatible On Monday, 13 July 2015 17:06:13 UTC+2, Giovanni A

Re: [akka-user] Re: Can I run akka-http/streams 1.0-RCx on akka-2.4-Mx until they are included? Can I use streams and persistence together?

2015-07-15 Thread Konrad Malawski
Thanks for pointing out the typo! Yes, as the annoucement states - they're compatible; we worked on 2.4 to keep it binary compatible with 2.3 (even though in terms of naming those used to mean "major") :-) We have not tried combining ActorSubscriber / ActorPublisher with PersistentActor yet...

Re: [akka-user] Re: Can I run akka-http/streams 1.0-RCx on akka-2.4-Mx until they are included? Can I use streams and persistence together?

2015-07-15 Thread Giovanni Alberto Caporaletti
Thank you Konrad I read the discussion about the read-side, it's going to be in 2.5 right? That'll be awesome :) Meanwhile I'll make some experiments with subscriber/producer/persistent and let you all know if everything works... Thanks for the great work, all the akka-related projects are so

Re: [akka-user] Re: Can I run akka-http/streams 1.0-RCx on akka-2.4-Mx until they are included? Can I use streams and persistence together?

2015-07-15 Thread Konrad Malawski
I read the discussion about the read-side, it's going to be in 2.5 right? That'll be awesome :) In fact, in 2.4 it will be in but experimental - it'll be a new module, working well together with the current one, but separate.  If you don't need any query power you don't need to use it - i.e. sim

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

2015-07-15 Thread Roland Kuhn
As I explained on the ticket using CallingThreadDispatcher for the default-dispatcher is not supported and is not going to be successful in general, CallingThreadDispatcher is not a general purpose dispatcher (and this is a fundamental restriction that cannot be lifted—believe me, I tried ;-) ).

Re: [akka-user] Re: Can I run akka-http/streams 1.0-RCx on akka-2.4-Mx until they are included? Can I use streams and persistence together?

2015-07-15 Thread Giovanni Alberto Caporaletti
Oh, I didn't know that, that's great news (for me)! I am very insterested in the query power, mostly to be able to ingest past events into spark and do machine learning on them. Schema evolution via event adapters/custom serializers and query capabilities = infinite power. Cheers G On Wednesd

[akka-user] Connecting over Https using Akka-Http client

2015-07-15 Thread Jeroen Rosenberg
I'm trying to connect to a third party streaming API over HTTPS using "akka-stream-experimental" % "1.0-RC4" and "akka-http-experimental" % "1.0-RC4" My code looks like this class GnipStreamHttpClient(host: String, account: String, processor: >> ActorRef) extends Actor with ActorLogging { > >

[akka-user] Re: Connecting over Https using Akka-Http client

2015-07-15 Thread Johannes Rudolph
Hi Jeroen, is this a virtual host you are connecting against? This may hint towards the client not sending the TLS SNI extension correctly which could be a bug in akka-http or due to an old JDK version on your client. Which JDK version do you use? https://en.wikipedia.org/wiki/Server_Name_Indi

[akka-user] Re: Connecting over Https using Akka-Http client

2015-07-15 Thread Jeroen Rosenberg
Thnx Johannes for the swift reply :) I'm using JDK 7. I strongly suspect the host I connect to (stream.gnip.com) to be a virtual host (as they also provide other endpoints such as api.gnip.com). I just tried with 1.0 and it gives me the same result. Jeroen On Wednesday, July 15, 2015 at 4:47:1

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

2015-07-15 Thread Debasish Das
Hi, First of all congratulations on the release of akka-streams and akka-http ! I am writing a service and spray was my initial choice but with akka-http and spray merge I am more inclined to start learning and using akka-http. This service needs to manage a SparkContext and most likely Cassand

[akka-user] Re: Connecting over Https using Akka-Http client

2015-07-15 Thread Jeroen Rosenberg
Btw, I tried connecting to the stream using plain old java.net.HttpUrlConnection > val connection = new java.net.URL("...").openConnection() // set headers connection.getInputStream connection.getResponseCode this way it just works and I get status code 200. So it seems something goe

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

2015-07-15 Thread Magnus Andersson
Hi Hagard: That looks like a convenient syntax that does the same thing as a persistent view does, tailored for users of scalaz streams, or am I missing something? Can you take multiple eventlogs and combine them into one reproducible ordered stream. So that if you make decisions (validate pr

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

2015-07-15 Thread 何品
congratulations,big time. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the archives: https://groups.google.com/group/akka-user --- You received this message becaus

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

2015-07-15 Thread Magnus Andersson
Hi Joe I followed your instructions and got it to compile (hoping it will run as well). Thank you very much! For others reading this, I have updated the gist with a new file . But I did not quite follow along on statement: > (A simpler

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

2015-07-15 Thread Giovanni Alberto Caporaletti
Hi Magnus. a question concerning your pull model: if the updates are idempotent, why would I need a parent aggregate? Can't the views directly populate the read store? Cheers G On Tuesday, 14 July 2015 12:45:20 UTC+2, Magnus Andersson wrote: > > Hi > > I looked into this question in the past.

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

2015-07-15 Thread Amiri Barksdale
On Wednesday, July 15, 2015 at 10:43:55 AM UTC-7, Giovanni Alberto Caporaletti wrote: > > Hi Magnus. > a question concerning your pull model: if the updates are idempotent, why > would I need a parent aggregate? Can't the views directly populate the read > store? > This is a great question,

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

2015-07-15 Thread Eric Kolotyluk
Interesting discussion. While I have been using Scala for almost a decade now, I still find many of the APIs confusing and counter intuitive, and generally not very readable. In particular, naming of things is very important. My sense is often when people are playing with a new technology, such

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

2015-07-15 Thread Sam Halliday
Great! We already have a branch in ENSIME to expose our JSON protocol (JERKY) over akka-http REST and WebSockets: https://github.com/fommil/ensime-server/blob/websocket/server/src/main/scala/org/ensime/server/WebSocketBoilerplate.scala On Wednesday, 15 July 2015 13:40:25 UTC+1, Konrad Malawski

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

2015-07-15 Thread Richard Rodseth
Great news. Once the new modules are merged into 2.4, will the only changes to the 2.3 artifacts be bug fixes? On Wed, Jul 15, 2015 at 5:40 AM, Konrad Malawski wrote: > Dear hakkers, > > we—the Akka committers—are very pleased to announce the final release of > Akka Streams & HTTP 1.0. After cou

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

2015-07-15 Thread Konrad Malawski
I'll try to answer all questions posted here; It may take more than 1 email, please bear with me :-) > First of all congratulations on the release of akka-streams and akka-http ! > Thanks! What's a good approach to design such a service ? > All depends on the exact "what should it be doing" I g

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

2015-07-15 Thread Konrad Malawski
On Wed, Jul 15, 2015 at 10:08 PM, Sam Halliday wrote: > Great! We already have a branch in ENSIME to expose our JSON protocol > (JERKY) over akka-http REST and WebSockets: > Awesome, thanks for tracking the release so eagerly and for your feedback along the way! On Wed, Jul 15, 2015 at 10:39 PM

Re: [akka-user] Re: Connecting over Https using Akka-Http client

2015-07-15 Thread 'Johannes Rudolph' via Akka User List
Hi Jeroen, it would be very helpful if you could somehow come up with a reproducer against some publicly accessible endpoint which would show the issue. It seemed to work for all the URLs I tested. Johannes On Wed, Jul 15, 2015 at 6:25 PM, Jeroen Rosenberg wrote: > Btw, > > I tried connecting t

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

2015-07-15 Thread Joe Edwards
You could build it out of 3 more standard pieces by doing: def eitherMerge[L, R]: Graph[FanInShape2[L, R, Either[L, R]], Unit] = FlowGraph.partial() { implicit builder => import FlowGraph.Implicits._ val left = builder.add(Flow[L].map(Left.apply)) val right = builder.add(Flow[R].map(Right.

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

2015-07-15 Thread Fernando Racca
On Wednesday, 15 July 2015 13:40:25 UTC+1, Konrad Malawski wrote: > > Dear hakkers, > > we—the Akka committers—are very pleased to announce the final release of > Akka Streams & HTTP 1.0. After countless hours and many months of work we > now consider Streams & HTTP good enough for evaluation a

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

2015-07-15 Thread Viktor Klang
thanks for that, Eric! -- Cheers, √ On 15 Jul 2015 13:54, "Eric Kolotyluk" wrote: > Interesting discussion. While I have been using Scala for almost a decade > now, I still find many of the APIs confusing and counter intuitive, and > generally not very readable. In particular, naming of things

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

2015-07-15 Thread Andrey Kuznetsov
Awesome, it's a historical day! I can't imagine how our project would look without Akka and, especially, Akka Streams. We were early adopters of Streams, used them to implement fully-features messaging platform (read self-hosted Layer.com). Just upgraded to Streams 1.0 too! https://github.com/a

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

2015-07-15 Thread Viktor Klang
Awesome, Andrey! -- Cheers, √ On 15 Jul 2015 18:10, "Andrey Kuznetsov" wrote: > Awesome, it's a historical day! > > I can't imagine how our project would look without Akka and, especially, > Akka Streams. > We were early adopters of Streams, used them to implement fully-features > messaging pla

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

2015-07-15 Thread Magnus Andersson
Hi Giovanni: Yes, I suppose you could write directly to a read store in this case. As I wrote in my case I wanted the projection in memory as well to validate conditions before creating output (like allowing the user to download a file). Amiri: Yes that is correct. The difference between 1 and

[akka-user] Dealing with exceptions with pipeTo

2015-07-15 Thread nbuduma
I'm using the following code: val selfMessage: Future[PutDocument] = for { r <- { val indexer = client execute { index into es_index_id id raw_id fields( "version_vector" -> List() ) opType CREATE } indexer } t <- Futu

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

2015-07-15 Thread Magnus Andersson
Aha, I see. Thank you, I need to give this a try as well. I have been following the documentation on the homepage which had it split up by shape and inheriting FlexiRoute/Merge. I see I still have a lot of stuff left to learn :) /Magnus Den torsdag 16 juli 2015 kl. 00:09:43 UTC+2 skrev Joe Edw

Re: [akka-user] how to access external config inside a test spec (akka 2.0) ?

2015-07-15 Thread Mark van Buskirk
I recommend chaining and then loading. Also loading a custom configuration bumps out your application.config so if you want it loaded remember to put it in the config chain before loading. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://d

[akka-user] Promises and message passing

2015-07-15 Thread Jeff
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, but I would like to avoid the cost of having to allocate PromiseActorRefs. Thanks Jeff -- >> Read the docs: http://akka.io/docs/ >> Check the

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 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, but I would like to > a

Re: [akka-user] How forgiving can my cluster fail over detector be?

2015-07-15 Thread Martynas Mickevičius
Hi John, sorry for a late answer. Yes, you can configure failure detector to be more tolerant. I think tuning acceptable-heartbeat-pause

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

2015-07-15 Thread Giovanni Alberto Caporaletti
ok thanks.. I guess in this simple case I don't need a persistent view, I could directly save (asynchronously) the events on the read store so that I don't have to wait the 5 secs. Persistent views are not much use if I don't keep a modified (aggregated or not) in-memory view of my data, or at