Microservices with Clojure
上QQ阅读APP看书,第一时间看更新

Extensibility

A microservices-based architecture for the Helping Hands application not only makes it easier to deploy and scale but also makes it highly extensible. For example, by deploying a separate Lookup Service for search operations, it is now possible to use a database such as Elasticsearch only for search operations and Datomic for all other microservices that require consistent transactions.

In the future, if there is a better technology available, it will be easier to deploy services with a newer technology. Newer technology may also come with hardware challenges. For example, a database such as MapD (https://www.mapd.com/) runs on GPUs (https://en.wikipedia.org/wiki/Graphics_processing_unit). To use such databases, microservices need to run on specialized hardware. Since microservices can be deployed in isolation on the same or an entirely separate machine, it is possible to deploy services that need GPUs on machines that support GPUs without affecting the way they interact with other services. This is one of the advantages of microservices—you are not bound by the technology or underlying hardware and any changes done are localized within the bounded context of the service.

Data analytics is now an integral part of any web-based application. It not only helps us understand the usage patterns of the application, but also helps provide better services to the users. By generating event logs for all the changes done to entities, it is also possible to further extend the Helping Hands application to analyze usage patterns. For example, one can listen to events generated by the Order Service and study service usage patterns by demography. It should also be possible to analyze the popularity of services by location and provide customized offers to users as notifications.