Cloud-Native Applications in Java
上QQ阅读APP看书,第一时间看更新

Selecting a framework

Having looked at the basics, let's write our product service. After IDE setup, the next step is to select a framework to write the service. The microservice architecture puts forward a few interesting design considerations that will help us select the frameworks:

  • Lightweight runtime: The service should be small in size and fast to deploy
  • High resiliency: It should have support for patterns such as circuit breaker and timeout
  • Measurable and monitorable: It should capture metrics and expose hooks for monitoring agents to tap into
  • Efficient: It should avoid blocking resources and enable high scalability and elasticity in the presence of increased load

A good comparison can be found at: https://cdelmas.github.io/2015/11/01/A-comparison-of-Microservices-Frameworks.html. Three frameworks are gaining popularity in the Java space that meet the preceding requirements: Dropwizard, Vert.x, and Spring Boot.