<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>liotier</author><text>&amp;gt; Microservices are advertised as a means to modularization, but it&amp;#x27;s what programming language modules are for - they are defined on source code level and can be freely used in different runtime components without network&amp;#x2F;ops&amp;#x2F;version-management headaches. When you have your module defined that way, you can think of exposing it as a microservice because this may make sense for your use case.&lt;p&gt;Yes yes yes ! If your architecture and data model are funked up, then it doesn&amp;#x27;t matter how you implement them - you are screwed. On the other hand, proper modeling with separation-of-concern and well-defined interfaces will let you implement as anything you need, be it microservices or function calls inside a monolith.</text><parent_chain><item><author>aartur</author><text>Microservices are advertised as a means to modularization, but it&amp;#x27;s what programming language modules are for - they are defined on source code level and can be freely used in different runtime components without network&amp;#x2F;ops&amp;#x2F;version-management headaches. When you have your module defined that way, you can think of exposing it as a microservice because this may make sense for your use case.&lt;p&gt;Imagine that each Python module runs as a microservice. For many modules this would lead to huge performance degradation, for example a regexp module can be called thousands times per second, the running time of a call is usually short and replacing an in-process call with a network call will give 100-1000x slowdown.&lt;p&gt;But if you take a different use case of the same module - complex regexps running on large texts, potentially causing out-of-memory errors, then packing the module into a microservice can make sense - separate processes can have large caches, an out-of-memory error terminates an instance of a microservice only and not the calling process.&lt;p&gt;Generally I think the advice should be to always use source code modules in the first place, and create microservices using these modules for specific use cases only involving runtime needs like caching, fault tolerance, scalability.</text></item></parent_chain></comment><story><title>The microservices cargo cult</title><url>http://www.stavros.io/posts/microservices-cargo-cult/</url></story>
<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>StavrosK</author><text>Very true, but I&amp;#x27;ve heard modularization touted as a benefit of microservices many times, as if it&amp;#x27;s exclusive. You can get modularization as a first-class feature in your favorite language, and almost for free!</text><parent_chain><item><author>aartur</author><text>Microservices are advertised as a means to modularization, but it&amp;#x27;s what programming language modules are for - they are defined on source code level and can be freely used in different runtime components without network&amp;#x2F;ops&amp;#x2F;version-management headaches. When you have your module defined that way, you can think of exposing it as a microservice because this may make sense for your use case.&lt;p&gt;Imagine that each Python module runs as a microservice. For many modules this would lead to huge performance degradation, for example a regexp module can be called thousands times per second, the running time of a call is usually short and replacing an in-process call with a network call will give 100-1000x slowdown.&lt;p&gt;But if you take a different use case of the same module - complex regexps running on large texts, potentially causing out-of-memory errors, then packing the module into a microservice can make sense - separate processes can have large caches, an out-of-memory error terminates an instance of a microservice only and not the calling process.&lt;p&gt;Generally I think the advice should be to always use source code modules in the first place, and create microservices using these modules for specific use cases only involving runtime needs like caching, fault tolerance, scalability.</text></item></parent_chain></comment><story><title>The microservices cargo cult</title><url>http://www.stavros.io/posts/microservices-cargo-cult/</url></story>