Microservice architecture style for RESTful web application

Microservice is an architectural style for implementing a single application as a suite of small services. Each service can be deployed and managed separately. This is an emerging software architectural style adopted by many enterprises today in order to meet the rapidly evolving business needs. To follow this pattern for your JAX-RS application, you may want to break down the top-level monolithic JAX-RS resources into separate modules, where each module contains the logically related JAX-RS resource classes. Each module is deployed as a self-contained WAR file. Services communicate with each other via synchronous protocols such as REST over HTTP or asynchronous protocols such as messaging queue. If the performance is really a concern, you can consider using binary protocols, such as Thrift or Avro, for enabling the communication between services. The following diagram demonstrates how you can break down the human resource services application of an organization into multiple microservices. It also illustrates the interaction between various microservices:

Some of the advantages of the microservice architecture are as follows:

  • Small, modular, and easily manageable code base
  • Each service can be deployed, managed, and tuned separately
  • Ability to use the most appropriate technology stack (polyglot programming model) for individual services
  • Improved resilience for the entire application
  • Individual module can be redeployed without affecting the entire application
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.31.67