Re: [akka-user] Distributed pub/sub subscription lifecycle guarantees

2017-04-14 Thread Giovanni Alberto Caporaletti
Nice, thank you for the clarification On Friday, 14 April 2017 20:15:38 UTC+2, Patrik Nordwall wrote: > > Yes, that is safe (as long as you subscribe to the local pubsub, and it > doesn't make sense to subscribe to a remote pubsub). > > /Patrik > fre 14 apr. 2017 kl. 19:39 skre

[akka-user] Distributed pub/sub subscription lifecycle guarantees

2017-04-14 Thread Giovanni Alberto Caporaletti
Hi all, a simple question: is an actor guaranteed to be forever subscribed to a topic in distributed pub/sub once it has received the SubscribeAck? In other words, is there a case in which an already subscribed actor "loses" its subscription or I'm safe as long as the node and the actor are

[akka-user] Re: akka-http web socket issue

2016-07-07 Thread Giovanni Alberto Caporaletti
Are you keeping the outbound client flow open? http://doc.akka.io/docs/akka/2.4.7/scala/http/client-side/websocket-support.html#Half-Closed_WebSockets On Thursday, 7 July 2016 00:34:02 UTC+2, Eric Swenson wrote: > > I wrote a simple python client: > > $ cat ws-test.py > import os > from

Re: [akka-user] PersistenceQuery: Materialize view to datastore - When should the query stream be stopped?

2016-07-05 Thread Giovanni Alberto Caporaletti
gt; > I think some kind of tagging is the way to go. > /Patrik > > On Sat, Jul 2, 2016 at 10:53 AM, Giovanni Alberto Caporaletti < > para...@gmail.com > wrote: > >> Talking about the pattern in the subject >> <http://doc.

[akka-user] PersistenceQuery: Materialize view to datastore - When should the query stream be stopped?

2016-07-02 Thread Giovanni Alberto Caporaletti
Talking about the pattern in the subject : I can't find a clean way of managing the lifecycle of persistence query streams that save persisted events to a read datastore

[akka-user] BackoffSupervisor maxNrOfRetries

2016-06-24 Thread Giovanni Alberto Caporaletti
Hi, is there a way to set a maxNrOfRetries for BackoffSupervisor? .withSupervisorStrategy(OneForOneStrategy(maxNrOfRetries = > 1)(SupervisorStrategy.defaultDecider doesn't seem to work, for example the following restarts the actor indefinitely:

[akka-user] Re: Parallel runnable graphs

2016-05-02 Thread Giovanni Alberto Caporaletti
May I add that also, in my experience, materializing a graph is a very costly operation performance-wise (if we're talking about 100/1000s of materializations/s)? Pre-fusing could help. There's a ticket open for fusing optimization. I try to materialize as little as possible because it's the

Re: [akka-user] Developing with Intellij

2016-04-21 Thread Giovanni Alberto Caporaletti
Sure Konrad, I didn't mean to be rude, sorry :) I even got my first - ultra-simple - commit merged in akka (very happy :), I'm TrustNoOne on github). It's just that basically scala code in intellij and any other ide as well has been red (for a reason or another) for years for me, it's

Re: [akka-user] Developing with Intellij

2016-04-21 Thread Giovanni Alberto Caporaletti
Intellij seems to be allergic to magnets and macros. All the "fake" red in my code is where i use directives or shapeless. The parameters directive is always red for me (too many arguments error, doesn't see the magnet). Last time I used ensime it was even worse though, it couldn't see a

[akka-user] Re: [akka-http-2.4.2] connection timeouts under load

2016-03-10 Thread Giovanni Alberto Caporaletti
have related issue but on client side (i.e making request using >> akka http) and issue with reproducer is: >> https://github.com/akka/akka/issues/19953 >> >> On Thursday, March 10, 2016 at 3:27:04 AM UTC-6, Giovanni Alberto >> Caporaletti wrote: >>>

[akka-user] Re: [akka-http-2.4.2] connection timeouts under load

2016-03-10 Thread Giovanni Alberto Caporaletti
n'. >> INFO [datastore-rest-api-akka.actor.default-dispatcher-5] - Message >> [akka.io.Tcp$ResumeReading$] from >> Actor[akka://datastore-rest-api/user/StreamSupervisor-0/$$e#585879533] to >> Actor[akka://datastore-rest-api/system/IO-TCP/selectors/$a/7#1750981790] >&g

Re: [akka-user] Re: How to? - Sink.foldM[U, T](zero: U)(f: (U, T) ⇒ Future[U]): Sink[T, Future[U]]

2016-03-09 Thread Giovanni Alberto Caporaletti
It would fail with an empty stream. You can use lastOption but you would need to map over the materialized value thus needing an execution context outside the stream context. cheers G On Wednesday, 9 March 2016 01:19:01 UTC+1, Andrew Gaydenko wrote: > > Giovanni, I mean your last sugg

[akka-user] Re: [akka-http-2.4.2] connection timeouts under load

2016-03-09 Thread Giovanni Alberto Caporaletti
and hard to reproduce since my application is > quite large and complex and relies almost entirely on an upstream REST > endpoint. > > On Saturday, March 5, 2016 at 8:38:11 AM UTC-7, Giovanni Alberto > Caporaletti wrote: >> >> Let me add that using finch on the same proj

Re: [akka-user] Re: How to? - Sink.foldM[U, T](zero: U)(f: (U, T) ⇒ Future[U]): Sink[T, Future[U]]

2016-03-07 Thread Giovanni Alberto Caporaletti
everyone else: please correct me if I'm wrong! Cheers On Monday, 7 March 2016 21:08:15 UTC+1, Andrew Gaydenko wrote: > > On Sunday, March 6, 2016 at 2:28:22 AM UTC+3, Giovanni Alberto Caporaletti > wrote: >> >> Hi Roland, >> you're right, my solution was a bit naive.

Re: [akka-user] Re: How to? - Sink.foldM[U, T](zero: U)(f: (U, T) ⇒ Future[U]): Sink[T, Future[U]]

2016-03-05 Thread Giovanni Alberto Caporaletti
sure, so I'd recommend against this approach. But it is late and > I'm on the phone so cannot suggest a proper solution. > > Regards, > > Roland > > Sent from my iPhone > > On 05 Mar 2016, at 17:41, Giovanni Alberto Caporaletti <para...@gmail.com > > wrote: >

[akka-user] Re: How to? - Sink.foldM[U, T](zero: U)(f: (U, T) ⇒ Future[U]): Sink[T, Future[U]]

2016-03-05 Thread Giovanni Alberto Caporaletti
how about this: def foldM[U, T](zero: U)(f: (U, T) ⇒ Future[U]): Sink[T, Future[U]] = { Sink .fold[Future[U], T](Future.successful(zero))((fu, t) => fu.flatMap(f(_, t))) .mapMaterializedValue(_ flatMap identity) } or this: def foldM[U, T](zero: U)(f: (U, T) ⇒ Future[U]): Sink[T,

[akka-user] Re: [akka-http-2.4.2] connection timeouts under load

2016-03-05 Thread Giovanni Alberto Caporaletti
using futures and streams I don't know exactly what to look into, I'm open to suggestions thank you! On Saturday, 5 March 2016 13:03:57 UTC+1, Giovanni Alberto Caporaletti wrote: > > Hi, > I'll try to explain what I'm experiencing in my akka-http app. > (I found this issue but i

[akka-user] [akka-http-2.4.2] connection timeouts under load

2016-03-05 Thread Giovanni Alberto Caporaletti
Hi, I'll try to explain what I'm experiencing in my akka-http app. (I found this issue but it's not been updated for almost a year and I'm not sure it's relevant: https://github.com/akka/akka/issues/17395) I noticed that under load a lot of connections (~1-2%) were dropped or timed out. I

Re: [akka-user] [akka-http-2.4.2] HttpConnectionTimeoutException logged at ERROR

2016-03-04 Thread Giovanni Alberto Caporaletti
lawski > <http://akka.io>Akka <http://akka.io> @ Lightbend <http://typesafe.com> > <http://lightbend.com> > > On 4 March 2016 at 10:04:05, Giovanni Alberto Caporaletti ( > para...@gmail.com ) wrote: > > [ERROR] [03/04/2016 08:31:12.592] [.dispatch

[akka-user] [akka-http-2.4.2] HttpConnectionTimeoutException logged at ERROR

2016-03-04 Thread Giovanni Alberto Caporaletti
[ERROR] [03/04/2016 08:31:12.592] [.dispatcher-145] [akka:///user/StreamSupervisor-1/-3347342-0-unknown-operation] Error in stage [recover]: No elements passed in the last 1 minute. (akka.http.impl.engine.HttpConnectionTimeoutException) I keep getting these, It would be ok if it

Re: [akka-user] [akka-stream-2.4.2] Are two mapAsync(x)(...) on two branches of a broadcast run concurrently after fusing or I need an asyncboundary?

2016-02-19 Thread Giovanni Alberto Caporaletti
Thanks for the explanation, endre. On a different note, I'm trying to understand what happens using async boundaries. In this example on the documentation: 1. Source(List(1, 2, 3)) 2. .map(_ + 1).async 3. .map(_ * 2) 4. .to(Sink.ignore) you create two different "islands" in the

[akka-user] [akka-stream-2.4.2] Are two mapAsync(x)(...) on two branches of a broadcast run concurrently after fusing or I need an asyncboundary?

2016-02-18 Thread Giovanni Alberto Caporaletti
As per the topic: I know that, for example, if I had the following: broadcast ~> Flow[X].flatMapConcat(...) broadcast ~> Flow[X].flatMapConcat(...) I would need an async boundary to make the two branches run concurrently. How does this work with futures? What happens if I have this? [A]

[akka-user] Re: [akka-stream-2.0.3] Flow with drop-everything feedback branch doesn't terminate

2016-02-04 Thread Giovanni Alberto Caporaletti
e) > > If my understanding is wrong please correct me :) > > Thanks, > Vishnu. > > > > > > > On Thursday, 4 February 2016 09:54:29 UTC-8, Giovanni Alberto Caporaletti > wrote: >> >> Hi everyone >> >> I created a small example in whic

[akka-user] [akka-stream-2.0.3] Flow with drop-everything feedback branch doesn't terminate

2016-02-04 Thread Giovanni Alberto Caporaletti
Hi everyone I created a small example in which I pass the input elements directly to the output and also send them to a feedback loop that drops everything (using filter). What happens is that the input elements are emitted as expected but the materialization never completes. Am I doing

Re: [akka-user] Re: [akka-stream-2.0.3] Flow with drop-everything feedback branch doesn't terminate

2016-02-04 Thread Giovanni Alberto Caporaletti
Hi Endre, Why do I need buffer space if I only send a single element and drop everything else in the feedback loop? On Thursday, 4 February 2016 20:46:21 UTC+1, drewhk wrote: > > Hi Giovanni, > > There is not enough buffer space in the loop, hence it deadlocks. > > -Endre

Re: [akka-user] [akka-http] performance improvements in 2.0

2015-12-11 Thread Giovanni Alberto Caporaletti
Hi Konrad, it totally does! looking forward to benchmark it Cheers G On Friday, 11 December 2015 01:45:57 UTC+1, Konrad Malawski wrote: > > Hi Giovanni, > "We're working on it". > > M2 has the parts needed to enable stream fusing. > Currently we're working on enabe

[akka-user] [akka-http] performance improvements in 2.0

2015-12-10 Thread Giovanni Alberto Caporaletti
Hi everyone, Has the so-called "fusing" already begun in 2.0-M2 or was it just a preparatory release? Is there a roadmap somewhere? How long (roughly) until 2.0 final? What kind of performance can we expect? spray-like already in 2.0 or somewhere in between? Of course I don't need all the

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

2015-07-18 Thread Giovanni Alberto Caporaletti
Akka http://akka.io @ Typesafe http://typesafe.com On 17 July 2015 at 12:43:03, Giovanni Alberto Caporaletti ( para...@gmail.com javascript:) wrote: Hi Konrad do you think that creating a streams adapter that exposes the current PersistentView as a stream and then switching to the new

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

2015-07-17 Thread Giovanni Alberto Caporaletti
Hi Konrad do you think that creating a streams adapter that exposes the current PersistentView as a stream and then switching to the new impl when it's stable would be a good idea? On Friday, 17 July 2015 10:52:28 UTC+2, Konrad Malawski wrote: Hi guys, A few things to add to the discussion

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

2015-07-16 Thread Giovanni Alberto Caporaletti
-300ms? Cheers G On Thursday, 16 July 2015 02:43:25 UTC+2, Magnus Andersson wrote: 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

[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.

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

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
'ktoso’ Malawski Akka http://akka.io @ Typesafe http://typesafe.com On 15 July 2015 at 14:57:09, Giovanni Alberto Caporaletti ( para...@gmail.com javascript:) wrote: In the meantime both Streams and HTTP can be used with Akka 2.4 artifacts since these are binary backwards compatibility

[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

[akka-user] 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-13 Thread Giovanni Alberto Caporaletti
Hi, just a quick question: since akka 2.4 is supposed to be binary compatible with 2.3, can current (1.0-RCx) akka-http/streams run with akka 2.4-Mx? I tried the akka-http-microservice template very quickly and it seems to be working. I'd like to use akka 2.4 already to be able to start using

[akka-user] Re: Akka cluster multi-jvm test - is it possible to simulate a network partition?

2015-07-10 Thread Giovanni Alberto Caporaletti
(m, _) = m.address }.toSet should be( side1.map(node(_).address).toSet) } On Friday, 10 July 2015 09:41:58 UTC+2, Giovanni Alberto Caporaletti wrote: Thank you very much, I'll have a look at it. My main problem was being able to create barriers on isolated group of nodes having only one

[akka-user] Akka cluster multi-jvm test - is it possible to simulate a network partition?

2015-07-09 Thread Giovanni Alberto Caporaletti
Hi. Is there a way I can simulate a network partition using sbt-multijvm and tools like testConductor.blackhole? I've been trying for a couple of hours but I haven't been successful. I won't even post my attempts because they are really useless :D Has any of you ever done that? Thanks G

[akka-user] Re: The all roles developer with IntelliJ, Java and Maven

2015-06-16 Thread Giovanni Alberto Caporaletti
I'll tell you my story as you did with yours, as a sort of knowledge exchange. I work in a -for the time being!- small startup that has to cover every possible technical aspect there is out there, from x64 assembly to machine learning to web development, and I'm the only backend guy (but this

[akka-user] Re: The all roles developer with IntelliJ, Java and Maven

2015-06-16 Thread Giovanni Alberto Caporaletti
background is similar to your, I'm the backend multi-thread async guy, I hate UI... Thanks for sharing, it is always good to know others experiences, specially small teams. Best regards, Guido. On Tuesday, June 16, 2015 at 10:48:23 PM UTC+1, Giovanni Alberto Caporaletti wrote: I'll

[akka-user] Re: Akka Http with actors vs Play w/ shared state - Akka performance is very poor

2015-06-03 Thread Giovanni Alberto Caporaletti
Hi Dana, as you can see here https://groups.google.com/forum/#!searchin/akka-user/performance/akka-user/XB7H2n2r-9A/ay5qwc2fA-8J (and on a number of other posts) the akka team has not yet started to optimize performances. I'm still evaluating if I should start to use it now and wait for the

Re: [akka-user] akka-http routes: common extraction for implicit executionContext and flowMaterializer

2015-05-30 Thread Giovanni Alberto Caporaletti
) = ...} doesn't . Cheers G On Friday, 29 May 2015 19:07:08 UTC+2, Konrad Malawski wrote: Hi Giovanni, Firstly, sorry we don't have docs on this yet, but they are coming soon! ( check this with a higher version number soon http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-M2

Re: [akka-user] akka-http routes: common extraction for implicit executionContext and flowMaterializer

2015-05-30 Thread Giovanni Alberto Caporaletti
’ Malawski Akka http://akka.io @ Typesafe http://typesafe.com On 30 May 2015 at 09:16:10, Giovanni Alberto Caporaletti ( para...@gmail.com javascript:) wrote: Thanks Konrad, I already have a lot of custom directives, but what I was wondering is if there's a way to make them both implicit. Maybe

Re: [akka-user] Akka http vs Spray performance

2015-05-28 Thread Giovanni Alberto Caporaletti
On Thursday, 28 May 2015 11:56:10 UTC+2, drewhk wrote: On Wed, May 27, 2015 at 10:45 PM, Giovanni Alberto Caporaletti para...@gmail.com javascript: wrote: I'm already using http/streams in a minor component, but since you're talking about this: do you have a rough idea of when the performance

Re: [akka-user] Akka http vs Spray performance

2015-05-27 Thread Giovanni Alberto Caporaletti
I'm already using http/streams in a minor component, but since you're talking about this: do you have a rough idea of when the performance improvement work will start? Of course I'm not talking about the exact day but it would be very useful to know if we can expect something by the end of the

[akka-user] Re: [akka-http] how does the formFields directive work?

2015-05-27 Thread Giovanni Alberto Caporaletti
You need both an implicit FlowMaterializer and an implicit ExecutionContext in scope. I haven't followed the chain to check why those are needed but basically I keep adding them (one or the other or both) wherever I have compilation errors and it works. It should be something related to

[akka-user] Re: [akka-http] how does the formFields directive work?

2015-05-27 Thread Giovanni Alberto Caporaletti
Well, since I'm here, let me ask: all the marshalling code requires an execution context (I can see that), but why a materializer? I can't find where the implicit mat is needed anywhere Thanks G On Wednesday, 27 May 2015 09:21:37 UTC+2, Giovanni Alberto Caporaletti wrote: You need both

[akka-user] Re: [akka-http] how does the formFields directive work?

2015-05-27 Thread Giovanni Alberto Caporaletti
[StrictForm], b:FromStrictFormFieldUnmarshaller[String]) = ???) and follow the implicit calls using the ide. Is there a better way to do this? Thanks again G On Wednesday, 27 May 2015 09:29:22 UTC+2, Giovanni Alberto Caporaletti wrote: Well, since I'm here, let me ask: all the marshalling code

[akka-user] Re: How can we test an actor with out going http request

2015-05-25 Thread Giovanni Alberto Caporaletti
Try to separate your login between internal business actors that you can unit test and a gateway sub-system to connect to external systems. The gateway would translate all the connection logic from the external domain to your internal domain, including errors and other possible states. You

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

2015-05-22 Thread Giovanni Alberto Caporaletti
Awesome, especially the documentation, I was really looking forward to that. Cheers! On Friday, 22 May 2015 17:43:53 UTC+2, rkuhn wrote: Dear hakkers, we—the Akka committers—are pleased to announce the third release candidate for Akka Streams HTTP. The most notable changes since 1.0-RC2

[akka-user] akka-http routes: common extraction for implicit executionContext and flowMaterializer

2015-05-18 Thread Giovanni Alberto Caporaletti
Hi everyone, I often need to have both the materializer and the execution context in scope in my routes. Is there a more compact way of doing this? extractFlowMaterializer { implicit mat = extractExecutionContext { implicit ec = or extractFlowMaterializer { implicit mat = implicit val ec

[akka-user] Re: akka-http

2015-05-08 Thread Giovanni Alberto Caporaletti
I used revolver and it still works... On Friday, 8 May 2015 01:07:05 UTC+2, Anton Kulaga wrote: I wonder what should I use to automatically restart my akka-http app as soon as some of its sources have been changed? Sbt-revolver looks more dead than alive. -- Read the docs:

Re: [akka-user] Re: Help desparately needed in motivating containerless deployment in mature enterprise

2015-05-08 Thread Giovanni Alberto Caporaletti
It really depends on the market you're in. Some markets (first I can think of are betting/gambling/banking) are very much against change. If you work in that sector you have two choices: 1) you resign and you go work with your friends in a startup working 24/7 but with the freedom to choose the

[akka-user] Re: Akka Streams HTTP 1.0-RC1 Announcement

2015-04-24 Thread Giovanni Alberto Caporaletti
Is there any documentation about the new websocket api? On Friday, 24 April 2015 23:04:37 UTC+2, Magnus Andersson wrote: By the way These packages seems to be missing: com.typesafe.akka:akka-http-experimental_2.11:1.0-RC1 com.typesafe.akka:akka-http-testkit-experimental_2.11:1.0-RC1

[akka-user] Akka Http websocket: RC1?

2015-04-19 Thread Giovanni Alberto Caporaletti
Hi, I just wanted to ask the team a quick update on the websocket implementation. It's in progress on github, do you think a first release is going to be included in http RC1? Cheers G -- Read the docs: http://akka.io/docs/ Check the FAQ:

[akka-user] Re: ANNOUNCE: Akka Stream HTTP 1.0 MILESTONE 5

2015-03-28 Thread Giovanni Alberto Caporaletti
Great work as always. I'm already using it in one minor project - will let you know if I find any issues ;) On Friday, 27 March 2015 22:05:12 UTC+1, rkuhn wrote: Dear hakkers, it has been four weeks since the last milestone was published, so it is high time for the next one. The

Re: [akka-user] Akka Streams 1.0 release date?

2015-03-26 Thread Giovanni Alberto Caporaletti
Out of curiosity, it's been a month since M4 and I don't see any progress in the github milestone (maybe because of scala days?). Can someone from the team give us some updates on how things are going? I was expecting a 1.0 final by the end of next month but maybe it will be later? No hard

Re: [akka-user] Akka Streams 1.0 release date?

2015-03-26 Thread Giovanni Alberto Caporaletti
Great! I thought it had something to do with scala days.. Can't wait to see the talks ;) Thanks G On Thursday, 26 March 2015 13:19:20 UTC+1, rkuhn wrote: Hi Giovanni, the larger time interval right now is indeed due to ScalaDays and the associated all-team travel activity

[akka-user] Re: Akka http - complete with headers

2015-03-12 Thread Giovanni Alberto Caporaletti
headers collection is an instance of immutable.Seq. E.g.: import collection.immutable._ complete( (OK, Seq(`Cache-Control`(`no-cache`)), responseEntity) ) Works for me. Mark On Thursday, March 12, 2015 at 12:18:28 AM UTC, Giovanni Alberto Caporaletti wrote: This is what I came up

[akka-user] Akka http - complete with headers

2015-03-11 Thread Giovanni Alberto Caporaletti
Hi, Completing a route with a Tuple3[StatusCode, Seq[HttpHeader], T] doesn't seem to work for me. My json4s marshaller serializes the whole tuple as an object. Tuple2[StatusCode, T] works instead. Are there any plans to implement it? What's the best way to add headers to a response anyway? In

[akka-user] Re: Akka http - complete with headers

2015-03-11 Thread Giovanni Alberto Caporaletti
separate constants for v1 and user and something like path(some / path) { (some, path) = ...} doesn't work. In other words, how do you do reverse routing in spray/akka http? Thanks G On Thursday, 12 March 2015 00:10:24 UTC, Giovanni Alberto Caporaletti wrote: Hi, Completing a route

[akka-user] Re: Akka Http 1.0-M4 formFields extractor compile error

2015-03-09 Thread Giovanni Alberto Caporaletti
11:45:24 UTC, Giovanni Alberto Caporaletti wrote: Hi, does anyone have any idea why the following route doesn't compile? I've been struggling with it for a while and really don't understand... It was inside a post/path directive but it fails even on its own. val route = formFields('field1

[akka-user] Akka Http 1.0-M4 formFields extractor compile error

2015-03-09 Thread Giovanni Alberto Caporaletti
Hi, does anyone have any idea why the following route doesn't compile? I've been struggling with it for a while and really don't understand... It was inside a post/path directive but it fails even on its own. val route = formFields('field1, 'field2) { (field1, field2) = complete(s$field1

[akka-user] Re: Akka streaming 1.0-M4

2015-03-06 Thread Giovanni Alberto Caporaletti
Hi Konrad, sorry if I go off topic, but since you consider the milestones pre-alpha, is the 1.0 final to be considered an alpha still? I thought it was something more more similar to beta (like everything flagged as experimental). For example in the persistence project the api changed but it

Re: [akka-user] Akka streaming 1.0-M4

2015-03-06 Thread Giovanni Alberto Caporaletti
Thanks Roland, that's what I wanted to know :) Happy to have started testing the project in this early phase anyway! Regards Giovanni On Friday, 6 March 2015 18:52:03 UTC, rkuhn wrote: Hi Giovanni, Akka Streams HTTP are not yet in the state of Akka Persistence, they are development

[akka-user] Streams M4: Reasons behind the new MAT type parameter/why does .to default to Keep.left?

2015-03-02 Thread Giovanni Alberto Caporaletti
I'm trying to better understand the new api. If I got it right, the new type parameter of the various stream components represents the type of what's materialized by that component when the stream is run (materialized). E.g.: A Source(actorProducerProps) has the actorRef as its

Re: [akka-user] Re: [akka-http] Routing dsl and streams integration

2015-02-27 Thread Giovanni Alberto Caporaletti
Hi Martynas, what if I wanted to marshal a source (the head) of a type for which a ToResponseMarshaller is available? Do I need to materialize it like this? implicit def streamMarshaller[T](implicit mat: FlowMaterializer, marshaller: ToResponseMarshaller[T]): ToResponseMarshaller[Source[T]]

[akka-user] Re: akka-http custom directives

2015-02-27 Thread Giovanni Alberto Caporaletti
Hi, I just started to write one to check basic authentication with an external service, because the current implementation forces you to know the cleartext password to compare it with the provided one. This is a basic test I made for the time being. I was wondering if there is a better way of

Re: [akka-user] Re: how do I configure a different dispatcher for an ActorProducer?

2015-02-26 Thread Giovanni Alberto Caporaletti
Sure thing! https://github.com/akka/akka/issues/16952 On Thursday, 26 February 2015 15:50:12 UTC, Martynas Mickevičius wrote: Hi Giovanni, you approach with mapAsync and asking your actor for the next item seems fine. I think it is a bug that custom dispatcher is ignored when creating

Re: [akka-user] Akka Stream firstOrElse

2015-02-23 Thread Giovanni Alberto Caporaletti
Hi Roland I see! I already started building my repository - maybe I'll share it later on thanks G On Monday, 23 February 2015 07:55:31 UTC, rkuhn wrote: Hi Giovanni, stages are exactly the right approach to tackle these things: we want to avoid having a ton of combinators on the core API

[akka-user] Akka Stream firstOrElse

2015-02-22 Thread Giovanni Alberto Caporaletti
Hi, I'm trying to do something similar to the rx.observable.firstOrElse(x), that is emitting a default value when the source is empty. I want to evaluate the default value *only* if the source is empty. The only way I found is writing a custom stage (below). Is there some built-in operator I

[akka-user] Akka-http - Why does UserCredentials class have a verifySecret method?

2015-02-21 Thread Giovanni Alberto Caporaletti
Very simple questions: 99% of times a system does not have the user's secret but only some hashed form of it. I need to pass the clear-text password to the verifySecret method in the Provided credentials, in order to match it with the one in the basic authentication header. Is all the

Re: [akka-user] akka-streams - How to define a Source from an arbitrary event stream?

2015-02-21 Thread Giovanni Alberto Caporaletti
but this approach forces you to call the thing that produces items and block in the same dispatcher as the consumer, doesn't it? What's the best option here? Having an Iterator[Future[T]] that return promises of something that's being executed in a different exec. context? Thank you G On

[akka-user] Re: akka-streams - How to define a Source from an arbitrary event stream?

2015-02-20 Thread Giovanni Alberto Caporaletti
Hi Jim, Simon. What you say is exactly what I did: I have a normal actor on a different dispatcher (but it could be any type of asynchronous code) that sends messages to an actor producer that acts as the Source of the stream. +1 for adding more external interaction recipes on the

[akka-user] Re: how do I configure a different dispatcher for an ActorProducer?

2015-02-18 Thread Giovanni Alberto Caporaletti
it giveMeNextItem and use the resulting future in a mapAsync. Is that correct? Sorry for thinking out loud but the model is pretty different from rx schedulers and I'm trying to grok it as well as I can :) Cheers G On Wednesday, 18 February 2015 23:54:07 UTC, Giovanni Alberto Caporaletti

[akka-user] how do I configure a different dispatcher for an ActorProducer?

2015-02-18 Thread Giovanni Alberto Caporaletti
Hi again, I have another question. Let's say that I write a blocking ActorProducer (could be anything, external service, database, whatever), and I want it to use a specific dispatcher explicitly configured to handle blocking operations. Suppose I have an MyActor.props() method that returns

Re: [akka-user] Re: streams - Source that emits only 1 (or no) element

2015-02-16 Thread Giovanni Alberto Caporaletti
:29:10 UTC, √ wrote: Giovanni, On Mon, Feb 16, 2015 at 9:37 PM, Giovanni Alberto Caporaletti para...@gmail.com javascript: wrote: What I'm saying is that conceptually having a single item or a stream are two different things and this should be reflected in the type system (e.g. rx Task

[akka-user] streams - Source that emits only 1 (or no) element

2015-02-15 Thread Giovanni Alberto Caporaletti
Hi, I was wondering, is Source[T] an abstraction only useful when you can possibly have more than 1 element? Is Future[T] still the way to represent a source that will emit exactly 1 element or an error? What about 0 or 1? Future[Option[T]] vs Source[T]? In rxjava they are proposing a Task

Re: [akka-user] akka 2.4.0 release date?

2015-02-05 Thread Giovanni Alberto Caporaletti
Hi Roland, do you think you're on track for the april estimate? Part II — Akka 2.4 ETA: April 2015 On Wednesday, 4 February 2015 21:30:53 UTC, rkuhn wrote: Hi Andrei, please refer to the roadmap update https://typesafe.com/blog/akka-roadmap-update-dec-2014 I posted recently (it also

[akka-user] Re: new project - akka streams/http - is using the current spray release with akka streams and migrating later too painful?

2015-02-04 Thread Giovanni Alberto Caporaletti
away or stay with rx, maybe with the reactive streams adapters (https://github.com/ReactiveX/RxJavaReactiveStreams) ? On Wednesday, 4 February 2015 00:04:13 UTC, ric...@jesims.com.au wrote: Hey Giovanni, I just asked a very similar question a couple days ago, some of the info you need

[akka-user] new project - akka streams/http - is using the current spray release with akka streams and migrating later too painful?

2015-02-02 Thread Giovanni Alberto Caporaletti
Hi, I need to start a new project in a couple of months (and hopefully have a first working prototype in 2-3 months more). I am a rxscala/java user, and am following the reactive streams/akka streams projects with huge interest. For the api layer, akka-http is too immature to be used right now

Re: [akka-user] Any way possible to integrate with Arduino?

2014-11-03 Thread Giovanni
As far as I know, it is not possible to run JVM on Arduino. But I have some projects running Akka and Play for Scala on the Raspberry Pi without problems. On Mon, Nov 3, 2014 at 10:28 PM, Konrad Malawski kt...@typesafe.com wrote: I have not seen Akka running on an Arduino, but talking to an

Re: [akka-user] What would it take to make actors in another language/platform

2014-08-18 Thread Giovanni
I developed a Play webapp using Akka actors by mixing Java and Scala classes. It runs on Raspberry Pi without problems. Best regards, giovanni On Tue, Aug 19, 2014 at 2:57 AM, Dragisa Krsmanovic dragis...@gmail.com wrote: Java apps work fine under Raspberry Pi. I had Akka running, remoting

Re: [akka-user] Future time out

2014-05-20 Thread Giovanni Ruggiero
Hi Roland, sorry for the delay: On Tuesday, May 13, 2014 9:11:58 AM UTC+2, rkuhn wrote: Hi Giovanni, 13 maj 2014 kl. 08:49 skrev Giovanni Ruggiero giovanni...@eligotech.comjavascript: : On Saturday, May 10, 2014 3:30:42 PM UTC+2, rkuhn wrote: 10 maj 2014 kl. 10:35 skrev Giovanni

Re: [akka-user] Re: Future time out

2014-05-13 Thread Giovanni Ruggiero
On Saturday, May 10, 2014 3:30:42 PM UTC+2, rkuhn wrote: 10 maj 2014 kl. 10:35 skrev Giovanni Ruggiero giovanni...@eligotech.comjavascript: : What puzzles us is that the ask() message gets responded. It's the returned Future that times out. If the Future times out, then the reason

[akka-user] Re: Future time out

2014-05-08 Thread Giovanni Ruggiero
No, this happens with several actors, not related to db connections. One thing we have observed is that happens after the Play application has been idle for a long period. Thanks Giovanni On Thursday, May 8, 2014 12:25:47 AM UTC+2, Muki wrote: Hi, I have similar problems with play

[akka-user] Future time out

2014-05-07 Thread Giovanni Ruggiero
very much in advance Giovanni Ruggiero -- 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 because you are subscribed

Re: [akka-user] ANNOUNCE: Akka 2.3.0

2014-03-05 Thread Giovanni
Congratulations! I am very impressed about the big work done on Akka. On Thu, Mar 6, 2014 at 12:11 AM, Björn Antonsson bjorn.antons...@typesafe.com wrote: We—the Akka committers— are proud to announce the final release of Akka 2.3.0, the first step of the Rollins

Re: [akka-user] Using Akka cluster to build a SOA framework?

2014-02-11 Thread Giovanni Botta
and dive in and figure out what's missing (if anything). Thanks for the pointers. Giovanni On Tuesday, February 11, 2014 6:55:02 AM UTC-5, Akka Team wrote: Hi Giovanni, while it might work to send a transaction around between actors, I believe that that is the wrong approach. In the Actor Model

Re: [akka-user] Using Akka cluster to build a SOA framework?

2014-02-10 Thread Giovanni Botta
pointers, I'd be glad to cook up a simple Akka + HBN example and contribute it to the docs. Finally, I could give you more examples of the other service patterns or buzzwords I mentioned but I think the above is already a great start. Thanks again! Giovanni On Monday, February 10, 2014 2:49:09 AM

Re: [akka-user] Using Akka cluster to build a SOA framework?

2014-02-05 Thread Giovanni Botta
an interesting idea. In the meantime I'd like your feedback and to open a discussion about the best ways to proceed with the implementation and what existing projects/code examples might work as a baseline. Giovanni On Wednesday, April 24, 2013 4:28:06 AM UTC-4, rkuhn wrote: Hi Yuesong, 23