0

I am currently looking for a visualizer for akka.net (.NET version). I found none so I am wondering if there is any way to make akka-tree (scale) and akka.net cluster work together. I guess if both framework are following the same spec then it should work. is it?

I tried asking this question in akka-tree but no response so I am trying my luck here.

https://github.com/nraychaudhuri/akka-tree/issues/15

I am not familiar with scale but I did the following changes.

I tried adding the UDP configuration in my akka.net sample because I think this visualizer is using UDP.

        helios.udp {
              port = 9003 # needs to be on a different port or IP than TCP
              hostname = localhost
          }

And then, I tried to change the IP address in this file akka-tree\visualizer\app\controllers\Application.scala

            val group = InetAddress.getByName("127.0.0.1"); 

But, doesn't work.. Any idea how to make it work? Thanks!

Update:

I tried using TCP but doesn't work.

I am getting the exception below when I access the webpage "localhost:90000". I am not familiar with Scale but I think it has something to do with scale installation. I did install scale and java on my machine tho..

[info] Compiling 1 Scala source to D:\git\akka-tree\visualizer\target\scala-2.11 \classes... [info] play - Application started (Dev) [error] application -

! Internal server error, for (GET) [/] ->

java.lang.ExceptionInInitializerError: null at Routes$$anonfun$routes$1$$anonfun$applyOrElse$1$$anonfun$apply$1.appl y(routes_routing.scala:72) ~[na:na] at Routes$$anonfun$routes$1$$anonfun$applyOrElse$1$$anonfun$apply$1.appl y(routes_routing.scala:72) ~[na:na] at play.core.Router$HandlerInvokerFactory$$anon$13$$anon$14.call(Router. scala:217) ~[play_2.11-2.3.7.jar:2.3.7] at play.core.Router$Routes$TaggingInvoker.call(Router.scala:464) ~[play_ 2.11-2.3.7.jar:2.3.7] at Routes$$anonfun$routes$1$$anonfun$applyOrElse$1.apply(routes_routing. scala:72) ~[na:na] Caused by: java.net.SocketException: Not a multicast address at java.net.MulticastSocket.joinGroup(Unknown Source) ~[na:1.8.0_51] at controllers.Application$.(Application.scala:16) ~[na:na] at controllers.Application$.(Application.scala) ~[na:na] at Routes$$anonfun$routes$1$$anonfun$applyOrElse$1$$anonfun$apply$1.appl y(routes_routing.scala:72) ~[na:na] at Routes$$anonfun$routes$1$$anonfun$applyOrElse$1$$anonfun$apply$1.appl y(routes_routing.scala:72) ~[na:na] [error] application - Error while rendering default error page scala.MatchError: java.lang.ExceptionInInitializerError (of class java.lang.Exce ptionInInitializerError) at play.api.GlobalSettings$class.onError(GlobalSettings.scala:148) ~[pla y_2.11-2.3.7.jar:2.3.7] at play.api.DefaultGlobal$.onError(GlobalSettings.scala:206) [play_2.11- 2.3.7.jar:2.3.7] at play.core.server.Server$class.logExceptionAndGetResult$1(Server.scala :63) [play_2.11-2.3.7.jar:2.3.7] at play.core.server.Server$$anonfun$getHandlerFor$4.apply(Server.scala:7 3) [play_2.11-2.3.7.jar:2.3.7] at play.core.server.Server$$anonfun$getHandlerFor$4.apply(Server.scala:7 1) [play_2.11-2.3.7.jar:2.3.7] [error] application -

! Internal server error, for (HEAD) [/] ->

java.lang.NoClassDefFoundError: Could not initialize class controllers.Applicati on$ at Routes$$anonfun$routes$1$$anonfun$applyOrElse$1$$anonfun$apply$1.appl y(routes_routing.scala:72) ~[na:na] at Routes$$anonfun$routes$1$$anonfun$applyOrElse$1$$anonfun$apply$1.appl y(routes_routing.scala:72) ~[na:na] at play.core.Router$HandlerInvokerFactory$$anon$13$$anon$14.call(Router. scala:217) ~[play_2.11-2.3.7.jar:2.3.7] at play.core.Router$Routes$TaggingInvoker.call(Router.scala:464) ~[play_ 2.11-2.3.7.jar:2.3.7] at Routes$$anonfun$routes$1$$anonfun$applyOrElse$1.apply(routes_routing. scala:72) ~[na:na] [error] application - Error while rendering default error page scala.MatchError: java.lang.NoClassDefFoundError: Could not initialize class con trollers.Application$ (of class java.lang.NoClassDefFoundError) at play.api.GlobalSettings$class.onError(GlobalSettings.scala:148) ~[pla y_2.11-2.3.7.jar:2.3.7] at play.api.DefaultGlobal$.onError(GlobalSettings.scala:206) [play_2.11- 2.3.7.jar:2.3.7] at play.core.server.Server$class.logExceptionAndGetResult$1(Server.scala :63) [play_2.11-2.3.7.jar:2.3.7] at play.core.server.Server$$anonfun$getHandlerFor$4.apply(Server.scala:7 3) [play_2.11-2.3.7.jar:2.3.7] at play.core.server.Server$$anonfun$getHandlerFor$4.apply(Server.scala:7 1) [play_2.11-2.3.7.jar:2.3.7]

Michael Sync
  • 4,834
  • 10
  • 40
  • 58
  • Are you sure it's not a transport layer issue? UDP is second-class-citizen transport option at the moment, so maybe when you decide to use TCP instead, it may fix your problem? – Bartosz Sypytkowski Aug 30 '15 at 14:09
  • @Horusiath Thanks! I did try with TCP but got the same error. I updated my posted with error detail. Any idea about that error? Thanks again! – Michael Sync Aug 31 '15 at 04:10

2 Answers2

2

I'm not the author but there's a 'very very alpha version' of the visualizer ported to .NET (from Aug '16) available on nuget https://www.nuget.org/profiles/corneliutusnea with source here https://github.com/corneliutusnea/Akka.Visualizer

simonpetty
  • 21
  • 2
1

The problem is that, you're trying to span your cluster over both .NET and JVM akka implementations. They are not compatible with each other at the moment. Reason for that are some differences in .NET/JVM socket transport layer (like little- and big-endian byte ordering) as well as problems with message serialization (JVM uses built-in JavaSerializer, .NET uses JSON.NET by default).

There are probably some other minor issues as well, but the conclusion is, that at the present moment you cannot combine akka cluster between .NET and JVM nodes.

Bartosz Sypytkowski
  • 7,463
  • 19
  • 36
  • 1
    I see Thanks for the answer. Is there any visualizer for akka.net? If there is nothing, is it possible to give me some pointers on how to start doing on my own? I am kinda new to akka.net but I guess I should be able to subscribe the event stream (or something) of actor system or cluster so I can get the actor creation event and messages ... – Michael Sync Aug 31 '15 at 23:45