[akka-user] Testing custom FlexiRoute

2015-08-20 Thread Ivan Baisi
I'm trying to test a FlexiRoute I've developed that dpeending on the type of element it receives, it routes it either the keep alive signal or the gnip activity to different flows. Here's the approach I'm trying: class ActivityFlexiRouterSpec extends FlatSpec with GivenWhenThen{ implicit val

Re: [akka-user] Event sourcing backend/plugin with scalable pub/sub

2015-08-20 Thread Konrad Malawski
I'm tempted to write a service that would use Kafka and Cassandra as backends and expose subscriptions per entity. Not sure yet if it's doable at scale. An exercise left for the ambitious reader one might say ;-) Capability wise definitely makes sense to me and we've seen such setups in the

Re: [akka-user] [akka-streams] Http source design question?

2015-08-20 Thread Konrad Malawski
Hi John, good observation, however this has not shown up in our initial benchmarking as a bottle-neck so far AFAIR. We're taking a systematic aproach and first improving the perf of the biggest bang for the buck elements of Akka Http. Currently this means we're focusing on fusing and need to

[akka-user] [akka-streams] How to share extensions?

2015-08-20 Thread Juan José Vázquez Delgado
Hi all, In my development shop we're currently having to develop or expand some Akka Streams features in the form of sources, flows and sinks. Some of this building blocks could be shared, for instance a source that deals with zipped files containing other zipped files, etc. However, we don't

[akka-user] How to survive long GC pause

2015-08-20 Thread Ara Tatous
I have a configuration of Akka cluster with 4 nodes. Let's call them Engine and Warehouse. In Engine: *Everything is normal* [DEBUG] [08/20/2015 07:32:25.082] [EngineWarehouseActorSystem-akka.actor.default-dispatcher-80]

[akka-user] Re: akka-http non standard return codes.

2015-08-20 Thread André
Hi Tomasz, I think akka.http.ParserSettings.withCustomStatusCodes is what you're looking for. Its spec is here https://github.com/akka/akka/blob/release-2.3-dev/akka-http-core/src/test/scala/akka/http/impl/engine/parsing/ResponseParserSpec.scala#L60-L69 . HTH André On Thursday, August 20,

Re: [akka-user] Event sourcing backend/plugin with scalable pub/sub

2015-08-20 Thread Leonid Bakaleynik
I'm tempted to write a service that would use Kafka and Cassandra as backends and expose subscriptions per entity. Not sure yet if it's doable at scale. An exercise left for the ambitious reader one might say ;-) ambitious reader with less strict deadlines :-) We'll probably end up

[akka-user] Re: Testing custom FlexiRoute

2015-08-20 Thread Ivan Baisi
If anyone is interested in the solution to this, I managed to find a way of doing it. It's probably not the optimal solution, but here it goes. Comments will be appreciated :) it should route the KeepAliveSignal and the NewActivity to proper flows in { Given(A Flow with an

Re: [akka-user] [akka-streams] Http source design question?

2015-08-20 Thread Johannes Rudolph
Hi john, AFAIU your question was not about existing code in akka-http but how to put a queue before a superpool, right? And no, putting a blocking queue inside of an Iterator is not likely the best solution because it will spend one thread permanently that is blocking in `queue.take` almost

[akka-user] How to implement etop for Akka?

2015-08-20 Thread Eax Melanhovich
Hello. There is a great tool in Erlang world called etop. It shows top N actors and corresponding message queue length. Looks like this: http://eax.me/files/2013/07/etop.png I wonder does anyone know a good way to implement an HTTP endpoint which shows some things similar? Current stack traces

Re: [akka-user] [Akka-Streams] Testing a Partial Flow Graph

2015-08-20 Thread Gabriel Volpe
Hi all, Finally I found the way to do it. It wasn't easy to understand the API for the FlowGraph.closed() http://doc.akka.io/api/akka-stream-and-http-experimental/1.0/index.html#akka.stream.scaladsl.FlowGraph$ function, but taking a deeper look I understood that it needs a *combinedMat*

Re: [akka-user] Implicit value issue for FromRequestUnmarshaller in akka-http with spray-json

2015-08-20 Thread charles adetiloye
@Heiko... please how did you solve it ? On Tuesday, July 28, 2015 at 11:45:19 PM UTC-5, Heiko Seeberger wrote: You need to show the definition of routes. I assume (speculation again) that it’s a method in a different scope which doesn’t take an implicit Materializer (or EC). Heiko --

[akka-user] Re: Acknowledging messages upon work completion?

2015-08-20 Thread Andrew Rollins
Lance, I really appreciate your response, it's well thought out, and the code is a great illustration. I have one question, I'm guessing you probably already considered it so I'd like to hear your thoughts. Using your approach, what's the best way to parallelize work that the handler does? Is

[akka-user] Acknowledging messages upon work completion?

2015-08-20 Thread Patrick McLaren
I don't know how idiomatic this solution is, but I recently achieved something like this by materializing a discrete value, say `Success`, then resolving a `Promise` with this value. If you want to acknowledge a particular message, it might be easier to simply close-over it and `map` your

[akka-user] Serialization Exception in hazelcast 3.5 with Scala

2015-08-20 Thread M.Ahsen Taqi Kazmi
I am using Hazelcast 3.5 with scala i have a case class Abc i am trying to store object of my class in hazelcast from my client but it gives me some serialization exception here is my class @SerialVersionUID(1) case class Abc( id : Int ,name : String , subjectCode :

[akka-user] Serialization Exception in hazelcast 3.5 with Scala

2015-08-20 Thread M.Ahsen Taqi Kazmi
On Thursday, August 20, 2015 at 3:13:52 PM UTC+5, peter veentjer wrote: Do you have the MutableList class definition available on the machine where you are deserializing the object? On Thu, Aug 20, 2015 at 1:07 PM, M.Ahsen Taqi Kazmi ahsen@gmail.com wrote: I am using Hazelcast 3.5

Re: [akka-user] Serialization Exception in hazelcast 3.5 with Scala

2015-08-20 Thread Viktor Klang
How is this related to Akka? On Thu, Aug 20, 2015 at 3:21 AM, M.Ahsen Taqi Kazmi ahsen.ifk...@gmail.com wrote: I am using Hazelcast 3.5 with scala i have a case class Abc i am trying to store object of my class in hazelcast from my client but it gives me some serialization exception here

[akka-user] Re: How to achieve concurrency in akka and handle global state

2015-08-20 Thread Lance Arlaus
Atin- Though it's tough to recommend an approach without knowing your specific requirements, you may want to look into Agents if they fit your use case. Sharing an Agent among Actors is perfectly safe and they provide well-defined semantics for concurrent updates. Reading the current value from

Re: [akka-user] Event sourcing backend/plugin with scalable pub/sub

2015-08-20 Thread Konrad Malawski
I'd write to a primary journal and use the (Akka) query side to populate the other journal. Yes they may be a bit behind, but depending on needs that could be optimised (query side could be pushed to). Have you looked into Akka Persistence Query yet? We implemented something for leveldb this week

Re: [akka-user] [akka-streams] ActorSubscriber to ActorPublisher flow -- how to?

2015-08-20 Thread Alex Shuksto
Well, I want to simply connect them, but I want to connect Sink .actorSubscriber(...) ~ Source.actorPublisher(...), not other way around, like you said. I've got Actor, that enriches HTTP Requests that our server receives. After some enrichment, I need to be able to send request further down for

Re: [akka-user] [akka-streams] ActorSubscriber to ActorPublisher flow -- how to?

2015-08-20 Thread Konrad Malawski
Hello there Alexey, I'm not sure I understand what you want to achieve, is it simply to connect such Sink to the Source? That's simply: Source.actorPublisher(...).to(Sink.actorSubscriber(...)).run() Or do you mean to put another processing stage between them? If so then read about custom

Re: [akka-user] How to implement etop for Akka?

2015-08-20 Thread Konrad Malawski
Hi Eax, I think that re-using an implementation (Kamon for example) for the collection of data is a good first step, you'll want to avoid re-inventing the wheel there (and the horrible pains of weaving instrumentation into the codebase manually ;-)). Perhaps it's possible to re-use Kamon's

[akka-user] [akka-streams] ActorSubscriber to ActorPublisher flow -- how to?

2015-08-20 Thread Alexey Shuksto
Hello there, I could not find answer to this particular question neither in docs nor in this group: Is it possible to wire Sink.actorSubscriber(...) into Source.actorPublisher(...) in one (Partial-) Flow? And by 'wire' I mean to somehow send message from ActorSubscriber, instantiated from

[akka-user] Requester 2.1 released

2015-08-20 Thread Justin du coeur
For those who are interested: I've just cut release 2.1 of the Requester library https://github.com/jducoeur/Requester -- the Actor-friendly version of ask(), which allows you to safely compose requests from one Actor to another in a thread-safe way. Release 2.1 addresses several problems I've

[akka-user] akka-http non standard return codes.

2015-08-20 Thread Tomasz Kogut
Hello, this is my first post here so let me start with a big Hello to everyone in this fantastic community :) As for the question I have a server to which I send request using akka-http. The problem this is a Microsoft IIS that is using rare response code: HTTP/1.1 440 ..Content-Length:

[akka-user] Re: Acknowledging messages upon work completion?

2015-08-20 Thread Lance Arlaus
Andrew- How about using a simple branching flow with a broadcast and zip? The first branch carries the message to the end of the pipeline where the acknowledger receives both the message and the result of processing as a Tuple. It can then decide whether/how to acknowledge the message. The