{"id":95403,"date":"2020-09-28T19:43:15","date_gmt":"2020-09-28T17:43:15","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/vybor-arhitekturnogo-stilya-chast-3"},"modified":"2020-09-28T19:43:15","modified_gmt":"2020-09-28T17:43:15","slug":"vybor-arhitekturnogo-stilya-chast-3","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/vybor-arhitekturnogo-stilya-chast-3","title":{"rendered":"Choosing an Architectural Style (Part 3)","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><b><i>Hello, Habr. Today, I continue the series of publications written specifically for the launch of the new stream of the course. <noindex><a rel=\"nofollow\" href=\"https:\/\/otus.pw\/z0Ur\/\">Software Architect<\/a><\/noindex>.<\/i><\/b><\/p>\n<p><\/p>\n<h2>Introduction<\/h2>\n<p>\nChoosing an architectural style is one of the fundamental technical decisions when building an information system. In this series of articles, I propose to explore the most popular architectural styles for building applications and answer the question of when each architectural style is the most preferable. Throughout the discussion, I will try to establish a logical chain that explains the evolution of architectural styles from monoliths to microservices. <\/p>\n<p>Last time, we discussed various types of monoliths and the use of components for their construction, including both assembly components and deployment components. We delved into service-oriented architecture.<\/p>\n<p>Now, we will finally define the key characteristics of microservices architecture. <br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h2>Architectural Relationships<\/h2>\n<p>\nIt is essential to understand that based on the definitions provided in previous articles, any service is a component, but not every service is a microservice. <\/p>\n<h2>Characteristics of Microservices Architecture<\/h2>\n<p>\nThe primary characteristics of microservices architecture are:<\/p>\n<ul>\n<li>Organized Around Business Capabilities<\/li>\n<li>Products Not Projects<\/li>\n<li>Smart Endpoints and Dumb Pipes<\/li>\n<li>Decentralized Governance<\/li>\n<li>Decentralized Data Management<\/li>\n<li>Infrastructure Automation<\/li>\n<li>Design for Failure<\/li>\n<li>Evolutionary Design<\/li>\n<\/ul>\n<p>\nThe first point comes from service-oriented architecture because microservices are a specific case of services. The other points deserve separate consideration.<\/p>\n<h2>Organized Around Business Capabilities<\/h2>\n<p>\nNow, it is necessary to recall Conway's Law: organizations that create systems will design their architecture to reflect the communication structures within those organizations. For instance, a team of seven people developed a seven-pass compiler, while a team of five created a five-pass compiler.<\/p>\n<p>When discussing monoliths and microservices, if development is organized by functional departments (backend, frontend, database administrators), then you end up with a classic monolith. <\/p>\n<p>To achieve microservices, teams need to be organized around business capabilities (order team, shipping team, catalog team). This organization will allow teams to focus on creating specific parts of the application.<\/p>\n<h2>Products Not Projects<\/h2>\n<p>\nThe project approach where a team hands over developed functionality to other teams in the case of microservices architecture is completely unsuitable. The team must maintain the system throughout its entire lifecycle. Amazon, one of the leaders in implementing microservices, stated: \"you build a product, and you run it.\" This product-oriented approach allows the team to feel the needs of the business. <\/p>\n<h2>Smart Endpoints and Dumb Pipes<\/h2>\n<p>\nSOA architecture paid great attention to communication channels, particularly the Enterprise Service Bus. This often leads to what is known as the Erroneous Spaghetti Box, where the complexity of a monolith shifts to the complexity of interactions between services. Microservices architecture solely uses simple methods of interaction.<\/p>\n<h2>Decentralized Governance<\/h2>\n<p>\nKey decisions regarding microservices should be made by the people who actually develop the microservices. Key decisions refer to the selection of<br \/>\nprogramming languages, deployment methodologies, public interface contracts, etc. <\/p>\n<h2>Decentralized Data Management<\/h2>\n<p>\nThe standard approach, in which the application relies on a single database, cannot take into account the specifics of each individual service. MSA assumes decentralized data management, even to the extent of using different technologies.<\/p>\n<h2>Infrastructure Automation<\/h2>\n<p>\nMSA supports continuous deployment and delivery processes. This can only be achieved through process automation. Deploying a large number of services no longer seems daunting. The deployment process should become mundane. The second aspect is related to service management in a production environment. Without automation, managing processes running in different operational environments becomes impossible.<\/p>\n<h2>Design for Failure<\/h2>\n<p>\nNumerous services in MSA are prone to failures. At the same time, error handling in a distributed system is quite a non-trivial task. The application architecture must be resilient to such failures. Rebecca Parsons emphasizes that we no longer rely on even inter-process interaction between services; instead, we turn to HTTP for communication, which is not nearly as reliable.<\/p>\n<h2>Evolutionary Design<\/h2>\n<p>\nThe architecture of an MSA system should evolve gradually. It is preferable to limit necessary changes to the boundaries of a single service. The impact on other services must also be taken into account. The traditional approach is to try to solve this issue through version management, but MSA proposes using version management as<br \/>\na last resort.<\/p>\n<h2>Conclusion<\/h2>\n<p>\nAfter all that has been said, we can define what microservices are. Microservices architecture is an approach to developing a single application as a set of small services, each running in its own process and communicating through lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and can be deployed independently using a fully<br \/>\nautomated deployment mechanism. There is minimal centralized management of these services, which can be written in different programming languages and use various data storage technologies.<\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/otus.pw\/z0Ur\/\"><img decoding=\"async\" alt=\"Choosing an Architectural Style (Part 3)\" src=\"\/wp-content\/uploads\/2020\/09\/f9ffd06c83921f64818842327c09108e.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><\/p>\n<p><i><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/519456\/\">Read Part 2<\/a><\/noindex><\/i><br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/520870\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0441\u0435\u0440\u0438\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043a \u0441\u0442\u0430\u0440\u0442\u0443 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u043a\u0443\u0440\u0441\u0430 \u00abSoftware Architect\u00bb. \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0412\u044b\u0431\u043e\u0440 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043e\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0449\u0438\u0445 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0435 \u0441\u0442\u0438\u043b\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u043a\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c. [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":95404,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-95403","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/vybor-arhitekturnogo-stilya-chast-3\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0412\u044b\u0431\u043e\u0440 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f (\u0447\u0430\u0441\u0442\u044c 3) | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/vybor-arhitekturnogo-stilya-chast-3\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-09-28T17:43:15+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-09-28T17:43:15+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Choosing an Architectural Style (Part 3) | ProHoster","description":"Hello, Habr.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/vybor-arhitekturnogo-stilya-chast-3","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0412\u044b\u0431\u043e\u0440 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f (\u0447\u0430\u0441\u0442\u044c 3) | ProHoster","og:description":"\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440.","og:url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/vybor-arhitekturnogo-stilya-chast-3","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-09-28T17:43:15+00:00","article:modified_time":"2020-09-28T17:43:15+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"95403","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 11:06:26","updated":"2022-10-01 11:38:49","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/95403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=95403"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/95403\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/95404"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=95403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=95403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=95403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}