Re: [akka-user] Can't build Akka from source

2015-04-02 Thread Konrad Malawski
Hi Leszek,
Are you sure you have the sphinx-build command available? It’s not complaining 
about the directory, it is complaining about the lack of sphinx. 

Have you installed Sphinx?
Here’s how: http://doc.akka.io/docs/akka/snapshot/dev/documentation.html

-- 
Cheers,
Konrad 'ktoso’ Malawski
Akka @ Typesafe

On 2 April 2015 at 09:18:26, Leszek Gruchała (leszekgruch...@gmail.com) wrote:

Hi,
I am trying to build Akka from master branch.
I do
sbt -Dakka.scaladoc.diagrams=false publish-local
and as result I get

[error] (akka-docs/sphinx:generateEpub) java.io.IOException: Cannot run program 
sphinx-build (in directory 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed): error=2, No 
such file or directory
[error] (akka-docs/sphinx:generatePdf) java.io.IOException: Cannot run program 
sphinx-build (in directory 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed): error=2, No 
such file or directory
[error] (akka-docs/sphinx:generateHtml) java.io.IOException: Cannot run program 
sphinx-build (in directory 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed): error=2, No 
such file or directory

But this is not true

08:52 $ cd /Users/lgr/projects/opensource/akka/akka-docs/
08:52 $ ls
_sphinx build.sbt rst rst_preprocessed target


last akka-docs/sphinx:generateEpub

[info] Generating Sphinx epub documentation...
[debug] Command: sphinx-build -a -E -b epub -d 
/Users/lgr/projects/opensource/akka/akka-docs/target/sphinx/doctrees/epub 
-Dversion=2.4-SNAPSHOT -Drelease=2.4-SNAPSHOT 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed 
/Users/lgr/projects/opensource/akka/akka-docs/target/sphinx/epub
[debug] Environment: Map(PYTHONPATH - 
/Users/lgr/projects/opensource/akka/akka-docs/target/sphinx/packages/pygments)
java.io.IOException: Cannot run program sphinx-build (in directory 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed): error=2, No 
such file or directory
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
 at sbt.SimpleProcessBuilder.run(ProcessImpl.scala:349)
 at sbt.AbstractProcessBuilder.run(ProcessImpl.scala:128)
 at 
sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply(ProcessImpl.scala:159)
 at 
sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply(ProcessImpl.scala:159)
 at 
com.typesafe.sbt.sphinx.CommandLineSphinxRunner$$anon$1.buffer(SphinxRunner.scala:159)
 at sbt.AbstractProcessBuilder.runBuffered(ProcessImpl.scala:159)
 at sbt.AbstractProcessBuilder.$bang(ProcessImpl.scala:156)
 at 
com.typesafe.sbt.sphinx.CommandLineSphinxRunner$$anonfun$1.apply(SphinxRunner.scala:119)
 at 
com.typesafe.sbt.sphinx.CommandLineSphinxRunner$$anonfun$1.apply(SphinxRunner.scala:104)
 at 
sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:200)
 at 
sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.apply(Tracked.scala:196)
 at sbt.Difference.apply(Tracked.scala:175)
 at sbt.Difference.apply(Tracked.scala:157)
 at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:196)
 at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:195)
 at sbt.Difference.apply(Tracked.scala:175)
 at sbt.Difference.apply(Tracked.scala:151)
 at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:195)
 at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:193)
 at 
com.typesafe.sbt.sphinx.CommandLineSphinxRunner.sphinxBuild(SphinxRunner.scala:126)
 at 
com.typesafe.sbt.sphinx.CommandLineSphinxRunner.generateEpub(SphinxRunner.scala:67)
 at 
com.typesafe.sbt.site.SphinxSupport$$anonfun$generateEpubTask$1.apply(SphinxSupport.scala:88)
 at 
com.typesafe.sbt.site.SphinxSupport$$anonfun$generateEpubTask$1.apply(SphinxSupport.scala:88)
 at scala.Function5$$anonfun$tupled$1.apply(Function5.scala:35)
 at scala.Function5$$anonfun$tupled$1.apply(Function5.scala:34)
 at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
 at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
 at sbt.std.Transform$$anon$4.work(System.scala:63)
 at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
 at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
 at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
 at sbt.Execute.work(Execute.scala:235)
 at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
 at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
 at 
sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
 at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)


[akka-user] Can't build Akka from source

2015-04-02 Thread Leszek Gruchała
Hi,
I am trying to build Akka from master branch.
I do
sbt -Dakka.scaladoc.diagrams=false publish-local
and as result I get

[error] (akka-docs/sphinx:generateEpub) java.io.IOException: Cannot run 
program sphinx-build (in directory 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed): error=2, 
No such file or directory
[error] (akka-docs/sphinx:generatePdf) java.io.IOException: Cannot run 
program sphinx-build (in directory 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed): error=2, 
No such file or directory
[error] (akka-docs/sphinx:generateHtml) java.io.IOException: Cannot run 
program sphinx-build (in directory 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed): error=2, 
No such file or directory

But this is not true

08:52 $ cd /Users/lgr/projects/opensource/akka/akka-docs/
08:52 $ ls
_sphinx build.sbt rst rst_preprocessed target


last akka-docs/sphinx:generateEpub

[info] Generating Sphinx epub documentation...
[debug] Command: sphinx-build -a -E -b epub -d /Users/lgr/projects/
opensource/akka/akka-docs/target/sphinx/doctrees/epub -Dversion=2.4-SNAPSHOT 
-Drelease=2.4-SNAPSHOT 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed 
/Users/lgr/projects/opensource/akka/akka-docs/target/sphinx/epub
[debug] Environment: Map(PYTHONPATH - /Users/lgr/projects/opensource/akka/
akka-docs/target/sphinx/packages/pygments)
java.io.IOException: Cannot run program sphinx-build (in directory 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed): error=2, 
No such file or directory
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
 at sbt.SimpleProcessBuilder.run(ProcessImpl.scala:349)
 at sbt.AbstractProcessBuilder.run(ProcessImpl.scala:128)
 at sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply(ProcessImpl.
scala:159)
 at sbt.AbstractProcessBuilder$$anonfun$runBuffered$1.apply(ProcessImpl.
scala:159)
 at com.typesafe.sbt.sphinx.CommandLineSphinxRunner$$anon$1.buffer(
SphinxRunner.scala:159)
 at sbt.AbstractProcessBuilder.runBuffered(ProcessImpl.scala:159)
 at sbt.AbstractProcessBuilder.$bang(ProcessImpl.scala:156)
 at com.typesafe.sbt.sphinx.CommandLineSphinxRunner$$anonfun$1.apply(
SphinxRunner.scala:119)
 at com.typesafe.sbt.sphinx.CommandLineSphinxRunner$$anonfun$1.apply(
SphinxRunner.scala:104)
 at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.
apply(Tracked.scala:200)
 at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3$$anonfun$apply$4.
apply(Tracked.scala:196)
 at sbt.Difference.apply(Tracked.scala:175)
 at sbt.Difference.apply(Tracked.scala:157)
 at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:
196)
 at sbt.FileFunction$$anonfun$cached$2$$anonfun$apply$3.apply(Tracked.scala:
195)
 at sbt.Difference.apply(Tracked.scala:175)
 at sbt.Difference.apply(Tracked.scala:151)
 at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:195)
 at sbt.FileFunction$$anonfun$cached$2.apply(Tracked.scala:193)
 at com.typesafe.sbt.sphinx.CommandLineSphinxRunner.sphinxBuild(SphinxRunner
.scala:126)
 at com.typesafe.sbt.sphinx.CommandLineSphinxRunner.generateEpub(
SphinxRunner.scala:67)
 at com.typesafe.sbt.site.SphinxSupport$$anonfun$generateEpubTask$1.apply(
SphinxSupport.scala:88)
 at com.typesafe.sbt.site.SphinxSupport$$anonfun$generateEpubTask$1.apply(
SphinxSupport.scala:88)
 at scala.Function5$$anonfun$tupled$1.apply(Function5.scala:35)
 at scala.Function5$$anonfun$tupled$1.apply(Function5.scala:34)
 at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
 at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
 at sbt.std.Transform$$anon$4.work(System.scala:63)
 at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
 at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
 at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
 at sbt.Execute.work(Execute.scala:235)
 at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
 at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
 at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(
ConcurrentRestrictions.scala:159)
 at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:617)
 at java.lang.Thread.run(Thread.java:745)

Thanks for help,
Leszek


-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, 

Re: [akka-user] Can't build Akka from source

2015-04-02 Thread Leszek Gruchała
Thanks a lot. It would be helpful to have reference to this documentation on 
Building Akka page :-)

I got another problem with only PDF generation, here’s the end of the error:

[debug] LaTeX Warning: Hyper reference `common/cluster:niy' on page 259 
undefined on in
[debug] put line 18510.
[debug]
[debug] ! Undefined control sequence.
[debug] argument \node@class@name
[debug]
[debug] l.18517 ...ection{Partitioning \DUspan{}{{[}*{]}}}
[debug]
[debug] ?
[debug] ! Emergency stop.
[debug] argument \node@class@name
[debug]
[debug] l.18517 ...ection{Partitioning \DUspan{}{{[}*{]}}}
[debug]
[debug] !  == Fatal error occurred, no output PDF file produced!
[debug] Transcript written on AkkaJava.log.
[debug] make: *** [AkkaJava.pdf] Error 1
java.lang.RuntimeException: Sphinx pdf generation failed.  See debug output for 
details.
at scala.sys.package$.error(package.scala:27)
at 
com.typesafe.sbt.sphinx.CommandLineSphinxRunner.makePdf(SphinxRunner.scala:146)
at 
com.typesafe.sbt.sphinx.CommandLineSphinxRunner.generatePdf(SphinxRunner.scala:63)
at 
com.typesafe.sbt.site.SphinxSupport$$anonfun$generatePdfTask$1.apply(SphinxSupport.scala:84)
at 
com.typesafe.sbt.site.SphinxSupport$$anonfun$generatePdfTask$1.apply(SphinxSupport.scala:84)
at scala.Function5$$anonfun$tupled$1.apply(Function5.scala:35)
at scala.Function5$$anonfun$tupled$1.apply(Function5.scala:34)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at 
sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at 
sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:235)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
at 
sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (akka-docs/sphinx:generatePdf) Sphinx pdf generation failed.  See debug 
output for details.

Is it possible to disable documentation generation?



-- 
Leszek Gruchała
gruchala.eu

On 2 Apr 2015 at 09:20:55, Konrad Malawski (konrad.malaw...@typesafe.com) wrote:

Hi Leszek,
Are you sure you have the sphinx-build command available? It’s not complaining 
about the directory, it is complaining about the lack of sphinx. 

Have you installed Sphinx?
Here’s how: http://doc.akka.io/docs/akka/snapshot/dev/documentation.html

-- 
Cheers,
Konrad 'ktoso’ Malawski
Akka @ Typesafe

On 2 April 2015 at 09:18:26, Leszek Gruchała (leszekgruch...@gmail.com) wrote:

Hi,
I am trying to build Akka from master branch.
I do
sbt -Dakka.scaladoc.diagrams=false publish-local
and as result I get

[error] (akka-docs/sphinx:generateEpub) java.io.IOException: Cannot run program 
sphinx-build (in directory 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed): error=2, No 
such file or directory
[error] (akka-docs/sphinx:generatePdf) java.io.IOException: Cannot run program 
sphinx-build (in directory 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed): error=2, No 
such file or directory
[error] (akka-docs/sphinx:generateHtml) java.io.IOException: Cannot run program 
sphinx-build (in directory 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed): error=2, No 
such file or directory

But this is not true

08:52 $ cd /Users/lgr/projects/opensource/akka/akka-docs/
08:52 $ ls
_sphinx build.sbt rst rst_preprocessed target


last akka-docs/sphinx:generateEpub

[info] Generating Sphinx epub documentation...
[debug] Command: sphinx-build -a -E -b epub -d 
/Users/lgr/projects/opensource/akka/akka-docs/target/sphinx/doctrees/epub 
-Dversion=2.4-SNAPSHOT -Drelease=2.4-SNAPSHOT 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed 
/Users/lgr/projects/opensource/akka/akka-docs/target/sphinx/epub
[debug] Environment: Map(PYTHONPATH - 
/Users/lgr/projects/opensource/akka/akka-docs/target/sphinx/packages/pygments)
java.io.IOException: Cannot run program sphinx-build (in directory 
/Users/lgr/projects/opensource/akka/akka-docs/rst_preprocessed): error=2, No 
such file or directory
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
 at 

Re: [akka-user] Akka io udp broadcast to subnet

2015-04-02 Thread Viktor Klang
Hi,

255.255.255.255 has been deprecated/discouraged for many many years.

Related:
http://stackoverflow.com/questions/7481332/udp-broadcast-on-java-doesnt-work

On Thu, Apr 2, 2015 at 10:27 PM, saumitra.srivast...@gmail.com wrote:

 I am trying to use akka-io to broadcast a UDP packet to all the nodes in
 my subnet? I am following up the scala example from
 http://doc.akka.io/docs/akka/snapshot/scala/io-udp.html

 Its not working if I am using 255.255.255.255. Although its working fine
 when I give direct IP - 10.172.137.125

 I tried the same task using java.net.DatagramSocket and it is working
 perfectly, i.e. i can receive the broadcast message on all subnet nodes,
 when sending using 255.255.255.255. So that means that there are no
 networking issues between machines. But if possible I want to do it using
 akka-io itself?

 I am new to network programming. Any ideas what I might be doing wrong?

 Let me know what more info can I provide to identify the issue.



  --
  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 because you are subscribed to the Google Groups
 Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




-- 
Cheers,
√

-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Akka Stream is not running (without compiler error)

2015-04-02 Thread Viktor Klang
I suspect your problem is that your test exits before the stream has a
chance to run.

On Thu, Apr 2, 2015 at 11:56 PM, Viktor Klang viktor.kl...@gmail.com
wrote:

 Works on my machine:

 scala import scala.collection.mutable.ArrayBuffer
 import scala.collection.mutable.ArrayBuffer

 scala import akka.stream._
 import akka.stream._

 scala import akka.stream.scaladsl._
 import akka.stream.scaladsl._

 scala implicit val sys = ActorSystem(repl)
 sys: akka.actor.ActorSystem = akka://repl

 scala import sys.dispatcher
 import sys.dispatcher

 scala implicit val fm = ActorFlowMaterializer()
 fm: akka.stream.ActorFlowMaterializer =
 ActorFlowMaterializerImpl(ActorFlowMaterializerSettings(4,16,,function1,StreamSubscriptionTimeoutSettings(CancelTermination,5000
 milliseconds),false,1000,Optimizations(false,false,false,false)),akka.dispatch.Dispatchers@3dff9cf6
 ,Actor[akka://repl/user/$b#575469743],1,flow,Optimizations(false,false,false,false))

 scala val source: Source[Int, Unit] = Source(1 to 10)
 source: akka.stream.scaladsl.Source[Int,Unit] =
 akka.stream.scaladsl.Source@4d8aca2f

 scala val printSink = Sink.foreach[Int](println)
 printSink: akka.stream.scaladsl.Sink[Int,scala.concurrent.Future[Unit]] =
 akka.stream.scaladsl.Sink@7d6cac88


 scala val actionStream: ArrayBuffer[(Int) = Int] =
 ArrayBuffer.empty[(Int) = Int]
 actionStream: scala.collection.mutable.ArrayBuffer[Int = Int] =
 ArrayBuffer()

 scala def add(a: Int) = a + 1
 add: (a: Int)Int

 scala

 scala def exec(): Unit =
  |   actionStream.drop(1).foldLeft(source)(
  | (source, action) = source.via(Flow[Int].mapAsync(e =
 Future(action(e
  |   ).runWith(printSink)
 exec: ()Unit

 scala

 scala actionStream += add
 res6: actionStream.type = ArrayBuffer(function1)

 scala actionStream += add
 res7: actionStream.type = ArrayBuffer(function1, function1)

 scala exec()

 scala 2
 3
 4
 5
 6
 7
 8
 9
 10
 11

 On Thu, Apr 2, 2015 at 11:29 PM, Allen Nie aiming...@gmail.com wrote:

 I came up a much simplified program to test, and I still get nothing:

 val source: Source[Int, Unit] = Source(1 to 10)
 val printSink = Sink.foreach[Int](e = println(e))

 val actionStream: ArrayBuffer[(Int) = Int] = ArrayBuffer.empty[(Int) = Int]

 def add(a: Int) = a + 1

 def exec(): Unit = {
   val sourceReady = actionStream.drop(1).foldLeft(source)
   {(source, action) =
 source.via(Flow[Int].mapAsync(e = Future(action.apply(e
   }

   sourceReady

   sourceReady.runWith(printSink)
 }

 parallel test should work in {
   actionStream += ((a: Int) = add(a))
   actionStream += ((a: Int) = add(a))

   exec()
 }

  --
  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 because you are subscribed to the Google Groups
 Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




 --
 Cheers,
 √




-- 
Cheers,
√

-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Akka Stream is not running (without compiler error)

2015-04-02 Thread Allen Nie
Thank you Viktor!! I tried to switch from test to App, and it works. Also 
it works with Map instead of MapAsync.

Does this mean I can not test this kind of things anymore? Is there 
anything I can do to still make the test case work??

Sincerely,
Allen

On Thursday, April 2, 2015 at 6:04:24 PM UTC-4, √ wrote:

 I suspect your problem is that your test exits before the stream has a 
 chance to run.

 On Thu, Apr 2, 2015 at 11:56 PM, Viktor Klang viktor...@gmail.com 
 javascript: wrote:

 Works on my machine:

 scala import scala.collection.mutable.ArrayBuffer
 import scala.collection.mutable.ArrayBuffer

 scala import akka.stream._
 import akka.stream._

 scala import akka.stream.scaladsl._
 import akka.stream.scaladsl._

 scala implicit val sys = ActorSystem(repl)
 sys: akka.actor.ActorSystem = akka://repl

 scala import sys.dispatcher
 import sys.dispatcher

 scala implicit val fm = ActorFlowMaterializer()
 fm: akka.stream.ActorFlowMaterializer = 
 ActorFlowMaterializerImpl(ActorFlowMaterializerSettings(4,16,,function1,StreamSubscriptionTimeoutSettings(CancelTermination,5000
  
 milliseconds),false,1000,Optimizations(false,false,false,false)),akka.dispatch.Dispatchers@3dff9cf6,Actor[akka://repl/user/$b#575469743],1,flow,Optimizations(false,false,false,false))

 scala val source: Source[Int, Unit] = Source(1 to 10)
 source: akka.stream.scaladsl.Source[Int,Unit] = 
 akka.stream.scaladsl.Source@4d8aca2f

 scala val printSink = Sink.foreach[Int](println)
 printSink: akka.stream.scaladsl.Sink[Int,scala.concurrent.Future[Unit]] = 
 akka.stream.scaladsl.Sink@7d6cac88


 scala val actionStream: ArrayBuffer[(Int) = Int] = 
 ArrayBuffer.empty[(Int) = Int]
 actionStream: scala.collection.mutable.ArrayBuffer[Int = Int] = 
 ArrayBuffer()

 scala def add(a: Int) = a + 1
 add: (a: Int)Int

 scala

 scala def exec(): Unit =
  |   actionStream.drop(1).foldLeft(source)(
  | (source, action) = source.via(Flow[Int].mapAsync(e = 
 Future(action(e
  |   ).runWith(printSink)
 exec: ()Unit

 scala

 scala actionStream += add
 res6: actionStream.type = ArrayBuffer(function1)

 scala actionStream += add
 res7: actionStream.type = ArrayBuffer(function1, function1)

 scala exec()

 scala 2
 3
 4
 5
 6
 7
 8
 9
 10
 11

 On Thu, Apr 2, 2015 at 11:29 PM, Allen Nie aimi...@gmail.com 
 javascript: wrote:

 I came up a much simplified program to test, and I still get nothing:

 val source: Source[Int, Unit] = Source(1 to 10)
 val printSink = Sink.foreach[Int](e = println(e))

 val actionStream: ArrayBuffer[(Int) = Int] = ArrayBuffer.empty[(Int) = 
 Int]

 def add(a: Int) = a + 1

 def exec(): Unit = {
   val sourceReady = actionStream.drop(1).foldLeft(source)
   {(source, action) =
 source.via(Flow[Int].mapAsync(e = Future(action.apply(e
   }

   sourceReady

   sourceReady.runWith(printSink)
 }

 parallel test should work in {
   actionStream += ((a: Int) = add(a))
   actionStream += ((a: Int) = add(a))

   exec()
 }

  -- 
  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 because you are subscribed to the Google 
 Groups Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to akka-user+...@googlegroups.com javascript:.
 To post to this group, send email to akka...@googlegroups.com 
 javascript:.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




 -- 
 Cheers,
 √
  



 -- 
 Cheers,
 √
  

-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Akka io udp broadcast to subnet

2015-04-02 Thread saumitra . srivastav7
I am trying to use akka-io to broadcast a UDP packet to all the nodes in my 
subnet? I am following up the scala example 
from http://doc.akka.io/docs/akka/snapshot/scala/io-udp.html

Its not working if I am using 255.255.255.255. Although its working fine 
when I give direct IP - 10.172.137.125

I tried the same task using java.net.DatagramSocket and it is working 
perfectly, i.e. i can receive the broadcast message on all subnet nodes, 
when sending using 255.255.255.255. So that means that there are no 
networking issues between machines. But if possible I want to do it using 
akka-io itself?

I am new to network programming. Any ideas what I might be doing wrong?

Let me know what more info can I provide to identify the issue.



-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Akka Stream is not running (without compiler error)

2015-04-02 Thread Viktor Klang
Works on my machine:

scala import scala.collection.mutable.ArrayBuffer
import scala.collection.mutable.ArrayBuffer

scala import akka.stream._
import akka.stream._

scala import akka.stream.scaladsl._
import akka.stream.scaladsl._

scala implicit val sys = ActorSystem(repl)
sys: akka.actor.ActorSystem = akka://repl

scala import sys.dispatcher
import sys.dispatcher

scala implicit val fm = ActorFlowMaterializer()
fm: akka.stream.ActorFlowMaterializer =
ActorFlowMaterializerImpl(ActorFlowMaterializerSettings(4,16,,function1,StreamSubscriptionTimeoutSettings(CancelTermination,5000
milliseconds),false,1000,Optimizations(false,false,false,false)),akka.dispatch.Dispatchers@3dff9cf6
,Actor[akka://repl/user/$b#575469743],1,flow,Optimizations(false,false,false,false))

scala val source: Source[Int, Unit] = Source(1 to 10)
source: akka.stream.scaladsl.Source[Int,Unit] =
akka.stream.scaladsl.Source@4d8aca2f

scala val printSink = Sink.foreach[Int](println)
printSink: akka.stream.scaladsl.Sink[Int,scala.concurrent.Future[Unit]] =
akka.stream.scaladsl.Sink@7d6cac88


scala val actionStream: ArrayBuffer[(Int) = Int] =
ArrayBuffer.empty[(Int) = Int]
actionStream: scala.collection.mutable.ArrayBuffer[Int = Int] =
ArrayBuffer()

scala def add(a: Int) = a + 1
add: (a: Int)Int

scala

scala def exec(): Unit =
 |   actionStream.drop(1).foldLeft(source)(
 | (source, action) = source.via(Flow[Int].mapAsync(e =
Future(action(e
 |   ).runWith(printSink)
exec: ()Unit

scala

scala actionStream += add
res6: actionStream.type = ArrayBuffer(function1)

scala actionStream += add
res7: actionStream.type = ArrayBuffer(function1, function1)

scala exec()

scala 2
3
4
5
6
7
8
9
10
11

On Thu, Apr 2, 2015 at 11:29 PM, Allen Nie aiming...@gmail.com wrote:

 I came up a much simplified program to test, and I still get nothing:

 val source: Source[Int, Unit] = Source(1 to 10)
 val printSink = Sink.foreach[Int](e = println(e))

 val actionStream: ArrayBuffer[(Int) = Int] = ArrayBuffer.empty[(Int) = Int]

 def add(a: Int) = a + 1

 def exec(): Unit = {
   val sourceReady = actionStream.drop(1).foldLeft(source)
   {(source, action) =
 source.via(Flow[Int].mapAsync(e = Future(action.apply(e
   }

   sourceReady

   sourceReady.runWith(printSink)
 }

 parallel test should work in {
   actionStream += ((a: Int) = add(a))
   actionStream += ((a: Int) = add(a))

   exec()
 }

  --
  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 because you are subscribed to the Google Groups
 Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




-- 
Cheers,
√

-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[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 
message send
service-idp java.io.NotSerializableException: 
akka.stream.impl.ActorProcessor

The stack trace is longer, I can include it in a gist if it helps. But is 
this is a bug or expected behaviour? I can't continue with serialization as 
long as akka-stream is on my classpath.

I am using akka-stream-experimental, akka-http-core-experimental, 
akka-http-experimental version 1.0-M5 and akka-persistence-experimental 
version 2.3.9.

Tried setting it explicitly in akka.actor.serialization-bindings but still 
the same error.

If needed I can do more troubleshooting and/or produce test cases. With 
akka.actor.serialize-messages = off this does not occur, on my local 
machine at least.

/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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] include external conf

2015-04-02 Thread Leon Ma
Hi,

In my application.conf, I'd like to include another conf from a dependent 
jars.

Shall I just do

include abc.conf


or

include classpath(abc.conf)


Thanks
Leon


-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] problem running with sbt run

2015-04-02 Thread Tim Pigden
Hi 
I'm getting the following error message when running an akka program from 
within sbt
It runs perfectly fine from inside intellij
My unit tests run fine in sbt too - but they are using in-memory persistence

Using latest versions of everything (M5 , 2.3.9, 2.11.6 etc)

I've tried doing all the obvious things (like closing intellij, closing 
sbt, deleting my journal), but to no avail.
I've not added any special things to sbt  - I just type run

any suggestions?

Thanks
Tim

dispatcher-8] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is 
enabled for ActorSystem[default]
java.lang.NoClassDefFoundError: Could not initialize class 
org.fusesource.leveldbjni.internal.NativeOptions
at 
org.fusesource.leveldbjni.JniDBFactory$OptionsResourceHolder.init(JniDBFactory.java:98)
at org.fusesource.leveldbjni.JniDBFactory.open(JniDBFactory.java:167)
at 
akka.persistence.journal.leveldb.LeveldbStore$class.preStart(LeveldbStore.scala:112)
at 
akka.persistence.journal.leveldb.LeveldbJournal.preStart(LeveldbJournal.scala:20)
at akka.actor.Actor$class.postRestart(Actor.scala:547)
at 
akka.persistence.journal.leveldb.LeveldbJournal.postRestart(LeveldbJournal.scala:20)
at akka.actor.Actor$class.aroundPostRestart(Actor.scala:485)
at 
akka.persistence.journal.leveldb.LeveldbJournal.aroundPostRestart(LeveldbJournal.scala:20)
at 
akka.actor.dungeon.FaultHandling$class.finishRecreate(FaultHandling.scala:238)
at 
akka.actor.dungeon.FaultHandling$class.faultRecreate(FaultHandling.scala:76)
at akka.actor.ActorCell.faultRecreate(ActorCell.scala:369)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:459)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:279)
at akka.dispatch.Mailbox.run(Mailbox.scala:220)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Akka actor creation

2015-04-02 Thread Jitendra
Hi All,

I am new to akka. I went through some of the videos of Jones Boner.
He says that in 1GB of RAM, we can create several thousands of threads.
But, with Akka, we can create several millions of actors.

If I am not wrong, actors internally create threads (fork-join threads). 
Then, how is this possible with Akka.

I feel this contradicting. Can some body please help me in understanding 
this.

Thanks,
Jitendra

-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Akka actor creation

2015-04-02 Thread 何品
actor are object,just more complex than a simple runnable,and the actors 
are running on threads(dispatchers),
just like the executeService runs runnables.

so it's not actors create threads.it's actors run on threads.

在 2015年4月3日星期五 UTC+8上午11:59:10,Jitendra写道:

 Hi All,

 I am new to akka. I went through some of the videos of Jones Boner.
 He says that in 1GB of RAM, we can create several thousands of threads.
 But, with Akka, we can create several millions of actors.

 If I am not wrong, actors internally create threads (fork-join threads). 
 Then, how is this possible with Akka.

 I feel this contradicting. Can some body please help me in understanding 
 this.

 Thanks,
 Jitendra



-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Shutdown Actor system without killing the JVM

2015-04-02 Thread Akka Team
Hi Guido,
seems like you've found your solution - thanks for sharing it.
Yes, when shutting down an ActorSystem this is performed asynchronously, if
you need to wait until it's really shut-down you must call the
awaitTermination method.

I'm not entirely sure about the context you're running these though, seems
to be some application container?

On Tue, Mar 31, 2015 at 2:04 PM, Guido Amabili guido.amab...@gmail.com
wrote:


  This is what I did and seems to be working - (JVM process is not
 shutdown, while the actor system is ) - using Akka 2.4-Snapshot

  public void shutdown() {
 system.registerOnTermination(new Runnable() {

 @Override
 public void run() {
 LOG.info(Actor system terminated.);
 }
 });
 system.shutdown();
 system.awaitTermination();
 }


  --
  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 because you are subscribed to the Google Groups
 Akka User List group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to akka-user+unsubscr...@googlegroups.com.
 To post to this group, send email to akka-user@googlegroups.com.
 Visit this group at http://groups.google.com/group/akka-user.
 For more options, visit https://groups.google.com/d/optout.




-- 
Akka Team
Typesafe - Reactive apps on the JVM
Blog: letitcrash.com
Twitter: @akkateam

-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Akka2.0.2 integration with Spring having problem

2015-04-02 Thread Rahul Singhal
Hi ,

I am trying to integrate akka with Spring framework using xsd as 
http://repo.akka.io/akka-1.3.1.xsd; which seems fine .

And my spring-context.xml looks like ..

beans xmlns=http://www.springframework.org/schema/beans;
xmlns:akka=http://repo.akka.io/schema/akka; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://repo.akka.io/akka-1.3.1.xsd;


akka:untyped-actor id=myActor
implementation=com.akka.concurrency.EIEActor scope=singleton
autostart=true
/akka:untyped-actor

/beans

When i run this app it throws the exception ... 

Exception in thread main 
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 
10* in XML document from class path resource [spring-context.xml] is 
invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 10; 
columnNumber: 20; cvc-complex-type.2.4.c: The matching wildcard is strict, 
but no declaration can be found for element 'akka:untyped-actor'.*
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)
at 
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)
at 
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
at 
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
at 
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:522)
at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:436)
at 
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:139)
at 
org.springframework.context.support.ClassPathXmlApplicationContext.init(ClassPathXmlApplicationContext.java:83)


Can any one please suggest me how to resolve the same.


Thanks ,
--

-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: problem running with sbt run

2015-04-02 Thread Tim Pigden
apologies: I have rather more informative trace in the log file 

I did a new search we showed a stack overflow question from Martin K and it 
is fixed with

fork in Test := true


RROR - Uncaught error from thread 
[default-akka.persistence.dispatchers.default-plugin-dispatcher-6] shutting 
down JVM since 'akka.jvm-exit-on-fatal-error' is enabled
java.lang.UnsatisfiedLinkError: 
org.fusesource.leveldbjni.internal.NativeOptions.init()V
at org.fusesource.leveldbjni.internal.NativeOptions.init(Native Method) 
~[leveldbjni-all-1.7.jar:1.7]
at 
org.fusesource.leveldbjni.internal.NativeOptions.clinit(NativeOptions.java:54)
 
~[leveldbjni-all-1.7.jar:1.7]
at 
org.fusesource.leveldbjni.JniDBFactory$OptionsResourceHolder.init(JniDBFactory.java:98)
 
~[leveldbjni-all-1.7.jar:1.7]




-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: how to tune akka remoting performance

2015-04-02 Thread Ivan Balashov
Patrik,

2015-04-01 20:12 GMT+03:00 Patrik Nordwall patrik.nordw...@gmail.com:

 Are you sending all messages in one go?


Unfortunately, yes, which is rather unrealistic and creates needless GC
activity, I fully admit my oversight on this.


 You can compare with this benchmark:
 https://github.com/akka/akka/tree/release-2.3/akka-samples/akka-sample-remote-scala/src/main/scala/sample/remote/benchmark


Finally I managed to run this example in Intellij IDEA. The key to success
was to take master branch rather than 2.x, which is broken Idea-wise (
http://goo.gl/uUJdGD)

Here are some results as run on 4 core laptop under OS X:

== It took 38830 ms to deliver 100 messages, throughtput 25753 msg/s,
 max round-trip 62 ms, burst size 100, payload size 100
 == It took 35742 ms to deliver 100 messages, throughtput 27978 msg/s,
 max round-trip 1000 ms, burst size 1000, payload size 100
 == It took 34356 ms to deliver 100 messages, throughtput 29106 msg/s,
 max round-trip 804 ms, burst size 1, payload size 100
 == It took 21636 ms to deliver 100 messages, throughtput 46219 msg/s,
 max round-trip 2033 ms, burst size 5, payload size 100


The results are somewhat comparable to what was observed in my tests with
high CPU usage caused particularly by context switching, and partly by Akka
Remoting.

Running Receiver took 1m 20s CPU time

Method,Time (ms),Own Time (ms)

*sun.misc.Unsafe.unpark(Object) Unsafe.java (native),9716,9716*
 sun.nio.ch.KQueueArrayWrapper.kevent0(int, long, int, long)
 KQueueArrayWrapper.java (native),3841,3838
 java.lang.ClassLoader.defineClass1(String, byte[], int, int,
 ProtectionDomain, String) ClassLoader.java (native),2673,2050
 java.net.URI$Parser.scan(int, int, long, long) URI.java,1420,1420
 com.yourkit.probes.Table.createRow() Table.java,1123,1123
 java.lang.Integer.parseInt(String) Integer.java,1091,1085
 java.net.URLClassLoader$1.run() URLClassLoader.java,4844,906
 scala.collection.AbstractIterable.init() Iterable.scala,508,469
 java.lang.Thread.sleep(long) Thread.java (native),416,416
 akka.remote.WireFormats$ActorRefData.init(CodedInputStream,
 ExtensionRegistryLite) WireFormats.java,419,387
 java.lang.AbstractStringBuilder.expandCapacity(int)
 AbstractStringBuilder.java,381,371


If we divide 1M messages / 80 Sec CPU Time = 12K rps / Core max, which
corresponds to what is observed in test.

In case my calculations are correct, doesn't this looks a bit unsettling
for Akka to be a CPU-bound system, even when the only thing we do is pass
around chunks of bytes? ;-)

-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Akka Stream is not running (without compiler error)

2015-04-02 Thread Allen Nie
I came up a much simplified program to test, and I still get nothing:

val source: Source[Int, Unit] = Source(1 to 10)
val printSink = Sink.foreach[Int](e = println(e))

val actionStream: ArrayBuffer[(Int) = Int] = ArrayBuffer.empty[(Int) = Int]

def add(a: Int) = a + 1

def exec(): Unit = {
  val sourceReady = actionStream.drop(1).foldLeft(source)
  {(source, action) =
source.via(Flow[Int].mapAsync(e = Future(action.apply(e
  }

  sourceReady

  sourceReady.runWith(printSink)
}

parallel test should work in {
  actionStream += ((a: Int) = add(a))
  actionStream += ((a: Int) = add(a))

  exec()
}

-- 
  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 because you are subscribed to the Google Groups Akka 
User List group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.