{"componentChunkName":"component---src-templates-blog-template-js","path":"/blog/2021-04-01-building-microservicies-by-sam-newman","result":{"data":{"markdownRemark":{"html":"<h1>Building Microservicies - PERSONAL NOTES</h1>\n<p>by Sam Newman O'Reilly Publication</p>\n<h2>Preface</h2>\n<p>Microservices are an approach to distributed systems that promote the use of finely grained servicies with their own lifecycles, which collaborate together.</p>\n<h2>1) Microservices</h2>\n<p>Microservices are small, autonomous servicies that work together.</p>\n<h3>Small, Focused on Doing One Thing Well</h3>\n<p>Cohesion - the drive to have related code grouped together.\nHow small? <strong>Small enough and no smaller</strong>.\nThe smaller the service, the more you maximize the benefits and downsides of microservice architectures.</p>\n<h3>Autonomous</h3>\n<p>It might be deployed as an isolated service on a platform as a service (PAAS), or it might be its own operating system process. We try to avoid packing multiple services onto the same machine.\nTIGHT COUPLING -> Depends on each other!</p>\n<h3>Key Benefits</h3>\n<h4>Technology Heterogeneity</h4>\n<p>With a system composed of multiple, collaborating services, we can decide to use different technologies inside each one. Pick the right tool for each job.\nOne example I liked was a social applicaiton:</p>\n<ul>\n<li>Ruby for Posts with a Document based DB (like MongoDB).</li>\n<li>Golang for Friends with a GraphDB.</li>\n<li>Java for Pictures with blob storage.</li>\n</ul>\n<h4>Resilience</h4>\n<h4>Scaling</h4>\n<p>We can just scale those services that need scaling, allowing is to run other parts of the system on smaller, less powerful hardware.</p>\n<h4>Ease of Deployment</h4>\n<p>With microservices, we can make a cgange to a single service and deploy it independently of the rest of the system. Code is deployed faster. If a problem occur, it can be isolated quickly to an individual service, making fast rollback easy to achive. New functionality out to customers faster.</p>\n<h4>Organizational Alignment</h4>\n<p>This has to do with teams.</p>\n<h4>Composability</h4>\n<p>The reuse of functionality. With microservices, we allow for our functionality to be consumed in different ways for different purposes.</p>\n<h4>Optimizing for Replaceability</h4>\n<p>Small applications are faster to re-write.</p>\n<h3>What about Service-Oriented Architecture?</h3>\n<p>SOA is a design approach we multiple services colaborate to proide some end set of capabilities (its somehow similar to Microservice architecture). It is an approach that aims to promote the reusability of sotware; two or more end-user applications, for example, could both use the sane services.\nSOA doesn't touch all points which microservices do, like how big is to big.</p>\n<h2>2) The Evolutionary Architect</h2>\n<p>Architects have a joined-up technical vision. Somehow this term has been adopted in the Computer Science world. Sotware Architect.</p>\n<h3>An Evolutionary Vision for the Architect</h3>\n<ul>\n<li>Focus on helping create a FRAMEWORK in which the right systems can emerge, and continue to grow as we learn more.</li>\n<li>Look at the multitude of sources of information, and then attempt to optimize the layout of a city (comparison with network) to best suit the needs of the citizens (users) today, taking into account future use.</li>\n</ul>\n<h3>Zones</h3>\n<p>Zones? These are our service boundaries, or perhaps coarse-grained group of services. Architects worry less about what happens inside the zone than what happens <strong>between</strong> zones. \"Be worried about that happens between the boxes, and be liberal in what happens inside.</p>\n<h3>A Principled Approach</h3>\n<p>\"Rules are for the obedience of fools and the guidance of wise men\" - maybe Doublas Bader.\nStrategic Goals -> Principles -> Practices</p>\n<p>In this chapter the author goes on and on about standards for architects to follow by monitoring, setting interfaces, thinking about safety, implementing Governance, creating templates and more points in order to stablish a framework under which development can be done. Is more about team, but it follows the ideas above.</p>","frontmatter":{"date":"February 01, 2021","slug":"/blog/2021-04-01-building-microservicies-by-sam-newman","title":"Building Microservices by Sam Newman"}}},"pageContext":{"slug":"/blog/2021-04-01-building-microservicies-by-sam-newman"}},"staticQueryHashes":[]}