Re: [akka-user] Re: Integrating different Bounded Contexts

2015-06-05 Thread Richard Rodseth
Oh, I misunderstood. Thanks for clarifying. I'll be interested in other reactions. My impression (perhaps incorrect) is that a small subset of Akka users are using Akka Cluster. On Fri, Jun 5, 2015 at 3:24 PM, Guido Medina wrote: > No, I have a single cluster, each micro-service is an Akka syste

[akka-user] ConnectionPoolSetup RC3 scaladoc arg not in source

2015-06-05 Thread Gary Struthers
http://doc.akka.io/api/akka-stream-and-http-experimental/1.0-RC3/#akka.http.ConnectionPoolSetup The first create and constructor arg is options: Traversable [SocketOption] The linked to source file https://git

[akka-user] Re: Integrating different Bounded Contexts

2015-06-05 Thread Guido Medina
No, I have a single cluster, each micro-service is an Akka system that is subscribed to cluster events and once a system is up, it sends a message to every other node saying, hey, I'm here, lets exchange information, call it, synchronizing their cache. Risky?, Akka follow the let-it-crash philo

Re: [akka-user] Re: Integrating different Bounded Contexts

2015-06-05 Thread Richard Rodseth
So each BC is an Akka Cluster, and you are relying on remote Akka (remote) messages to propagate changes from one BC to another? That sounds risky. Implementing DDD has a section (p303) called "Spreading the news to Remote Bounded Contexts" On Fri, Jun 5, 2015 at 11:18 AM, Guido Medina wrote: >

[akka-user] Re: Too many scan calls when profiling my akka application

2015-06-05 Thread Justin Forder
It may be the hottest method, but it is still only using 4.6% of your total CPU use. Is that really a concern? regards Justin -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html

[akka-user] Re: Akka and DDD - Business Space to Solution Space for Bounded Context

2015-06-05 Thread wonderful world
Kind of, the other one was with an example. Thanks for answering. On Friday, June 5, 2015 at 1:23:04 PM UTC-5, Guido Medina wrote: > > Is this a duplicate? I have spent sometime answering your other thread > -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ

[akka-user] Re: Akka and DDD - Business Space to Solution Space for Bounded Context

2015-06-05 Thread Guido Medina
Is this a duplicate? I have spent sometime answering your other thread -- >> 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/grou

[akka-user] Re: Flow.wrap(ActorSubscriber, ActorPublisher) does not Cancel the publisher

2015-06-05 Thread richard
Expected Cancel is received if Sink.foreach is replaced by Sink.head or Sink.cancelled. On Thursday, June 4, 2015 at 1:55:58 PM UTC-5, richard wrote: > > Using version: 1.0-RC3 > > On Thursday, June 4, 2015 at 1:45:14 PM UTC-5, richard wrote: >> >> >> I have the following Use Case. >> >> A mas

[akka-user] Re: Integrating different Bounded Contexts

2015-06-05 Thread Guido Medina
Some clarification on my previous posts: - *Akka cluster:* "My cluster events" was a typo, I meant that I use Akka cluster and each microservice is subscribed to the cluster events so every time one actor system comes up, it knows about the other actor systems and a handshake with c

[akka-user] Re: Integrating different Bounded Contexts

2015-06-05 Thread Guido Medina
I'm building a FX trading OMS and I have signals, strategies, accounts and orders, they all run on a different JVM and each have a distribution type like SINGLETON, SHARDED or ROUND_ROBIN, they communicate with each other because they are part of the Akka cluster, so each has a separate Actor S

[akka-user] Re: Debug message- Cancelling akka.stream.impl.MultiStreamOutputProcessor (after: 5000 ms)

2015-06-05 Thread Jason Bass
Hi, I ran into a problem where I was seeing the same message. It appears to be a timeout that defaults to 5 seconds. I was able to get past this by configuring a longer timeout. E.g., akka { stream { materializer { subscription-timeout { timeout=30s } } } } Ho

[akka-user] Re: [akka-hhtp][akka-streams] Process http request with flow

2015-06-05 Thread Владимир Морозов
Yes, I know about mapAsync, but my problem with Source. A want to use single stream for processing some group of events пятница, 5 июня 2015 г., 20:29:16 UTC+3 пользователь Paul Kinsky написал: > > Use mapAsync: `def mapAsync[T](parallelism: Int)(f: (Out) ⇒ Future[T]): > Repr[T, Mat]`. > > On Fr

[akka-user] Re: [akka-hhtp][akka-streams] Process http request with flow

2015-06-05 Thread Paul Kinsky
Use mapAsync: `def mapAsync[T](parallelism: Int)(f: (Out) ⇒ Future[T]): Repr[T, Mat]`. On Friday, June 5, 2015 at 9:23:24 AM UTC-7, Владимир Морозов wrote: > > Hi all, > > I have some simple application based on akka streams and http: > > My Flow items: > > val resultSink = Sink.head[String] > >

[akka-user] Java: Closing on context() at anonymous class

2015-06-05 Thread Guido Medina
Hi, I have the following method which creates a FixInitiator which is part of another multi-threaded framework I have no control, the client is started inside an actor which its children are named and located by a generated UUID. I have read that passing the context to another thread is not sa

Re: [akka-user] Integrating different Bounded Contexts

2015-06-05 Thread Richard Rodseth
You don't want more than one ActorSystem per process. If each BC is a separate process (a la microservices) then having something like Kafka to durably message between them would be great. Within an ActorSystem, you can use the Akka EventBus to (non-durably) message between root-level actors that d

[akka-user] [akka-hhtp][akka-streams] Process http request with flow

2015-06-05 Thread Владимир Морозов
Hi all, I have some simple application based on akka streams and http: My Flow items: val resultSink = Sink.head[String] val fl0 = Flow[String].map(_.toInt) val fl2 = Flow[Int].map{ case value => Thread.sleep(1) value.toString } val fl3 = Flow[String].mapAsync(1)(callMe)

[akka-user] Akka Http Multi-part form data

2015-06-05 Thread Maatary Okouya
Hi, I'm trying to form a multi-part form data but can't figure out how, so far is what i wrote: object FileUploadSpike2 extends App { implicit val system = ActorSystem() implicit val materializer = ActorFlowMaterializer() import system.dispatcher val authorization = headers.Author

Re: [akka-user] Failure in inner stream not reflecting in the outer stream

2015-06-05 Thread Viktor Klang
The parameter to mapAsync is how many currently in progress are allowed. I'd probably write it as: val finish = source.via(connectionFlow).mapAsync(1){ case response if response.status == StatusCodes.OK => response.entity.dataBytes.map(println).runForeach(identity) case _ => Future.failed(n

Re: [akka-user] Failure in inner stream not reflecting in the outer stream

2015-06-05 Thread Prog
I have done this code which seems to work, is this the right way to do what you said? How the parameter of the mapAsync influence the process of it? val finish = source.via(connectionFlow).mapAsync(1){ response => if (response.status == StatusCodes.OK) { val futureInner: Future[Unit] = res

Re: [akka-user] Failure in inner stream not reflecting in the outer stream

2015-06-05 Thread Viktor Klang
If you want to break the outer stream on the first failure of the inner stream then I recommend using mapAsync and have the inner stream return a future in the inner stream. On Fri, Jun 5, 2015 at 2:39 PM, Prog wrote: > My point is imagine you have a large file (>1GB) received by that stream > (

Re: [akka-user] Failure in inner stream not reflecting in the outer stream

2015-06-05 Thread Prog
My point is imagine you have a large file (>1GB) received by that stream (I don't know if the file come as a chunked message or not ), even if the file was not complete you get the response in the outer stream that it was successful . So I could not send the outer future to some other function t

Re: [akka-user] Failure in inner stream not reflecting in the outer stream

2015-06-05 Thread Viktor Klang
My point is that if there are multiple elements in the substream then there could be multiple failures, multiple successes or a combination thereof. How would you represent that in a single result? On Fri, Jun 5, 2015 at 12:27 PM, Prog wrote: > I would like to have the same failure as I get in

[akka-user] Scaling REST API with actor systems

2015-06-05 Thread wonderful world
I have an OrderManager MicroService REST API end point. One of the method is retrieving the orders for a customer. Under heavy load (many requests from the HTML Client application) I want to scale the OrderManager. Is the best practice is to have the OrderManager MicroService developed with clu

[akka-user] Leaking of infrastructure concern into Domain via Akka PersistenceActor

2015-06-05 Thread wonderful world
The domain model while practicing DDD should be rich without no infrastructure concerns. *Repository* is such an example. Having a *Enterprise Bus* is also. The domain should not depends on such implementation. The app service may be doing that job. Akka actors which is promoted to be the same

[akka-user] Akka and DDD - Business Space to Solution Space for Bounded Context

2015-06-05 Thread wonderful world
In DDD, the Bounded Contexts separate some business concerns. For example, OrderManagement and Shipping are BCs. In a pure DDD implementation, they can be implemented as separate assemblies or libraries. They may contain an entity called Product which are different in structure and behavior. The

[akka-user] Integrating different Bounded Contexts

2015-06-05 Thread wonderful world
I have a BillingManager Bounded Context (DDD concept) whose job is to charge the user for the orders they have placed. There is an OrderManager that places the orders. They exist in two different Bounded Contexts. As per the DDD, one Bounded Context should interact with another Bounded Context

Re: [akka-user] Failure in inner stream not reflecting in the outer stream

2015-06-05 Thread Prog
I would like to have the same failure as I get in the inner onComplete akka.http.scaladsl.model.EntityStreamException: Entity stream truncation As the stream was not complete I think there is no reason the outer onComplete finish with success. On Friday, June 5, 2015 at 12:22:10 PM UTC+2, √

Re: [akka-user] Failure in inner stream not reflecting in the outer stream

2015-06-05 Thread Viktor Klang
What behavior would you want when there are multiple elements in the first source? What would the value in the outer onComplete be? On Fri, Jun 5, 2015 at 12:17 PM, Prog wrote: > Hi, > > I have the code bellow and I have tried many different variations of it > with mapAsync in the place of forEa

[akka-user] Failure in inner stream not reflecting in the outer stream

2015-06-05 Thread Prog
Hi, I have the code bellow and I have tried many different variations of it with mapAsync in the place of forEach and goes on, but for some reason when I break the communication on the server side in the middle of the transfer I get the error in the inside Sink.onComplete, but the error it is n

[akka-user] Printing JSON request payload

2015-06-05 Thread user123
Hi, I'm using Akka Http and got working an example project. I added a handler for a JSON POST. I can parse the payload to JSON but the print statement after that doesn't show in the console and I don't understand why. This is my (experimental) code: def asyncHandler(request: HttpRequest): Fu

Re: [akka-user] adding AtLeastOnceDelivery trait broke my test

2015-06-05 Thread Giampaolo
Many thanks Akka Team for the reply. Do you think that this info should be added to TestKit doc to avoid this mistake for Akka newbies like me? giampaolo Il giorno venerdì 29 maggio 2015 15:37:00 UTC+2, Akka Team ha scritto: > > Hi there, > in general we do not encourage the use of TestActorRe