An open API service indexing awesome lists of open source software.

https://github.com/knutwalker/hystrix-play

Playground for using Hystrix together with the playframework
https://github.com/knutwalker/hystrix-play

Last synced: 12 months ago
JSON representation

Playground for using Hystrix together with the playframework

Awesome Lists containing this project

README

          

hystrix-play
============

Playground for using [Hystrix](https://github.com/Netflix/Hystrix#readme) together with the playframework

## Using Hystrix Commands with Plays asynchronous actions

There is an implicit method `future` available on any `HystrixCommand`, that will return a [Scala Future](http://www.scala-lang.org/api/current/#scala.concurrent.Future) rather then what Java calls a Future.
This is implemented by [`HystrixCommandWithScalaFuture`](app/util/Futures.scala#L13)

You can see it in Action in the [Application controller](app/controllers/Application.scala#L16).

## Providing a metrics stream, consumable by the hystrix-dashboard

This is a replacement for the [`hystrix-metrics-event-stream`](https://github.com/Netflix/Hystrix/tree/master/hystrix-contrib/hystrix-metrics-event-stream) module.
This module is only available as a Servlet/WAR, which is not suitable for Play.

There is a [`HystrixSupport` Controller](app/controllers/HystrixSupport.scala), that does the same as the original Servlet
and allows for this play application to be monitored by the [Hystrix Dashboard](https://github.com/Netflix/Hystrix/wiki/Dashboard)