[akka-user] Tcp TLS example with client auth

2016-05-13 Thread Magnus Andersson
that uses client certificates, I am probably just getting some config wrong. Regards Magnus Andersson -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> ht

Re: [akka-user] Re: onComplete missing when persisting messages from stream with akka persistence

2016-05-13 Thread Magnus Andersson
Source or custom stages that reproduces your issue? > > -Endre > > > > > On Thu, May 12, 2016 at 6:27 PM, Magnus Andersson < > magnus.anders...@mollyware.se> wrote: > >> Hi again Roland >> >> I have now confirmed that this becomes an issue for me

[akka-user] Re: onComplete missing when persisting messages from stream with akka persistence

2016-05-12 Thread Magnus Andersson
Defined ) .map( _.get ) val src = Source( List( 1, 2, 3, 4, 5 ) ) src .via( flow ) .runWith( TestSink.probe[Int] ) .request( 1 ) .expectNext( 5 ) .expectComplete } } Den söndag 1 maj 2016 kl. 22:16:20 UTC+2 skrev Magnus Andersson: > > Hi > > I'

Re: [akka-user] Illegal to close over saveSnapshot within persistAll

2016-05-06 Thread Magnus Andersson
toso` Malawski > Akka <http://akka.io> @ Lightbend <http://lightbend.com> > > On 6 May 2016 at 10:41:02, Magnus Andersson (mag...@magnusart.com) wrote: > > Hi > > Yes, the buffer.isEmpty and checkSnapshotTreshold will guarantee the > snapshot at most called onc

Re: [akka-user] Re: [Akka-stream|http] - How to close a flow with killswitch from outside?

2016-05-06 Thread Magnus Andersson
logged as a dead letter > messages. > > Btw, even if my assumptions are wrong I really like to know the answer of > "how can I use killswitch" in this matter to learn the akka-streams better. > > Thank you. > > > On Wednesday, May 4, 2016 at 11:39:28 AM UTC+4:30, Magnu

Re: [akka-user] Illegal to close over saveSnapshot within persistAll

2016-05-06 Thread Magnus Andersson
r persistAll. > > It's important that the object (state in your case) you save as snapshot > is immutable. > > /Patrik > > fre 6 maj 2016 kl. 00:36 skrev Magnus Andersson <mag...@magnusart.com > >: > >> Hi >> >> I have a hunch this might b

[akka-user] Illegal to close over saveSnapshot within persistAll

2016-05-05 Thread Magnus Andersson
saveSnapshot( state ) Br Magnus Andersson -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>

[akka-user] [Akka-stream|http] - How to close a flow with killswitch from outside?

2016-05-04 Thread Magnus Andersson
I don't understand how you are to detect this behavior. You have a throttle for 1mgs/sec and a buffer of 1000mgs and a overflow strategy to drop messages. The messages will keep coming if you don't fill up the buffer, up to 1000 seconds after upstream has stopped sending messages. Is this

Re: [akka-user] onComplete missing when persisting messages from stream with akka persistence

2016-05-02 Thread Magnus Andersson
ka/akka/blob/master/akka-stream/src/main/scala/akka/stream/impl/fusing/Ops.scala#L835> > ). > > override def onUpstreamFinish(): Unit = if (todo == 0) completeStage() > > *Question: How can I work around this? I need to persist my messages and > this test flow is supposed to

[akka-user] Re: Akka streams TLS info available in later stages

2016-04-30 Thread Magnus Andersson
, to lower the risk when refactoring. Kind regards Magnus Andersson Den torsdag 28 april 2016 kl. 10:45:55 UTC+2 skrev Konrad Malawski: > > Hi Magnus, > As far as I remember this is not available, please open a ticket and let's > discuss there. > We likely won't be able to focus on i

[akka-user] Akka streams TLS info available in later stages

2016-04-27 Thread Magnus Andersson
Hi When looking at the TLS stage I cannot figure out if it is possible to access the certificate that have been presented for during TLS two way (client) authentication? It would be very useful to extract information from that cert to identify the connecting client. I'm implementing an

Re: [akka-user] What are the correlation between ByteString in Akka Streams TCP packet payloads?

2016-04-20 Thread Magnus Andersson
many things as it can from the available >> bytes, returning the found things and the unused bytestring. >> Other state can also be kept alongside the buffer if you need that as >> well. >> >> On Wed, Apr 20, 2016 at 2:41 PM Magnus Andersson <mag...@magnusar

Re: [akka-user] What are the correlation between ByteString in Akka Streams TCP packet payloads?

2016-04-20 Thread Magnus Andersson
com> skrev: > Hi Magnus, > > > > On Sat, Apr 9, 2016 at 11:00 PM, Magnus Andersson <mag...@magnusart.com> > wrote: > >> Hi >> >> I'm implementing a TCP protocol (Lumberjack2/Beats) in Akka Streams. It >> is a streaming application level protocol whe

[akka-user] What are the correlation between ByteString in Akka Streams TCP packet payloads?

2016-04-09 Thread Magnus Andersson
Hi I'm implementing a TCP protocol (Lumberjack2/Beats) in Akka Streams. It is a streaming application level protocol where each messages varies data length. In Akka streams I get ByteStrings fed through the stream but I can't find any information about how these correlate with TCP packets sent

[akka-user] Death watch from outside an actor

2015-09-01 Thread Magnus Andersson
Hi I got a question I could not answer so I'd like to get some input. 1. Developer needs to communicate with a remote actor 2. ActorSystem is created and the an actor selection is made directly on the actor system against the remote actor 3. Now he wants to add death watch to detect

[akka-user] Types not aligning when using FutureDirectives onSuccess

2015-07-17 Thread Magnus Andersson
Hi I have a hard time figuring out why the types will not align when using future directives onSuccess method. There is a gist created here that contains the code: https://gist.github.com/magnusart/a3b9321d6e391889d59a I've mucked around but cannot get the types to completely match up. I

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

2015-07-15 Thread Magnus Andersson
of each input from a = Left(a) and b = Right(b), then a simple MergePreferred will suffice) On Tuesday, 14 July 2015 16:58:12 UTC+1, Magnus Andersson wrote: Sorry, post button pressed by mistake. Continued: FlexiMerge only seems to be able to handle inlets of the same type. I wish to have

[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

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

2015-07-15 Thread Magnus Andersson
) On Wednesday, 15 July 2015 18:40:08 UTC+1, Magnus Andersson wrote: 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 https://gist.github.com/magnusart/0802295c0fafdf9b5028

[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

[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
12, 2015 at 1:18 PM, Magnus Andersson magnus.a...@mollyware.se javascript: wrote: Hi I have to do a class cast to ge able to get a typed outlet from a flow that I used in a FlowGraph. 1. I'm wondering if I'm using the API wrong below, can I get the outlet in a different way? 2

[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
it? I have created a gist that illustrates my problem https://gist.github.com/magnusart/0802295c0fafdf9b5028. Any suggestions appreciated! /Magnus Den tisdag 14 juli 2015 kl. 17:54:23 UTC+2 skrev Magnus Andersson: Hi I'm trying to build an EitherRoute and EitherMerge flows. I've completed

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

2015-07-12 Thread Magnus Andersson
Hi I have to do a class cast to ge able to get a typed outlet from a flow that I used in a FlowGraph. 1. I'm wondering if I'm using the API wrong below, can I get the outlet in a different way? 2. Other suggestions for improvement apart from the single line is welcome, perhaps my

[akka-user] Re: [akka-http] akka-http-session project: client-side sessions, remember me, csrf

2015-07-11 Thread Magnus Andersson
Hi I recommend just keeping cookies out of the equation, that makes CSRF issues go away which gives you a simpler implementation. Some answers below, hope you don't mind the long answers :) Where possible I tried to base the impl on what's in Play, as I trust them to do the right thing

[akka-user] Re: [akka-http] akka-http-session project: client-side sessions, remember me, csrf

2015-07-11 Thread Magnus Andersson
Hi again I had the impression that cookies are still the way things are done, and to be honest didn't really consider not using them at all. But it seems I should revise that :) I agree it is still very common and if you wish you can combine different methods. But the newer

[akka-user] Re: [akka-http] akka-http-session project: client-side sessions, remember me, csrf

2015-07-10 Thread Magnus Andersson
Hi You have something similar in concept to what Play Framework uses for sessions today. Nothing wrong with that per say, but writing secure protocols (session serialization and shared trust) is hard for non trivial implementations. *For example:* The security effect of the Hmac SHA-1 that

[akka-user] Akka Streams and Google Cloud Storage

2015-07-09 Thread Magnus Andersson
Hi Looking at the Google Storage java client libraries these are using blocking I/O as far as I can understand. I'm considering investing some time into building a solution that would use akka-streaming directly against the REST API and my own JWT IDP for signing cookies. It is tempting since

[akka-user] Re: problem with Testing persistence actor

2015-07-09 Thread Magnus Andersson
What type of journal/storage are you using? Perhaps you are sharing the default LevelDB journal which is meant for one actor only and having multiple tests trying to access it concurrently? I would recommend using the in memory journal found on community contributions page when running tests.

[akka-user] Re: Piping + gracefull shutdown: is it possible?

2015-05-18 Thread Magnus Andersson
The Lifecycle of the Actor System does manage futures you spawn within your Actors. You have to manage that yourself. Two suggestions: 1. Keep track of running futures in your actor1 in a var. When your actor enters poststop you can await the completion of all referenced futures. You

Re: [akka-user] How do you browse contents of your akka-persistence journals?

2015-04-28 Thread Magnus Andersson
also be an alternative. /Magnus Den tisdag 28 april 2015 kl. 09:51:59 UTC+2 skrev delasoul: There was discusion about this also for the mongo plugin: https://github.com/ironfish/akka-persistence-mongo/issues/88 michael On Monday, 27 April 2015 18:12:50 UTC+2, Magnus Andersson wrote: Hi

[akka-user] How do you browse contents of your akka-persistence journals?

2015-04-25 Thread Magnus Andersson
Hi I'm looking for advice/experiences for browsing and maintaining the journals akka-persistence writes. The events are serialized as binary blobs of whatever serialization mechanism akka is configured to use. The journals are not human readable (it is possible to with some detective work, but

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

2015-04-25 Thread Magnus Andersson
to *akka-http-testkit-scala-experimental_2.11*. Same with the _2.10 artifacts. Sorry that we missed that in the announcement. /Patrik On Fri, Apr 24, 2015 at 11:04 PM, Magnus Andersson magnus.anders...@mollyware.se wrote: By the way These packages seems to be missing: com.typesafe.akka:akka

[akka-user] Re: Akka Persistence on the Query Side: The Conclusion

2015-04-25 Thread Magnus Andersson
per second and linearization is a simpler model. On Saturday, April 25, 2015, Magnus Andersson magnus.anders...@mollyware.se wrote: Hi From your question it looks like you want to build up a persistent view by merging journal streams using multiple persistence ids. That is a common use

Re: [akka-user] Akka Persistence on the Query Side: The Conclusion

2015-04-25 Thread Magnus Andersson
Hi From your question it looks like you want to build up a persistent view by merging journal streams using multiple persistence ids. That is a common use case and my experience is that is is a bit cumbersome, but doable today. However you want strict replay ordering over multiple persistent

[akka-user] Akka HTTP TLS support ETA?

2015-04-24 Thread Magnus Andersson
Hi What is the status for akka-http TLS support, Is there an ETA? I'm developing using akka-http and my integrations to 3rd party services (SendGrid) must go over https. I looked at the source code but could not find anything for TLS support in akka-http. Any workarounds that would be

Re: [akka-user] Akka HTTP TLS support ETA?

2015-04-24 Thread Magnus Andersson
https://twitter.com/hashtag/jaxcon?src=hash award, today merged HTTP client (@sirthias https://twitter.com/sirthias) and WebSockets (@virtualvoid https://twitter.com/virtualvoid) and TLS support—can tomorrow be even better? On Fri, Apr 24, 2015 at 6:34 AM, Magnus Andersson magnus.anders

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

2015-04-24 Thread Magnus Andersson
Very nice work! Excited to get started. I was asking about TLS for akka-http just a few hours ago in another thread. Really hoping you manage to squeeze the high level APIs into 1.0. In the mean time, are there some examples of SSL+HTTP (HTTPS) for client connections? I don't mind using

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

2015-04-24 Thread Magnus Andersson
/ https://repo1.maven.org/maven2/com/typesafe/akka/akka-http-testkit-experimental_2.11/ /Magnus Den fredag 24 april 2015 kl. 22:47:07 UTC+2 skrev Magnus Andersson: Very nice work! Excited to get started. I was asking about TLS for akka-http just a few hours ago in another thread. Really hoping

Re: [akka-user] Re: Akka Persistence on the Query Side: The Conclusion

2015-04-19 Thread Magnus Andersson
OK, then at least I know that much. :) I'll be staying tuned then for when things are picked up again. Thanks. /Magnus 2015-04-17 16:14 GMT+02:00 Patrik Nordwall patrik.nordw...@gmail.com: On Thu, Apr 16, 2015 at 10:32 AM, Magnus Andersson magnus.anders...@mollyware.se wrote: Hi Sorry

[akka-user] Re: Akka-stream D3 activity visualizer

2015-04-18 Thread Magnus Andersson
Cool! A tool that would allow to instrument arbitrary flows or actor systems and then visualize them for monitoring during dev, test or even in production would be very attractive! Does anyone know of products like this available today for the Akka ecosystem? /Magnus Den tisdag 14 april 2015

[akka-user] Re: Akka Persistence on the Query Side: The Conclusion

2015-04-16 Thread Magnus Andersson
Hi Sorry for being late to the party. I hope you don't mind a question around the PersistentView part: The way I read it the default interaction would be the following: case class QueryByPersistenceId(id: String, fromSeqNr: Long, toSeqNr: Long) case class EventStreamOffer(metadata:

[akka-user] ActorProcessor not serializable

2015-04-02 Thread Magnus Andersson
Hi I'm experimenting with serializers and therefore have the setting akka.actor.serialize-messages = on right now. This produces the following error when running: service-idp [ERROR] [04/02/2015 23:37:38.487] [main] [akka://ApoyoCluster/user/$a/flow-1-1-map] swallowing exception during

Re: [akka-user] [Akka Http 1.0-M4] startHandlingWith / starting server with routes

2015-03-22 Thread Magnus Andersson
Oops copy paste error. Here is the gist for the shim, in case it is useful for anyone else: https://gist.github.com/magnusart/5dfb824eb66e847d1f84 Den söndag 22 mars 2015 kl. 13:40:18 UTC+1 skrev Magnus Andersson: Hi This issue really bit me, I was setting up an new akka-http project

Re: [akka-user] Akka HTTP outgoing connections always initialized in GraphFlows

2014-12-24 Thread Magnus Andersson
skrev drewhk: Hi Magnus, On Wed, Dec 24, 2014 at 1:55 AM, Magnus Andersson magnus.a...@mollyware.se javascript: wrote: Hi I am building a simple reverse proxy as an exercise to understand Akka Streams. I have read the new docs but could not find an answer. I'm using FlexiRoute

[akka-user] Akka HTTP outgoing connections always initialized in GraphFlows

2014-12-23 Thread Magnus Andersson
Hi I am building a simple reverse proxy as an exercise to understand Akka Streams. I have read the new docs but could not find an answer. I'm using FlexiRoute as recommended in an earlier thread to determine when my Akka HTTP service should proxy to the remote service and when not to. But

Re: [akka-user] Flatmap for Flows

2014-12-09 Thread Magnus Andersson
. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. Den måndagen den 8:e december 2014 kl. 09:16:30 UTC+1 skrev Magnus Andersson: Hi Thanks guys. I actually noticed flexiroute a bit after I had submitted my

Re: [akka-user] Flatmap for Flows

2014-12-08 Thread Magnus Andersson
Hi Thanks guys. I actually noticed flexiroute a bit after I had submitted my post, but did not make a deep dive. Will definitely have another look. Thanks for the clarification on flatten. Magnus -- Read the docs: http://akka.io/docs/ Check the FAQ:

Re: [akka-user] Supervision / error handling for Akka Streams

2014-12-08 Thread Magnus Andersson
Hi Roland Nice, looking forwards to when this shows up! Magnus -- 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

[akka-user] Flatmap for Flows

2014-12-06 Thread Magnus Andersson
Hi I have a flow that I want to conditionally branch off to either one of two other flows. Basically I'm looking to flatMap that shit, but how do I do this in the context of Akka streams? In my current attempt the types will not line up in the flatten step, I get the compile error: