{"title":"Strong typing for event-driven microservice architecture","authors":"N. Gerasimov","doi":"10.32603/2071-2340-2019-1-43-53","DOIUrl":null,"url":null,"abstract":"Microservice architecture is a popular approach for building various systems. It consists of various dedicated small-sized components from a solid application. Components work together and provide the required business-logic but each one can be implemented with the most suitable technique. Moreover, overloaded parts can be scaled easily. However, data transfer layer does not guarantee compatibility of services during their development. After changing input or output data type of any microservice of the system there are too little ways to keep up compatibility of all other services. The problem is especially urgent for asynchronous communication because existing systems and standards work mostly with synchronous RPC or REST interoperation or cover high-level description of business-logic. One approach to guarantee compatibility of all services in the system is a preliminary check of data types before the services start to work. The previous paper considers realization of the mentioned approach with the dedicated service that checks types, connects services using description of the interfaces. The current paper covers further development of the approach: a system built with preliminary check of data types supports only asynchronous communication and all checks are provided by a message broker. We have implemented and compared simplified approach with alternative ways and have come to the conclusion that described way solves the problem of type inconsistency in a microservice event-driven architecture in a more convenient way than alternatives.","PeriodicalId":319537,"journal":{"name":"Computer Tools in Education","volume":"9 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-03-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Tools in Education","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.32603/2071-2340-2019-1-43-53","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Microservice architecture is a popular approach for building various systems. It consists of various dedicated small-sized components from a solid application. Components work together and provide the required business-logic but each one can be implemented with the most suitable technique. Moreover, overloaded parts can be scaled easily. However, data transfer layer does not guarantee compatibility of services during their development. After changing input or output data type of any microservice of the system there are too little ways to keep up compatibility of all other services. The problem is especially urgent for asynchronous communication because existing systems and standards work mostly with synchronous RPC or REST interoperation or cover high-level description of business-logic. One approach to guarantee compatibility of all services in the system is a preliminary check of data types before the services start to work. The previous paper considers realization of the mentioned approach with the dedicated service that checks types, connects services using description of the interfaces. The current paper covers further development of the approach: a system built with preliminary check of data types supports only asynchronous communication and all checks are provided by a message broker. We have implemented and compared simplified approach with alternative ways and have come to the conclusion that described way solves the problem of type inconsistency in a microservice event-driven architecture in a more convenient way than alternatives.