Posts Tools of the trade

Tools of the trade

The tooling available internally at Amazon was great, but after spending close to five years there, I realized I’m not well versed in tooling for modern Java projects as much. Working on terrapin has forced me to look at available tooling for reuse, and rebuild what I missed. Here are some of my current open-source tools I’m using today. Some old, some new.

Resilence4J is a multi-purpose retry mechanism with lots of cool features. Exponential back-off with specific exceptions, circuit breaker to help cool down dependencies when they are on fire. Automatic integration with metrics so you can easily track what’s happening.

Micrometer for metrics. Gives the ability to use dimensions with your metrics, fits into tons of metric stores like Prometheus and can integrate with Dropwizard. Surprising no one, the metrics usage within Amazon was top-notch. Their push to AWS CloudWatch was actually disappointing, but still better than graphite or other metric display solutions. Micrometer is easy to use and quite versatile

Testcontainers is a nice way to get working dependencies in your test environment. I’ve been burned too much by database mocks so I’m using real databases for testing my DAOs… taking the 10s hit on each DAO I test. But this will really shine with writing functional tests. The project supports more than databases… all types of running environments and even your own custom container. Nice if the goal is each dev can run the full suite of tests without a shared build environment.

Retrofit which honestly I’m still trying to figure out if I like it or not. You use it for clients to talk to services… but adds some extra baggage that OpenFeign does not. Still not sure which to use or not. I may end up with OpenFeign.

Beyond the tools I mentioned above, there is the standard set too. Including

  • AssertJ for fluent test assertions. Makes for happy tests.
  • Dagger2 Compile-time IoC (Dependency Injection) library. Not just for Android.
  • Immutables Turn all your data objects into immutable structures and find joy with functional programming.
  • Jackson Managing JSON efficiently. Used primarily for binding JSON to immutable java objects.
  • Guava A collection of libraries from Google. Of course, the best thing there is the loading cache. It is Google after all.
  • Mockito Helps make your tests fast and concise by mocking whatever isn’t under test.

These have been standards in forever. The hold up today as well.

This post is licensed under CC BY 4.0 by the author.
Recent Update
Trending Tags

Trending Tags