[akka-user] Re: New projects should use Spray.io or Akka-HTTP

2015-01-26 Thread richard
Hi Reid, Thanks for sharing. I'll take the same approach, since I also don't expect much incompatibility. Cheers, Richard On Tuesday, 27 January 2015 07:57:04 UTC+10, Reid Spencer wrote: > > Hi Richard, > > I faced exactly the dilemma you describe in my project. After reviewing > the plans (an

Re: [akka-user] New projects should use Spray.io or Akka-HTTP

2015-01-26 Thread richard
Dear Roland, Thank you very much for the insights, it is very helpful to have that kind of information regarding the development stage, features and timeframes. At this point in time, I'll definitely follow your advice and stick to spray.io. Also looking forward to hear more stories of people'

[akka-user] tcp client server recommendations

2015-01-26 Thread Peter Swift
Hi All, I'm having good fun with akka streams, and I while tinkering with them a few questions have come up. How best to implement length-based tcp framing? With a StatefulStage that defragments the incoming byte strings? How can I just send data from the client to the server without returning

[akka-user] akka http 1.0-M2 thread pegs a CPU core until connection closes on Windows

2015-01-26 Thread huynhjl
Hi, I am trying akka HTTP and seeing odd behavior with a thread keeping a core busy until the client connection closes. That seems to only happen on Windows. A minimized example is there: https://github.com/huynhjl/cpu-peg/blob/0.1/src/main/scala/HttpTest.scala The stack dump of the thread tha

[akka-user] Re: New projects should use Spray.io or Akka-HTTP

2015-01-26 Thread Reid Spencer
Hi Richard, I faced exactly the dilemma you describe in my project. After reviewing the plans (and code) for akka-http and spray.io, I concluded that there would be "enough" similarity for my project to move forward with spray.io and convert to akka-http when it is ready. As my project is new,

Re: [akka-user] Re: Inability to route through a proxy.

2015-01-26 Thread Tim St. Clair
So in digging I found: https://github.com/akka/akka/issues/15007 +Using setups involving Network Address Translation, Load Balancers or Docker +containers violates assumption 1, unless additional steps are taken in the +network configuration to allow symmetric communication between involved sys

[akka-user] Re: TestActorRef with TypedActor

2015-01-26 Thread Wojciech Pituła
Here is simple example: import akka.actor.{TypedActor, ActorSystem, TypedProps} import akka.testkit.CallingThreadDispatcher import org.mockito.Mockito import org.scalatest.{BeforeAndAfterAll, WordSpec} class FooTest extends WordSpec with BeforeAndAfterAll{ trait Foo { def foo():Unit }

[akka-user] java: streaming files with akka-http

2015-01-26 Thread Asaf Shakarzy
Hey, I'd like to stream some files (between 10MB->500MB) (mostly binaries / json / xml) to akka-http server (All written in Java) I've successfully handling objects via RequestVal but no idea how to handle Files, Any details will help! Thanks, Asaf. -- >> Read the docs: http

[akka-user] Re: Addressing paths to cluster peers

2015-01-26 Thread Mark Grey
I got this addressing to work using the path below: ActorPath path = new RootActorPath(mUp.member().address(), > "/").descendant(Arrays.asList("user","orchestrator")); > I'm curious why this would make a difference? Also, where does the "user" section of the path come from and what is it's pur

Re: [akka-user] Acceptable Limits for Actor Creation and Destruction?

2015-01-26 Thread Paul Cleary
Thanks Victor? Is the handshake through messages sent back and forth? On Monday, January 26, 2015 at 12:29:42 PM UTC-5, √ wrote: > > Hi Paul, > > you may want to put the parent on a different dispatcher than the > children, since the creation process is a handshake. (so both parent and > child

Re: [akka-user] Acceptable Limits for Actor Creation and Destruction?

2015-01-26 Thread Viktor Klang
Hi Paul, you may want to put the parent on a different dispatcher than the children, since the creation process is a handshake. (so both parent and child needs CPU time) On Mon, Jan 26, 2015 at 5:49 PM, Paul Cleary wrote: > Victor, > Yes, they are spawned under the same parent (same actual acto

Re: [akka-user] Acceptable Limits for Actor Creation and Destruction?

2015-01-26 Thread Paul Cleary
Victor, Yes, they are spawned under the same parent (same actual actor ref). The parent is "long-lived", i.e. intended to hang around for the lifetime of the process. On Monday, January 26, 2015 at 11:14:40 AM UTC-5, √ wrote: > > Hi Paul, > > There's also the question if they are spawned under

Re: [akka-user] New projects should use Spray.io or Akka-HTTP

2015-01-26 Thread Roland Kuhn
Hi Richard, > 22 jan 2015 kl. 06:14 skrev rich...@jesims.com.au: > > Hi all, > > It's an exciting time for Akka with the imminent release of akka-http (as > announced in 2013 in this thread > >

[akka-user] Recovering from the Quarantined state

2015-01-26 Thread Mark Kegel
We are using akka in a clustered configuration at work. Its a very simple cluster with just three node types: an admin node, "live" nodes, and "preview" nodes. The admin node will manage nodes of the other two types, and ask for things like status and uptime. Every so often one of the live/prev

Re: [akka-user] Acceptable Limits for Actor Creation and Destruction?

2015-01-26 Thread Viktor Klang
Hi Paul, There's also the question if they are spawned under the same parent or not. On Mon, Jan 26, 2015 at 5:07 PM, Paul Cleary wrote: > Thank your for the reply, > > These machines are typically 4 core / 8 GB machines with only our app > running. The only JVM settings are CMS and Parallel Y

Re: [akka-user] Acceptable Limits for Actor Creation and Destruction?

2015-01-26 Thread Paul Cleary
Thank your for the reply, These machines are typically 4 core / 8 GB machines with only our app running. The only JVM settings are CMS and Parallel Young Generation. Also Java 1.7, Scala 2.11, Play 2.3. We have not benchmarked the actors themselves, as there are several actors in the system.

[akka-user] Re: akka-http: (micro)service example

2015-01-26 Thread Łukasz Sowa
@Jacek: Thanks for PR - merged! :) @Johh: I believe that's not desirable to mock Http's outgoing connection but rather it's Flow. I pushed out a branch with tests, with outgoing connection's flow mocked, check it out: https://github.com/theiterators/akka-http-microservice/tree/tests Ok, I think

Re: [akka-user] Re: Inability to route through a proxy.

2015-01-26 Thread Björn Antonsson
Hi Tim, So this applies to akka 2.3.x where there is no support for NAT configuration. I don't think that the containers need to run on the same host if you configure the container with the --net=host flag, since they will effectively bind to the host network interface. If you want container A

[akka-user] Akka Logging with %file and %line substitutions

2015-01-26 Thread Reid Spencer
Hello, I have my akka-slf4j based logging working just fine, except for one aspect. In Logback you can define a PatternLayout that includes the %file and %line substitutions, like this: %X{akkaTimestamp} %-5level [%X{sourceThread}:%logger{30}:%X{akkaSource}:%file:%line]%n %ms

Re: [akka-user] Acceptable Limits for Actor Creation and Destruction?

2015-01-26 Thread Björn Antonsson
Hi Paul, There are a lot of moving parts in creating an actor, and the associated costs. What is a lot of garbage? It's a completely subjective question. Also, depending on the size of your machine, 5 actors per second might be easy, or not possible. Have you tried to benchmark the creatio

[akka-user] Akka cluster unreachable

2015-01-26 Thread Idar Borlaug
Hi I have a 2 node akka cluster, which looses connection once every two days. Often when the server i almost idle. We are still on akka 2.2.4, using oracle java 1.8_25. Its a virtual servers running on vmware esx. The application have been running fine for 3 years, but started with this a few week

[akka-user] TCP Stream and Request Strategy

2015-01-26 Thread Thomas Zimmer
Hi, i have a question regarding TCP Streams and request strategies. Lets say i have a TCPStream build upon the ReactiveStream Framework. I have a Subscriber to consume the incoming data as a Sink using the ActorSubscriber. Now my problem is that i have a binary network protocol that looks like

Re: [akka-user] ShardRegionTerminated with LocalRef Issue

2015-01-26 Thread Patrik Nordwall
On Mon, Jan 26, 2015 at 10:57 AM, Saparbek Smailov < saparbek.smai...@gmail.com> wrote: > Hello Patrik, > > Just for your information, one of my friends asked the same question: > https://github.com/akka/akka/pull/2117# (Akrome) > > Thank you for your time and consideration! > Thanks. I will take

Re: [akka-user] ShardRegionTerminated with LocalRef Issue

2015-01-26 Thread Saparbek Smailov
Hello Patrik, Just for your information, one of my friends asked the same question: https://github.com/akka/akka/pull/2117# (Akrome) Thank you for your time and consideration! On Monday, January 26, 2015 at 9:54:33 AM UTC, Saparbek Smailov wrote: > > 2.3.4 > > On Monday, January 26, 2015 at

Re: [akka-user] ShardRegionTerminated with LocalRef Issue

2015-01-26 Thread Saparbek Smailov
2.3.4 On Monday, January 26, 2015 at 9:36:17 AM UTC, Patrik Nordwall wrote: > > What version of Akka do you use? > /Patrik > > On Mon, Jan 26, 2015 at 10:23 AM, Saparbek Smailov > wrote: > >> Hello everyone, >> >> In our project we use Cluster Sharding with Cluster Singletons. Our >> Cluster is

Re: [akka-user] Cluster unreachable and a lot of cluster connections

2015-01-26 Thread Caoyuan
On Fri, Jan 23, 2015 at 9:09 PM, Caoyuan wrote: > > > On Fri, Jan 23, 2015 at 7:06 PM, Patrik Nordwall < > patrik.nordw...@gmail.com> wrote: > >> >> >> On Fri, Jan 23, 2015 at 10:12 AM, Caoyuan wrote: >> >>> As per our experience on spray-socketio project, too many remote actor >>> watching will

Re: [akka-user] Cluster unreachable and a lot of cluster connections

2015-01-26 Thread Johannes Berg
Yes, I can see the Deathwatching probably need to be this way for the general case, but in my particular case I would be fine with relaxed consistency in this (in my app logic it's not the end of the days if the deathwatch fails to trigger) and certainly preferrably to loosing a node when it's

Re: [akka-user] ShardRegionTerminated with LocalRef Issue

2015-01-26 Thread Patrik Nordwall
What version of Akka do you use? /Patrik On Mon, Jan 26, 2015 at 10:23 AM, Saparbek Smailov < saparbek.smai...@gmail.com> wrote: > Hello everyone, > > In our project we use Cluster Sharding with Cluster Singletons. Our > Cluster is set up on AWS Elastic Beanstalk. > The set up works perfectly unt

Re: [akka-user] Akka HTTP - back-pressure on incoming connections

2015-01-26 Thread Roland Kuhn
Hi Jean, calling “connection handleWith myFlow” is a really quick operation, hence you see no back-pressure kicking in. The feature you are after is currently rather awkward to implement, you’d have to replace handleWith with manually joining and running the connection’s Flow in order to obtain

[akka-user] ShardRegionTerminated with LocalRef Issue

2015-01-26 Thread Saparbek Smailov
Hello everyone, In our project we use Cluster Sharding with Cluster Singletons. Our Cluster is set up on AWS Elastic Beanstalk. The set up works perfectly until you start removing instances from the cluster. The issue arises when a shard is recreated using Akka persistence: during the recovery

Re: [akka-user] TCP Outgoing Connection Lifecycle

2015-01-26 Thread Endre Varga
Hi Cole, On Fri, Jan 23, 2015 at 11:11 PM, wrote: > Hey Endre, > > Thanks for the response but I don't quite understand how to implement what > you're suggesting. > I didn't suggest anything, I just gave an example how stream completion and cancellation work, using Fold as the example operati

Re: [akka-user] Akka HTTP - back-pressure on incoming connections

2015-01-26 Thread Jean Rossier
I would have expected some failed requests. In my test, I'm sending 200 concurrent requests (the processing of each request takes circa 200ms), Since I have a buffer of 5, I thought that some requests would have been dropped and my client would have received some errors. But, in my test, all req

Re: [akka-user] Akka HTTP - back-pressure on incoming connections

2015-01-26 Thread Endre Varga
Hi Jean, On Mon, Jan 26, 2015 at 9:03 AM, Jean Rossier wrote: > Hello, > > I'm wondering if there is a way to use back-pressure mechanism on incoming > connections with Akka HTTP ? > The documentation mentions clearly that there is no back-pressure applied > to the connections Source if we use t

[akka-user] Akka HTTP - back-pressure on incoming connections

2015-01-26 Thread Jean Rossier
Hello, I'm wondering if there is a way to use back-pressure mechanism on incoming connections with Akka HTTP ? The documentation mentions clearly that there is no back-pressure applied to the connections Source if we use the startHandlingWith* functions (http://doc.akka.io/api/akka-stream-and-