[Hawkular-dev] Aggregated Hawkular REST api

Jiri Kremser jkremser at redhat.com
Fri Dec 11 07:41:43 EST 2015


Good news everyone,

  I was finally able to open the pull request [1] with first shot of the new rest api module for Hawkular. It's goal is to simplify the overall api, in which each component/microservice has very fine-grained api.

Currently it can't do much. All it does is manipulation with URls, but if you look into our current UI code here: http://git.io/v0I9p the addUrl function takes 248 LoC. It's creating a resource, computing md5 hash, creating 2 metrics, creating bunch of triggers with dampenings and conditions. Quite a lot.

The drawback with this approach, where UI layer works as an integration layer, was visible during the android client creation. Artur had no idea why he needs to mimic all the logic that was already there in JavaScript.

Module uses the Hystrix library, because it seems to be a great fit for api aggregation. It's heavily rx-java based and it supports the Circuit Breaker pattern that can help if the components are under heavy load. Similarly, like rx-java it takes quite a while to wrap your head around the concepts of reactive streams, though. Hopefully, it's not an overkill. Perhaps we can even closer integrate with their metric features [2].


[1]: https://github.com/hawkular/hawkular/pull/704
[2]: https://github.com/Netflix/Hystrix/wiki/Metrics-and-Monitoring

jk


More information about the hawkular-dev mailing list