Showing posts with label playframework. Show all posts
Showing posts with label playframework. Show all posts

4 June 2014

Akka Monitoring

Akka is a relatively new approach defined in functional programming by way of Actors and implemented through Java and Scala. Unfortunately, Akka lacks many stable monitoring libraries or points of such integration. One has to ordinarily define their own customization to suit the unique application needs and requirements. Not only does one need to understand the Actors model in a distributed context but, also the implementation approach being used in the application. This is necessary in context so as to provide insight into bottlenecks, root cause, as well as state of services at any given time. There is an insurmountable metrics that could be measured and adapted from existing monitoring tools. But, overhead is more on the application-level and the way such measures isolate reactive event cases without having a disruptive repercussions to the wider production process.

Akka monitoring is invariably implemented from the view of either instrumentation or sampling which are fairly standard metrics approaches to dashboards. The discontinued Typesafe Console used the instrumentation approach. The below are a few approaches that could be used:
  • AspectJ weaving of components at load-time so one does not have to re-create the Actors.
  • Akka agent to access the supervisor for monitoring as a way of tracing the Actors
  • Use of monitoring annotations in specific cases of service implementations
  • JMX monitoring for messages
  • Reflections to access Actors
  • Attach traits rather than intercept on Actors
  • External modules such as statsd/graphite with application-level to build a workflow monitoring 

Useful Libraries:
Kamon
AkkaTracing
RestCommander
Logstash
EigenMonitor 
SimonJava
Stajistics
Metrics
Gatling
Ostrich

letitcrash

11 December 2013

Restful By DropWizard

There are now quite a few useful options available for developing Restful applications within Java frameworks. However, from a business standpoint it is still about rapid turn around time and project management which is key for developing Restful services with correctness. The usual routes are Spring Rest, Play framework, JEE stack, Apache CXF and friends, or Restlet. One more framework that Yammer have decided to use specifically for the purpose of rapid development and integration for services is Dropwizard. This framework pretty much ties in other mature libraries together saving time for ops, checking for high performance, and to build into a light-weight package. The framework has support for configuration, metrics, logging, ops tools, and more.  Quite a useful Restful focused framework for getting things done.

Also, if one is new to REST, there is an interesting RestExpress Tutorial.