[akka-user] Re: Java: Closing on context() at anonymous class

2015-06-12 Thread Guido Medina
Hi Roland, I didn't say it but I thought about ThreadLocal problems, or a non-concurrent mutable map under each actor to hold their children *-Option[ActorRef]-* I lack *-for now-* the Scala's concurrency knowledge to go any further, I'm about to learn Scala but a bit busy with something else.

Re: [akka-user] creating akka-cluster

2015-06-12 Thread Roland Kuhn
Hi James, for commercial support please contact Typesafe support (if you already have a subscription) or i...@typesafe.com (if you do not). Regards, Roland > 11 jun 2015 kl. 11:16 skrev leopard.liu2...@gmail.com: > > Hi Endre, > We still have this problem, could you

Re: [akka-user] Java: Closing on context() at anonymous class

2015-06-12 Thread Roland Kuhn
Hi Guido, you’re thinking too complicated :-) What we do in Akka internally needs to be regarded with a spoonful of salt (a.k.a. low-level knowledge of concurrency and Akka’s internal design). The rule is quite simple: never call an Actor’s methods—any of them—from outside of that Actor’s execu

Re: [akka-user] Akka Streams: How do I know when a flow is finished?

2015-06-12 Thread Viktor Klang
On Fri, Jun 12, 2015 at 3:40 PM, Eric Kolotyluk wrote: > Thanks; so my new code is > > logger.info("Create a Source based on a simple Iterable[T]") > val source = Source(1 to 10) > > logger.info("create redundant flow1 because of Akka Streams API design > limitations") > val flow1 = Flow[

Re: [akka-user] Akka Streams: How do I know when a flow is finished?

2015-06-12 Thread Eric Kolotyluk
Thanks; so my new code is logger.info("Create a Source based on a simple Iterable[T]") val source = Source(1 to 10) logger.info("create redundant flow1 because of Akka Streams API design limitations") val flow1 = Flow[Int].map(int => int) logger.info("Create sink1 that can be co

Re: [akka-user] When deployed my system hangs when creating ActorSystem

2015-06-12 Thread Viktor Klang
I suspect you'll have to use the same java command as Eclipse generates when it starts. (and see what is different) On Fri, Jun 12, 2015 at 9:07 AM, Dennis Jönsson wrote: > Yeah I have tried it on several different computers with different OS, its > the same thing. And this works just fine when

[akka-user] Re: akka-http-testkit responseAs cannot unmarshal the body

2015-06-12 Thread yar . ilich
No, I roll my own based on our home-brewn JSON codec (actually just copy-pasted boilerplate from akka source, substituting the codec parts with my own). On Friday, June 12, 2015 at 3:12:30 PM UTC+3, Johannes Rudolph wrote: > > On Thursday, June 11, 2015 at 12:04:28 PM UTC+2, yar@gmail.com wr

Re: [akka-user] When deployed my system hangs when creating ActorSystem

2015-06-12 Thread Dennis Jönsson
Yeah I have tried it on several different computers with different OS, its the same thing. And this works just fine when run from eclipse but deployed it does not work and I get zero indication on why. Den fredag 12 juni 2015 kl. 14:55:54 UTC+2 skrev √: > > I'd test your program on another compu

[akka-user] [akka-user-list] Akka sharding doesn't work for me on 2.4-M1

2015-06-12 Thread matheuslimaufc
Hello, I'm dooing a POC with akka sharding using akka 2.4-M1. But the message sended to sharded actor never is received. I cannot understand it. Can someone help me please? This is my main class: import akka.actor.{ActorSystem, Props} import akka.cluster.sharding.{ClusterSharding, ShardRegion}

Re: [akka-user] When deployed my system hangs when creating ActorSystem

2015-06-12 Thread Viktor Klang
I'd test your program on another computer. On Fri, Jun 12, 2015 at 8:51 AM, Dennis Jönsson wrote: > I cant get jconsole to work. I run jconsole but it just tells me its > an invalid PID. > > > > Den fredag 12 juni 2015 kl. 14:24:11 UTC+2 skrev √: >> >> What does JConsole say the threads are stu

Re: [akka-user] When deployed my system hangs when creating ActorSystem

2015-06-12 Thread Dennis Jönsson
I cant get jconsole to work. I run jconsole but it just tells me its an invalid PID. Den fredag 12 juni 2015 kl. 14:24:11 UTC+2 skrev √: > > What does JConsole say the threads are stuck on? > > On Fri, Jun 12, 2015 at 4:04 AM, Dennis Jönsson > wrote: > >> Hello, I have been developing a clus

[akka-user] Re: Java/Akka API: Is it really necessary?

2015-06-12 Thread Guido Medina
Hi Roland, Thanks for the response, I guess from Scala/Java perspective you are right, now I think that is arguable from the Akka perspective, I think Akka is in a corner case where you should have the liberty to dictate what's the safe way of using Akka which gives you the license and/or liber

Re: [akka-user] Java/Akka API: Is it really necessary?

2015-06-12 Thread Roland Kuhn
Hi Guido, with Java 8 lambdas and Scala 2.12 we will indeed be able to unify the experience (and API) more, but there are other issues that won't go away, for example the different collection APIs. In terms of Futures the jury is still out on what the Java world will settle on, but the answer w

Re: [akka-user] Re: Akka Contrib Contains no OSGi Metadata...

2015-06-12 Thread Roland Kuhn
Thanks, James! We already have some OSGi tests as part of the dining hakkers sample, it would be great if you could integrate more tests there. Regards, Roland Sent from my iPhone > On 06 Jun 2015, at 17:10, James Carman wrote: > > It was a tad bit more than that, but not much. Had to do a

Re: [akka-user] Re: Too many scan calls when profiling my akka application

2015-06-12 Thread Johannes Rudolph
On Sunday, June 7, 2015 at 1:42:52 PM UTC+2, Akka Team wrote: > > The scan method of FJP will very likely be your top method unless you have > very favorable load patterns for FJP. I wouldn't worry about it, unless you > see a performance problem with your application. > > 4% is indeed not much

Re: [akka-user] When deployed my system hangs when creating ActorSystem

2015-06-12 Thread Viktor Klang
What does JConsole say the threads are stuck on? On Fri, Jun 12, 2015 at 4:04 AM, Dennis Jönsson wrote: > Hello, I have been developing a cluster solution in akka for awhile. It is > working fine together with the old code in my development environment. > But now when its time to deploy the solu

[akka-user] Re: Akka Context Become Messages

2015-06-12 Thread Konstantin Shaposhnikov
M1("hello world") is placed in the actor's mailbox before preStart is called, i.e. the order that messages are processed by the actor: M1("hello world") (not printed in the initial, but changes the state to active), M1("from M1"), M3("from M3") On Friday, 12 June 2015 15:17:47 UTC+8, Joe San

[akka-user] Re: akka-http-testkit responseAs cannot unmarshal the body

2015-06-12 Thread Johannes Rudolph
On Thursday, June 11, 2015 at 12:04:28 PM UTC+2, yar@gmail.com wrote: > > So if the response has content type text/plain, why the heck does the > testkit try to unmarshal it with an application/json unmarshaller and how > to point it in the right direction? > Good question. Do you use one of

[akka-user] Re: akka-http-RC3 can't set the content type

2015-06-12 Thread Johannes Rudolph
On Friday, June 12, 2015 at 12:30:16 AM UTC+2, ke...@aptoma.com wrote: > > I think ContentType is modeled directly on HttpEntity. Try a combination > of the mapResponseEntity-directive and the .withContentType-method on > HttpEntity. > To expand on this: In spray/akka-http some headers are tr

[akka-user] When deployed my system hangs when creating ActorSystem

2015-06-12 Thread Dennis Jönsson
Hello, I have been developing a cluster solution in akka for awhile. It is working fine together with the old code in my development environment. But now when its time to deploy the solution and test it live I run into a strange problem. The program simply stops doing anything when doing ActorS

[akka-user] Re: magnetic magic of akka-http: explanation required

2015-06-12 Thread Sam D
Anton, I think you are looking for http headers of the request? http://spray.io/documentation/1.2.2/spray-routing/header-directives/headerValueByName/ or http://doc.akka.io/api/akka-stream-and-http-experimental/1.0-RC3/index.html#akka.http.scaladsl.server.directives.HeaderDirectives This sho

[akka-user] Akka Context Become Messages

2015-06-12 Thread Joe San
In the following actor definition: class MyActor extends Actor { override def preStart(): Unit = { super.preStart() self ! M1("from M1") } def receive = initial("initial state") def initial(str: String): Receive = { case m1: M1 => self ! M3("fr