Coder Social home page Coder Social logo

akka-viz's Introduction

akka-viz

a visual debugger for Akka actor systems (experimental)

Build Status Codacy Badge

Current version is built agains akka 2.4.10.

Download

Latest version is: Download

To get started you need to add dependencies for "monitoring" jar:

resolvers += Resolver.bintrayRepo("lustefaniak", "maven")

libraryDependencies += "com.blstream.akkaviz" %% "monitoring" % "0.1.7"

After that you must configure your application to run with AspectJ weaver.

SBT plugin

Latest version is: Download

Simpler way is to use sbt plugin, which will preconfigure required bits, in your project directory create file project/akkaviz.sbt with:

resolvers += Resolver.url("lustefaniak/sbt-plugins", url("https://dl.bintray.com/lustefaniak/sbt-plugins/"))(Resolver.ivyStylePatterns)

addSbtPlugin("com.blstream.akkaviz" % "sbt-akka-viz" % "0.1.7")

Sample project

Please check lustefaniak/akka-viz-demo for simple, preconfigured SBT project.

Screenshots

REPL and Actor messaging graph

Actor hierarchy and Actor details tab

Message archive

FSM monitoring

Features

  • see which actors exchange messages on a graph
  • monitor internal state via reflection
  • track FSM transitions
  • monitor actor creation
  • display messages in realtime (with contents) for selected actors
  • filter messages by class
  • delay processing of messages
  • display information about exceptions in actors and used supervisor strategies

Running

Configuration

To change one of the akka-viz default settings create application.conf file as defined in Typesafe Config documentation

Default settings are:

akkaviz {
  internalSystemName = akka-viz
  interface = 127.0.0.1
  port = 8888
  bufferSize = 10000
  maxSerializationDepth = 3
  inspectObjects = false
  autoStartReporting = true
  enableArchive = true
  cassandra {
    keyspace = akkaviz
    preparedStatementCacheSize = 100
    session {
      contactPoint = 127.0.0.1
    }
  }
}

Message archive

Akka-viz can use Cassandra database to store all messages so they could be replayed in the frontend for easier debugging.

To use it make sure akkaviz.enableArchive = true and akkaviz.cassandra points to correct Cassandra configuration.

You need to manually create keyspace and tables. Execute included DDL via cqlsh

Demos

We supply a few demos with the source code, so you can explore without hooking up to an existing ActorSystem.

Clone project and run with demo/reStart in SBT. Go to http://localhost:8888 in your favourite browser and play around!

Monitoring existing systems

Include jar in classpath of your app and run your main(). Server should be listening on http://localhost:8888.

Under the hood

To hook into Akka's internals, we use AspectJ (capturing actor creation, intercepting of messages). WebSocket handling is provided by Akka HTTP and Akka Streams. Filtering is done per client; slowing down of message processing, however, affects the whole system. Frontend is powered by Scala.js, Scala.Rx and ScalaTags.

Serialization for messages

We're using custom-made serialization with help of upickle for transporting the messages to frontend clients. To serialize some specific type of message - ie. your custom class, that you want to have displayed in web frontend - you have to implement a AkkaVizSerializer.

akka-viz's People

Contributors

jjag avatar lukasz-golebiewski avatar lustefaniak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

akka-viz's Issues

Build not found

It's a very useful project for akka learner, but seems like the build it not exist any more.

[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.blstream.akkaviz:sbt-akka-viz;sbtVersion=1.0;scalaVersion=2.12:0.1.2
[error]   Not found
[error]   Not found
[error]   not found: https://dl.bintray.com/sbt/sbt-plugin-releases/com.blstream.akkaviz/monitoring_2.13/0.1.7/ivys/ivy.xml

Can you have a look to bring this alive? Thank you!

How to work with maven project

It's a very useful project for akka learner, but i'm not familiar with SBT, so... If you could tell me how to user it in maven project (my platform is spring boot), tks.

Error with newer versions of Akka: java.lang.NoSuchMethodError: akka.http.scaladsl.server.RouteConcatenation

Hey guys,

Thanks for the work on this project. It looks like there was a minor change to Akka's RouteConcatenation trait that causes this error:

[error] Uncaught error from thread [akka-viz-akka.actor.default-dispatcher-3] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[akka-viz]
[error] java.lang.NoSuchMethodError: akka.http.scaladsl.server.RouteConcatenation$class.enhanceRouteWithConcatenation(Lakka/http/scaladsl/server/RouteConcatenation;Lscala/Function1;)Lakka/http/scaladsl/server/RouteConcatenation$RouteWithConcatenation;
[error]     at akkaviz.server.Webservice.enhanceRouteWithConcatenation(Webservice.scala:19)
[error]     at akkaviz.server.Webservice$$anonfun$2.apply(Webservice.scala:24)
[error]     at akkaviz.server.Webservice$$anonfun$2.apply(Webservice.scala:30)
[error]     at akka.http.scaladsl.server.Directive$$anonfun$addByNameNullaryApply$1$$anonfun$apply$13.apply(Directive.scala:134)

Before:
https://github.com/akka/akka/blob/b3c85512a33d865a1d2ce98550df74d49790b059/akka-http/src/main/scala/akka/http/scaladsl/server/RouteConcatenation.scala#L20

After:
https://github.com/akka/akka/blob/master/akka-http/src/main/scala/akka/http/scaladsl/server/RouteConcatenation.scala#L20

enhanceRouteWithConcatenation was renamed to _ enhanceRouteWithConcatenation

It looks like this was built with Akka 2.4.2, before this change was made. It'd be great to get this working with the newer versions. I saw in another issue that you mentioned that people had moved on from this project, so I'm happy to take a stab at updating this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.