- Language, Frameworks, Third-Party Libraries
- Editor
- Build and Code Analysis
- Testing
- Deployment
- Documentation
The purpose of this article is to link together some of the tools we use to build and test Java microservices at Groupon.
Groupon started as a Ruby on Rails shop and continues to use it, but the recommendation for new microservices is to use Java. Most of the internal library and tooling development is centered around Java.
Language, Frameworks, Third-Party Libraries
- Java 8 (or Java 11) as the JVM language. I think Kotlin is cool but we don’t use it.
- Dropwizard as a framework to build API/REST microservices with Java
- JDBI for database object relational mapping. We use PostgreSQL.
- Flyway DB Migrations for incremental database migrations
- Quartz Job Scheduler for background jobs
- OkHttp for http clients and a mock web server
- Immutables for building immutable objects
- Google Guava for immutable collections (
Map
,Set
,List
etc.) - JsonPath for querying JSON files
- Simple Java Mail for sending emails
- Joda Time
Editor
- IntelliJ IDEA as the IDE
Build and Code Analysis
- Maven
- Building the project
- Other tasks like PMD Static Code Analyzer
- JaCoCo Java Code Coverage
Testing
- JUnit as the primary test assertions library
- JSONassert assertions within JSON files
- AssertJ
- OkHttp for a MockWebServer
- Wiser for SMTP email verification testing
- Mockito for unit test mocking
- @VisibleForTesting Annotation
- Hamcrest matchers - “Matchers that can be combined to create flexible expressions of intent”
Deployment
For deployment we use both Capistrano and a custom internal promotion-based deployment method.
Documentation
Services have generated API documentation with Swagger. A custom web application provides a directory of all services, where attributes of the services such as the owner or email list are driven from YAML configuration files.
Comments