{"id":1024,"date":"2019-10-31T14:29:37","date_gmt":"2019-10-31T13:29:37","guid":{"rendered":"https:\/\/blog.besharp.it\/?p=1024"},"modified":"2021-03-24T17:31:13","modified_gmt":"2021-03-24T16:31:13","slug":"break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition","status":"publish","type":"post","link":"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/","title":{"rendered":"Break the Monolith into microservices like a pro: our guide to a (almost) seamless transition"},"content":{"rendered":"

As applications grow in time, adding new features, with complex logic, many different interactions and coupling between components, it becomes very difficult to deal with them and so companies are driven to try and break them into small, manageable and reusable parts, built around <\/span>business capabilities<\/b>, microservices.\u00a0<\/span><\/p>\n

Within a microservices architecture, each application component runs as its own service and communicates with other services via a well-defined API respecting the <\/span>Single Responsibility Principle<\/b>.\u00a0<\/span><\/p>\n

Migrating to an <\/span>ecosystem of microservices<\/b> is not a simple journey but is a worthy one; embarking on it means giving your application the ability to <\/span>grow at a faster pace<\/b>, <\/span>reducing the risks of code changes<\/b> and also the <\/span>high costs<\/b> related to it.\u00a0<\/span><\/p>\n

Imagine that more of a team work on a monolithic application, mistakes on a logic which may be sticky can potentially block other team\u2019s work as usually the CD\/CI pipeline is the same for all the teams; with microservices, every team can work and maintain its own codebase.<\/span><\/p>\n

This approach is also heavily used in the SaaS paradigm, as <\/span>Software as a Service<\/b> delivery model is based on applications being centrally hosted on Cloud and being accessed via a Thin Client or a Web Browser, thus a microservices ecosystem serves this purpose very well.<\/span><\/p>\n

\"\"<\/p>\n

You give your teams the ability to <\/span>grow in number<\/b> and to <\/span>split and focus on each separate feature in parallel<\/b>, making them more efficient; also the <\/span>cost to introduce a new member to the team in terms of code knowledge is significantly reduced<\/b>.<\/span><\/p>\n

The costs of Experimentations<\/b> are also greatly reduced, as every feature is <\/span>atomic<\/b> thus <\/span>changes cannot damage other parts of the application<\/b>. This allows the teams to generate <\/span>business value<\/b> faster.<\/span><\/p>\n

Each microservice can be written <\/span>using different frameworks<\/b> and <\/span>programming languages<\/b>, and you can <\/span>deploy them independently<\/b>; thanks to their atomic nature and the fact that they adhere to the <\/span>isolation principle<\/b>, microservices guaranteed more easy and fast <\/span>disaster recovery solutions<\/b>.\u00a0<\/span><\/p>\n

\"\"<\/p>\n

LET\u2019S START THE JOURNEY<\/span><\/h2>\n

As the argument is very complex and vast, we\u2019ll try to focus on general well-known techniques and tips and not on anything specifically related to programming languages or infrastructure.<\/span><\/p>\n

Let\u2019s start by saying that \u201cmicro\u201d in microservices is just a <\/span>label<\/b> \u201cnot\u201d a <\/span>description<\/b>, in the sense that you don\u2019t need to try to split your application in tons of really small (and maybe useless) services on the cloud, but grasp the idea that you \u201creally need\u201d to find and split up <\/span>well-known part of your code that does very specific things<\/b>, with a <\/span>high value<\/b> and with a <\/span>domain<\/b> that is <\/span>clear<\/b> and <\/span>understandable<\/b>.<\/span><\/p>\n

PREREQUISITES<\/span><\/h2>\n

Even if working with microservices can be extremely appealing for the developers, your company must have some degree of readiness to start taking on the microservices\u2019 journey.\u00a0<\/span><\/p>\n

As a matter of fact the developers must have a clear understanding, and ideally some working experience, of technologies like Docker Containers, Kubernetes or maybe AWS Lambda for hosting your microservices.\u00a0<\/span><\/p>\n

You must be able to provide an operational service in less time as possible so you must be able to define <\/span>pipelines<\/b> for <\/span>Continuous Deployment<\/b> and <\/span>Continuous Integration<\/b>.<\/span><\/p>\n

Finally, you must be able to provide <\/span>fitting monitoring tools<\/b> for rapidly inspecting your microservices-ecosystem (imaging in AWS an intensive use of tools such as X-Ray, CloudWatch, CloudTrail, and ElasticSearch with Kibana).<\/span><\/p>\n

These prerequisites require your company to follow the <\/span>DevOps Culture<\/b>, in which every team member must have a clear understanding of both <\/span>coding tasks<\/b> and <\/span>operational environment<\/b>.<\/span><\/p>\n

SPLIT YOUR APPLICATION TIERS<\/span><\/h2>\n

\u00a0<\/b>This is by far the first step and probably the easiest one in terms of understanding how it can be achieved. When you start to break a monolith an easy win is to find areas that can be naturally decoupled like for example <\/span>front-end<\/b> and <\/span>back-end, <\/b>because ideally front-end must be only a consumer of API; a simple example is given by a Rails Application: the HTML pages are usually rendered from <\/span>.erb templates<\/b> filled with data <\/span>served by the Rails back-end<\/b> and the <\/span>content is highly coupled<\/b> with it. Creating a Single Page Application with Angular for example and make it communicate with a back-end <\/span>through APIs<\/b> naturally decouple the two application\u2019s tiers. This process is of course long in terms of development time but is very important so always strive to achieve it, and can be, by a certain degree, parallelized.<\/span><\/p>\n

For now, we can end here our analysis as we have seen pros of a microservice approach and how your team and in general your company must be prepared to start this process. Stay tuned for part 2 in which we will start describing step by step strategies to complete the migration from Monolith to a Microservices-ecosystem.<\/span><\/p>\n

See you, guys!<\/p>\n","protected":false},"excerpt":{"rendered":"

As applications grow in time, adding new features, with complex logic, many different interactions and coupling between components, it becomes […]<\/p>\n","protected":false},"author":6,"featured_media":1020,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[482],"tags":[310,306],"yoast_head":"\nBreak the Monolith into microservices like a pro: our guide to a (almost) seamless transition - Proud2beCloud Blog<\/title>\n<meta name=\"description\" content=\"Breaking down the Monoliths: a guide by our Cloud Experts for a seamless transition to microservices\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Break the Monolith into microservices like a pro\" \/>\n<meta property=\"og:description\" content=\"Breaking down the Monoliths: a guide by our Cloud Experts for a seamless transition to microservices\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/\" \/>\n<meta property=\"og:site_name\" content=\"Proud2beCloud Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-10-31T13:29:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-24T16:31:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.besharp.it\/wp-content\/uploads\/2019\/10\/blogharottoilcazzo-19.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1667\" \/>\n\t<meta property=\"og:image:height\" content=\"1251\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Alessandro Gaggia\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Break the Monolith into microservices like a pro\" \/>\n<meta name=\"twitter:description\" content=\"Breaking down the Monoliths: a guide by our Cloud Experts for a seamless transition to microservices\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/blog.besharp.it\/wp-content\/uploads\/2019\/10\/blogharottoilcazzo-19.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alessandro Gaggia\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/\",\"url\":\"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/\",\"name\":\"Break the Monolith into microservices like a pro: our guide to a (almost) seamless transition - Proud2beCloud Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.besharp.it\/#website\"},\"datePublished\":\"2019-10-31T13:29:37+00:00\",\"dateModified\":\"2021-03-24T16:31:13+00:00\",\"author\":{\"@id\":\"https:\/\/blog.besharp.it\/#\/schema\/person\/f27fc12d10867c6ea6e0158ce4dd8924\"},\"description\":\"Breaking down the Monoliths: a guide by our Cloud Experts for a seamless transition to microservices\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.besharp.it\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Break the Monolith into microservices like a pro: our guide to a (almost) seamless transition\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.besharp.it\/#website\",\"url\":\"https:\/\/blog.besharp.it\/\",\"name\":\"Proud2beCloud Blog\",\"description\":\"il blog di beSharp\",\"alternateName\":\"Proud2beCloud Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.besharp.it\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.besharp.it\/#\/schema\/person\/f27fc12d10867c6ea6e0158ce4dd8924\",\"name\":\"Alessandro Gaggia\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.besharp.it\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f58dc28050f26409e22ab60346d06220?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f58dc28050f26409e22ab60346d06220?s=96&d=mm&r=g\",\"caption\":\"Alessandro Gaggia\"},\"description\":\"Head of software development di beSharp, Full-Stack developer, mi occupo di garantire lo stato dell\u2019arte di tutta la nostra codebase. Scrivo codice in quasi ogni linguaggio, ma prediligo Typescript. Respiro Informatica, Game design, Cinema, Fumetti e buona cucina. Disegno per passione!\",\"url\":\"https:\/\/blog.besharp.it\/author\/alessandro-gaggia\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Break the Monolith into microservices like a pro: our guide to a (almost) seamless transition - Proud2beCloud Blog","description":"Breaking down the Monoliths: a guide by our Cloud Experts for a seamless transition to microservices","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/","og_locale":"en_US","og_type":"article","og_title":"Break the Monolith into microservices like a pro","og_description":"Breaking down the Monoliths: a guide by our Cloud Experts for a seamless transition to microservices","og_url":"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/","og_site_name":"Proud2beCloud Blog","article_published_time":"2019-10-31T13:29:37+00:00","article_modified_time":"2021-03-24T16:31:13+00:00","og_image":[{"width":1667,"height":1251,"url":"https:\/\/blog.besharp.it\/wp-content\/uploads\/2019\/10\/blogharottoilcazzo-19.png","type":"image\/png"}],"author":"Alessandro Gaggia","twitter_card":"summary_large_image","twitter_title":"Break the Monolith into microservices like a pro","twitter_description":"Breaking down the Monoliths: a guide by our Cloud Experts for a seamless transition to microservices","twitter_image":"https:\/\/blog.besharp.it\/wp-content\/uploads\/2019\/10\/blogharottoilcazzo-19.png","twitter_misc":{"Written by":"Alessandro Gaggia","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/","url":"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/","name":"Break the Monolith into microservices like a pro: our guide to a (almost) seamless transition - Proud2beCloud Blog","isPartOf":{"@id":"https:\/\/blog.besharp.it\/#website"},"datePublished":"2019-10-31T13:29:37+00:00","dateModified":"2021-03-24T16:31:13+00:00","author":{"@id":"https:\/\/blog.besharp.it\/#\/schema\/person\/f27fc12d10867c6ea6e0158ce4dd8924"},"description":"Breaking down the Monoliths: a guide by our Cloud Experts for a seamless transition to microservices","breadcrumb":{"@id":"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.besharp.it\/break-the-monolith-into-microservices-like-a-pro-our-guide-to-a-almost-seamless-transition\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.besharp.it\/"},{"@type":"ListItem","position":2,"name":"Break the Monolith into microservices like a pro: our guide to a (almost) seamless transition"}]},{"@type":"WebSite","@id":"https:\/\/blog.besharp.it\/#website","url":"https:\/\/blog.besharp.it\/","name":"Proud2beCloud Blog","description":"il blog di beSharp","alternateName":"Proud2beCloud Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.besharp.it\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.besharp.it\/#\/schema\/person\/f27fc12d10867c6ea6e0158ce4dd8924","name":"Alessandro Gaggia","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.besharp.it\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f58dc28050f26409e22ab60346d06220?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f58dc28050f26409e22ab60346d06220?s=96&d=mm&r=g","caption":"Alessandro Gaggia"},"description":"Head of software development di beSharp, Full-Stack developer, mi occupo di garantire lo stato dell\u2019arte di tutta la nostra codebase. Scrivo codice in quasi ogni linguaggio, ma prediligo Typescript. Respiro Informatica, Game design, Cinema, Fumetti e buona cucina. Disegno per passione!","url":"https:\/\/blog.besharp.it\/author\/alessandro-gaggia\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/posts\/1024"}],"collection":[{"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/comments?post=1024"}],"version-history":[{"count":0,"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/posts\/1024\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/media\/1020"}],"wp:attachment":[{"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/media?parent=1024"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/categories?post=1024"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.besharp.it\/wp-json\/wp\/v2\/tags?post=1024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}