Re: [akka-user] Pause an actor with a GraphStage -> how to validate if is open when what I have is a future?

2017-08-17 Thread Konrad “ktoso” Malawski
Share full code please. It’s hard to guess what you’re doing from snippets. state.map( Looks unsafe. Is this a Future? You’re invoking internal state methods from outside threads which is unsafe and will not work if it is. Read about asyncCallback in GraphStage docs if that is the case. —

Re: [akka-user] [Akka HTTP] Respond with a partially streamed JSON object

2017-08-17 Thread Konrad “ktoso” Malawski
Nested streaming is somewhat tricky. You could achieve the actual streaming semantics with injecting the things around it, via something like `Source(the "header") concat streamingSource concat Source(“the ending ]]}]]}]”)` We have tools coming for streaming nested parsing, but not rendering

[akka-user] [Akka HTTP] Respond with a partially streamed JSON object

2017-08-17 Thread nadav
I am trying to respond with a JSON object which has some strict values and some streamed values ``` { "total_results": 15, "items": [ // Streamed JSON objects ] } ``` Is there a way to respond like this without injecting the surrounding data into the Source? I am currently using

[akka-user] Pause an actor with a GraphStage -> how to validate if is open when what I have is a future?

2017-08-17 Thread Yuliban Fernando Penagos Gómez
Hi I'm trying to use a Valve (which is implemented via a GraphStage). The idea is to close the valve when some Left is raised inside a stream. That seems working ok. One of the thing is that I'm stuck in the onPush handler, cause before doing a push to the Outlet port, I have to validate if

Re: [akka-user] My initial impressions of akka.typed design.

2017-08-17 Thread Sean Shubin
I will take a look at the ScalaDoc for ActorRefImpl. To answer your question about how I intend to test behaviors, let me clarify that my concern was not about testing behaviors specifically. I was starting out by testing my interactions with behaviors. Hopefully I can illustrate what I mean with

Re: [akka-user] Re: Sharded replication with distributed data

2017-08-17 Thread Igor Baltiyskiy
Thanks for the explanation and the link! Cheers Igor On чт, 17 авг. 2017 г. at 19:21, Patrik Nordwall wrote: > On Thu, Aug 17, 2017 at 11:19 AM, Igor Baltiyskiy > wrote: > >> Thanks Patrik! >> >> One last question --- what should we watch out for

Re: [akka-user] Re: Sharded replication with distributed data

2017-08-17 Thread Patrik Nordwall
On Thu, Aug 17, 2017 at 11:19 AM, Igor Baltiyskiy wrote: > Thanks Patrik! > > One last question --- what should we watch out for when we have 1 > entities per node role? Network usage, obviously, what else? > You should not put each entry as a top level entry in

Re: [akka-user] Re: Sharded replication with distributed data

2017-08-17 Thread Igor Baltiyskiy
Thanks Patrik! One last question --- what should we watch out for when we have 1 entities per node role? Network usage, obviously, what else? Thanks again Igor On Wednesday, August 16, 2017 at 4:11:09 PM UTC+3, Patrik Nordwall wrote: > > > > On Wed, Aug 16, 2017 at 1:28 PM, Igor Baltiyskiy

Re: [akka-user] My initial impressions of akka.typed design.

2017-08-17 Thread Roland Kuhn
Hi Sean, thanks for discussing Akka Typed! The design decision behind splitting the interface into a public and a private part is documented in the ScalaDoc for ActorRefImpl: end users shall not ever see the top two methods because there cannot possibly be a reason to use them—but the