Re: [akka-user] Patterns to process futures in receive

2014-10-13 Thread Joheinz
This looks good. I will sit down tomorrow to give it a shot, thanks to everyone! Markus 2014-10-13 19:52 GMT+02:00 Michael Frank : > I think Richard's suggestion is a good one. a simple implementation > might be: > > class SomeActor extends Actor with Stash { > > def doThing: Future[Result]

Re: [akka-user] Pub/Sub performance for app-level wildcard filering

2014-10-13 Thread Behrad
Thank you Martynas, ​​ ​ 2014-10-13 16:30 GMT+03:30 Martynas Mickevičius < martynas.mickevic...@typesafe.com>: > Hi Behrad, > > On Sat, Oct 11, 2014 at 10:12 PM, Behrad Zari wrote: > >> I want to dispatch messages to wildcard registered (can be remote) >> subscribers. I see two possibilities: >>

Re: [akka-user] Patterns to process futures in receive

2014-10-13 Thread Michael Frank
I think Richard's suggestion is a good one. a simple implementation might be: class SomeActor extends Actor with Stash { def doThing: Future[Result] = ??? def waiting = { case Start => doThing pipeTo self// execute doThing, and send the result back to the actor becom

[akka-user] Realtime (as in Electronics) processing in Akka and Garbage Collection's Effect to It

2014-10-13 Thread Adam
There is also an option of trying the Zing JVM from Azul. It's not free, but depending on your case, it might end up being cheaper in the overall, assuming it does what they claim - I've never used it myself, only talked to other people who were using it. Also it's possible for some application

Re: [akka-user] Realtime (as in Electronics) processing in Akka and Garbage Collection's Effect to It

2014-10-13 Thread Alec Zorab
5ms isn't, by most standards, terribly challenging to maintain. I've worked with systems where GC pauses never exceeded 1ms. That said, getting that kind of performance is a fairly specialist skill, so if you don't have people experienced in low latency development on the JVM, it may be better to l

Re: [akka-user] Patterns to process futures in receive

2014-10-13 Thread Richard Rodseth
Let's see what the experts say, but you could put the actor in a "suspended" state using become(). Take a look at the link I provided and see if that makes any sense. On Mon, Oct 13, 2014 at 7:39 AM, Joheinz wrote: > What I had been trying to express (non-native speaker), is that when the > acto

Re: [akka-user] Patterns to process futures in receive

2014-10-13 Thread Joheinz
What I had been trying to express (non-native speaker), is that when the actor processes/creates a future in the receive method, it will very quickly proceed the next message, without a guarantee that the future is completed. What I somehow would like to achieve: avoid Await.result due to its block

Re: [akka-user] Patterns to process futures in receive

2014-10-13 Thread Richard Rodseth
I don't follow your snippet. Receive is a partial function from Any to Unit, so it doesn't return anything. def receive = { case Start => { val futureResult = someFuture someFuture pipeTo sender } } You don't need to add an ask- you can just pipe someFuture to self or the sender. The result will

[akka-user] Patterns to process futures in receive

2014-10-13 Thread Joheinz
Hi *, Let's say I have an actor which receives a message Start and is processing this message asynchrounously. someActor ! start class SomeActor { def receive = { case Start => for { _ <- someFuture } yield () } Because processing of Start happens asynchronous it coul

Re: [akka-user] multiple journals with akka-persistence

2014-10-13 Thread Konrad 'ktoso' Malawski
Hi Jens, No, this is currently not possible. You can only have one journal per actor system, so currently you’d have to have multiple actor systems (or maybe other nodes=acorsystems handling other types of writes). In theory we have prepared a hook for this and could eventually work on it, but

[akka-user] multiple journals with akka-persistence

2014-10-13 Thread Jens Rieks
Hi all, is it possible to use multiple journals / a journal per "group of actors"? For example in a shop system: one journal for customer data and another journal for item data? Thanks in advance, Jens -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >

Re: [akka-user] Pub/Sub performance for app-level wildcard filering

2014-10-13 Thread Martynas Mickevičius
Hi Behrad, On Sat, Oct 11, 2014 at 10:12 PM, Behrad Zari wrote: > I want to dispatch messages to wildcard registered (can be remote) > subscribers. I see two possibilities: > > 1) Can I use remote actors as akka-camel endpoints? + routes using .when > with regex on messages would gimme wildcard

[akka-user] Re: Akka Actors & extrernal Worker threads

2014-10-13 Thread 'chifer' via Akka User List
Thanks, I start looking at PinnedDispatcher On Monday, 13 October 2014 22:31:33 UTC+11, Rafał Krzewski wrote: > > You could put the stream processing logic in an actor and use a > PinnedDispatcher for it. > http://doc.akka.io/docs/akka/2.3.6/scala/dispatchers.html > This way the actor will use a

Re: [akka-user] Re: Akka Actors & extrernal Worker threads

2014-10-13 Thread 'chifer' via Akka User List
Hi Konrad Would really appreciate if you could explain a bit more, I am quite new to akka platform. One problem I have is, once I write the request to the output stream I would start getting responses from downstream system, but I have no understanding downstream system has finished responding

Re: [akka-user] Problem with Akka-streams and IllegalStateExceptions

2014-10-13 Thread Martynas Mickevičius
Hello Carl, you are right. It is still an issue and I closed your reported ticket with the wrong resolution. I have opened a new issue here . Using FanoutPublisher is still a viable workaround. As to your second problem, it has been fixed

Re: [akka-user] Re: Akka Actors & extrernal Worker threads

2014-10-13 Thread Konrad Malawski
Agreed with Rafal, One tip here is that you can provide such dispatcher to a Future by: implicit val dispatcher = system.dispatchers.lookup("blocking") Future { } ​ With having configured such a blocking dispatcher in application.conf -- Cheers, Konrad 'ktoso' Malawski hAkker @ Typesafe

[akka-user] Re: Akka Actors & extrernal Worker threads

2014-10-13 Thread Rafał Krzewski
You could put the stream processing logic in an actor and use a PinnedDispatcher for it. http://doc.akka.io/docs/akka/2.3.6/scala/dispatchers.html This way the actor will use a dedicated thread and will not interfere with message processing by the regular, non-blocking actors. Cheers, Rafał W

[akka-user] Realtime (as in Electronics) processing in Akka and Garbage Collection's Effect to It

2014-10-13 Thread Koray Al
Hello All, I am working on several applications that communicate with several different hardware realtime using Scala and Akka. I entered the Scala world with Odersky's Functional Programming in Scala lecture without any knowledge of Java programming whatsoever. So I am not very good at Java i

[akka-user] Akka Actors & extrernal Worker threads

2014-10-13 Thread 'chifer' via Akka User List
I am using Akka/Play(Java) in an system where an Actor needs to write data to outstream and read from blocking input stream. In my current implementation I am using a java thread which does the actual writing/reading to/from streams, the thread in constructed by the actor passing it a self re

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

2014-10-13 Thread Koray Al
@Giovanni, I also developed a similar application running on Akka+Spray, but I am having problems with the initialization of an HTTP Server. If I run the same application on a PC, it is lightning fast. But on RPi the Binding process takes 5-10 seconds after the application starts. And it take

[akka-user] Why aren't views supposed to read persistent actor's snapshots?

2014-10-13 Thread Krzysztof Ciesielski
Hello, I am not sure how to understand this part of documentation: The viewId must differ from the referenced persistenceId, unless *Snapshots* of a view and its persistent actor shall be shared (which is what applications

[akka-user] REST JAVA: Akka HTTP Vs Play Vs Spring

2014-10-13 Thread Prakhyat Mallikarjun
Team, We want to implement REST with java. Which is the best framework among (AKKA HTTP,Play, Spring) for developing REST layer in JAVA? One problem I could see currently is AKKA HTTP support for java is still pending. -Prakhyat M M -- >> Read the docs: http://akka.io/docs/ >

[akka-user] Akka remoting over IPv6

2014-10-13 Thread sifi mohamed amine
Hello , Trying to to lauch the example in this tutorial : http://alvinalexander.com/scala/scala-akka-actors-ping-pong-simple-example and more importantly configuring it work for Ipv6 , I got this exception . [error] (run-main-0) 451d3fcc-931e-4802-9c77-5b13f45cf3f5akka.remote.RemoteTransport

[akka-user] Creating regular actors and lookup (actorselection) actors with specific role

2014-10-13 Thread Muthukumaran Kothandaraman
As I understand ActorSystem : (is to) Role is *1:MANY* cardinality - this I infer from confg injected into ActorSystem during the startup. Does that mean that I can create multiple actors with multiple roles within same actorsystem ? For instance, can I - start up an ActorSystem - AS1 and -

Re: [akka-user] [akka-stream] : some akka.stream.impl2.FanOut$SubstreamRequestMore messages with Broadcast in go to deadletters

2014-10-13 Thread Xavier Bucchiotty
Thanks for your answer Roland, I'll keep the message logged so. Le vendredi 10 octobre 2014 17:03:41 UTC+2, rkuhn a écrit : > > Yes, these messages are always there and they are harmless for all I can > see, we’ll eventually silence them > . Thanks for