TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Modules, not microservices

1073 点作者 PretzelFisch超过 2 年前

87 条评论

barrkel超过 2 年前
Microservices, while often sold as solving a technical problem, usually actually solve for a human problem in scaling up an organization.<p>There&#x27;s two technical problems that microservices purport to solve: modularization (separation of concerns, hiding implementation, document interface and all that good stuff) and scalability (being able to increase the amount of compute, memory and IO to the specific modules that need it).<p>The first problem, modules, can be solved at the language level. Modules can do that job, and that&#x27;s the point of this blog post.<p>The second problem, scalability, is harder to solve at the language level in most languages outside those designed to be run in a distributed environment. But most people need it a lot less than they think. Normally the database is your bottleneck and if you keep your application server stateless, you can just run lots of them; the database can eventually be a bottleneck, but you can scale up databases <i>a lot</i>.<p>The real reason that microservices may make sense is because they keep people honest around module boundaries. They make it much harder to retain access to persistent in-memory state, harder to navigate object graphs to take dependencies on things they shouldn&#x27;t, harder to create PRs with complex changes on either side of a module boundary without a conversation about designing for change and future proofing. Code ownership by teams is something you need as an organization scales, if only to reduce the amount of context switching that developers need to do if treated as fully fungible; owning a service is more defensible than owning a module, since the team will own release schedules and quality gating.<p>I&#x27;m not so positive on every microservice maintaining its own copy of state, potentially with its own separate data store. I think that usually adds more ongoing complexity in synchronization than it saves by isolating schemas. A better rule is for one service to own writes for a table, and other services can only read that table, and maybe even then not all columns or all non-owned tables. Problems with state synchronization are one of the most common failure modes in distributed applications, where queues get backed up, retries of &quot;bad&quot; events cause blockages and so on.
评论 #34234790 未加载
评论 #34231532 未加载
评论 #34232952 未加载
评论 #34236212 未加载
评论 #34231660 未加载
评论 #34231113 未加载
评论 #34231126 未加载
评论 #34231466 未加载
评论 #34232656 未加载
评论 #34237677 未加载
评论 #34231733 未加载
评论 #34237725 未加载
评论 #34232184 未加载
评论 #34232817 未加载
评论 #34232191 未加载
评论 #34231847 未加载
评论 #34234146 未加载
评论 #34241952 未加载
评论 #34243643 未加载
评论 #34231222 未加载
评论 #34232449 未加载
评论 #34232472 未加载
评论 #34236052 未加载
评论 #34239236 未加载
评论 #34235432 未加载
评论 #34237080 未加载
评论 #34231638 未加载
评论 #34237089 未加载
评论 #34234822 未加载
评论 #34232423 未加载
c-fe超过 2 年前
I am working on a project that uses a microservice architecture to make the individual components scalable and separate the concerns. However one of the unexpected consequences is that we are now doing a lot of network calls between these microservices, and this has actually become the main speed bottleneck for our program, especially since some of these services are not even in the same data center. We are now attempting to solve this with caches and doing batch requests, but all of this created additional overhead that could have all been avoided by not using microservices.<p>This experience has strongly impacted my view of microservices and for all personal projects I will develop in the future I will stick with a monolith until much later instead of starting with microservices.
评论 #34231658 未加载
评论 #34231087 未加载
评论 #34231128 未加载
评论 #34238093 未加载
评论 #34231053 未加载
评论 #34231640 未加载
评论 #34232166 未加载
评论 #34231153 未加载
评论 #34231177 未加载
评论 #34235378 未加载
评论 #34231121 未加载
评论 #34231119 未加载
评论 #34242144 未加载
评论 #34231267 未加载
评论 #34231564 未加载
评论 #34236859 未加载
评论 #34245159 未加载
评论 #34231939 未加载
gunnarmorling超过 2 年前
I really like modular designs, but this article is missing some key limitations of monolithic applications, also if they are really well modularized (this is written mostly from the perspective of a Java developer):<p>* they force alignment on one language or at least runtime<p>* they force alignment of dependencies and their versions (yes, you can have different versions e.g. via Java classloaders, but that&#x27;s getting tricky quickly, you can&#x27;t share them across module boundaries, etc.)<p>* they can require lots of RAM if you have many modules with many classes (semi-related fun fact: I remember a situation where we hit the maximum number of class files a JAR could have you loaded into WebLogic)<p>* they can be slow to start (again, classloading takes time)<p>* they may be limiting in terms of technology choice (you probably don&#x27;t want ot have connections to an RDBMS and Neo4j and MongoDB in one process)<p>* they don&#x27;t provide resource isolation between components: a busy loop in one module eating up lots of CPU? Bad luck for other modules.<p>* they take long to rebuild an redeploy, unless you apply a large degree of discipline and engineering excellence to only rebuild changed modules while making sure no API contracts are broken<p>* they can be hard to test (how does DB set-up of that other team&#x27;s component work again?)<p>I am not saying that most of these issues cannot be overcome; to the contrary, I would love to see monoliths being built in a way where these problems don&#x27;t exist. I&#x27;ve worked on massive monoliths which were extremely well modularized. Those practical issues above were what was killing productivity and developer joy in these contexts.<p>Let&#x27;s not pretend large monoliths don&#x27;t pose specific challenges and folks moved to microservices for the last 15 years without good reason.
评论 #34235159 未加载
评论 #34232752 未加载
评论 #34234218 未加载
评论 #34238151 未加载
评论 #34234362 未加载
评论 #34232855 未加载
评论 #34244023 未加载
surprisetalk超过 2 年前
I suspect that most people would be better off favoring inlined code over modules and microservices.<p>It&#x27;s okay to not organize your code. It&#x27;s okay to have files with 10,000 lines. It&#x27;s okay not to put &quot;business logic&quot; in a special place. It&#x27;s okay to make merge conflicts.<p>The overhead devs spend worrying about code organization may vastly exceed the amount of time floundering with messy programs.<p>Microservices aren&#x27;t free, and neither are modules.<p>[1] Jonathan Blow rant: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=5Nc68IdNKdg&amp;t=364s">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=5Nc68IdNKdg&amp;t=364s</a><p>[2] Jon Carmack rant: <a href="http:&#x2F;&#x2F;number-none.com&#x2F;blow&#x2F;john_carmack_on_inlined_code.html" rel="nofollow">http:&#x2F;&#x2F;number-none.com&#x2F;blow&#x2F;john_carmack_on_inlined_code.htm...</a>
评论 #34230928 未加载
评论 #34230894 未加载
评论 #34230825 未加载
评论 #34230840 未加载
评论 #34230911 未加载
评论 #34230846 未加载
评论 #34230910 未加载
评论 #34230936 未加载
评论 #34231014 未加载
评论 #34230836 未加载
评论 #34231669 未加载
评论 #34233276 未加载
评论 #34235781 未加载
评论 #34230782 未加载
评论 #34230931 未加载
评论 #34230878 未加载
评论 #34233119 未加载
评论 #34232554 未加载
评论 #34231166 未加载
评论 #34233267 未加载
评论 #34233025 未加载
评论 #34230816 未加载
评论 #34230805 未加载
Pamar超过 2 年前
The article above, and most if not all the comments I read right before posting this, seem to be very quiet about what I thought was one of the main &quot;distinctive elements&quot; of Microservices.<p>I.e. the idea that each microservice has direct access to its own, dedicated, maybe duplicated storage schema&#x2F;instance (or if it needs to know, for example, the country name for ISO code &quot;UK&quot; it is supposed to ... invoke another microservice that will provide the answer for this).<p>I always worked in pretty boring stuff like managing reservations for cruise ships, or planning production for the next six weeks in an automotive plant.<p>The idea of having a federation of services&#x2F;modules constantly cross-calling each other in order to just write &quot;Your cruise departs from Genova (Italy) at 12:15 on May 24th, 2023&quot; is not really a good fit for this kind of problems.<p>Maybe it is time to accept that not everyone has to work on the next version of Instagram and that Microservices are probably a good strategy... for a not really big subset of the problems we use computers for?
评论 #34231476 未加载
评论 #34231297 未加载
评论 #34231223 未加载
评论 #34232248 未加载
评论 #34231140 未加载
leidenfrost超过 2 年前
I think most criticisms around microservices are about good practices and skills beating microservices in theory.<p>And the virtue of microservices is that they create hard boundaries no matter your skill and seniority level. Any unsupervised junior will probably dissolve the module boundaries. But they can&#x27;t simply dissolve the hard boundary of having a service in another location.
评论 #34231394 未加载
评论 #34234696 未加载
评论 #34232197 未加载
评论 #34232122 未加载
评论 #34231991 未加载
评论 #34231686 未加载
Guid_NewGuid超过 2 年前
Time to throw the cat amongst the proverbial pigeons and start the year 2023 off with discord and disharmony.<p>Microservices are a solution to a problem. TDD is a solution to a problem, the same problem. Both are solutions that themselves create more, and worse, problems. Thanks to the hype driven nature of software development the blast radius of these &#x27;solutions&#x27; and their associated problems expands far beyond the people afflicted by the original problem.<p>That problem? Not using statically typed languages.<p>TDD attempts to reconstruct a compiler, poorly. And Microservices tries to reconstruct encapsulation and code structure, poorly. Maybe if you don&#x27;t use a language which gets hard to reason about beyond a few hundred lines you won&#x27;t need to keep teams and codebases below a certain size. Maybe if you can&#x27;t do all kinds of dynamic nonsense with no guardrails you don&#x27;t have to worry so much about all that code being in the same place. The emperor has no clothes, he never had.<p>Edit: to reduce the flame bait nature of the above a bit. Not in all cases, I&#x27;m sure there are a very few places and scales where microservices make sense. If you have one of those and you used this pattern correctly, that&#x27;s great.<p>And splitting out components as services is not always bad and can make a lot of sense. It&#x27;s the &quot;micro&quot; part of &quot;microservices&quot; that marks out this dreadful hype&#x2F;trend pattern I object to. It&#x27;s clearly a horrible hack to paper over the way dynamically typed codebases become much harder to reason about and maintain at scale. Adding a bunch of much harder problems (distributed transactions, networks, retries, distributed state, etc) in order to preserve teams sanity instead of just using tooling that can enforce some sense of order.
评论 #34233020 未加载
评论 #34232724 未加载
评论 #34232697 未加载
评论 #34234324 未加载
评论 #34232896 未加载
lucasyvas超过 2 年前
The biggest draw of microservices to those just adopting them is not scalability or separation of concerns, but independent deployability (move fast and deploy new features in a particular area unencumbered).<p>Good LUCK getting that property with a monolithic or modular system. QE can never be certain (and let&#x27;s be honest, they should be skeptical) that something modified in the same codebase as something else does not directly break another unrelated feature entirely. It makes their life very difficult when they can&#x27;t safely draw lines.<p>Two different &quot;modules&quot; sharing even a database when they have disparate concerns is just waiting to break.<p>There&#x27;s a lot of articles lately dumping on microservices and they&#x27;re all antiquated. News flash: there is no universal pattern that wins all the time.<p>Sometimes a monolith is better than modules is better than microservices. If you can&#x27;t tell which is better or you are convinced one is always better, the problem is with <i>you</i>, not the pattern.<p>Microservices net you a <i>lot</i> of advantages at the expense of way higher operational complexity. If you don&#x27;t think that trade off is worth it (totally fair), don&#x27;t use them.<p>Since we are talking about middleground, one I&#x27;d like to see one day is a deploy that puts all services in one &quot;pod&quot;, so they all talk over Unix socket and remove the network boundary. This allows you to have one deploy config, specify each version of each service separately and therefore deploy whenever you want. It doesn&#x27;t have the scalability part as much, but you could add the network boundary later.
评论 #34235488 未加载
PathOfEclipse超过 2 年前
As a performance geek, I like the idea of modules because, especially with languages with heavy runtimes like Java and .Net, packing more code into a single process brings with it some non-trivial performance benefits. And, of course, library calls can be 1000x cheaper than network calls! But there are also major downsides:<p>1. Deployment. Being able to deploy code rapidly and independently is lost when everything ships as a monolith.<p>2. Isolation. My process is GC-spiraling. Which team&#x27;s code change is responsible for it? Since the process is shared across teams, a perf bug from one team now impacts many teams.<p>3. Operational complexity. People working on the system have to deal with the the fact that many teams&#x27; modules are running in the same service. Debugging and troubleshooting gets harder. Logging and telemetry also tends to get more complicated.<p>4. Dependency coupling. Everyone has to use the exact same versions of everything and everyone has to upgrade in lockstep. You can work around this with module systems that allow dependency isolation, but IMO this tends to lead to its own complexity issues that make it not worthwhile.<p>5. Module API boundaries. In my experience, developers have an easier time handling service APIs than library APIs. The API surface area is smaller, and it&#x27;s more obvious that you need to handle backwards compatibility and how. There is also less opportunity to &quot;cheat&quot;, or break encapsulation, with service boundaries compared to library boundaries.<p>In practice, for dividing up code, libraries and modules are the less popular solution for server-side programming compared to services for good reasons. The downsides are not worth the upsides in most cases!
dist1ll超过 2 年前
This article is all over the place. The author acknowledges that microservices are about organizational clarity, then writes &quot;In theory, anyway&quot; without elaboration, and <i>then</i> goes on to talk about the latency impact of network-level IPC.<p>Why do we care about network latency, when we JUST established that microservices are about scaling large development teams? I have no problem with hackers ranting about slow, bloated and messy software architecture...but this is not the focus of discussion as presented in the article.<p>And then this conclusion:<p>&gt; The key is to establish that common architectural backplane with well-understood integration and communication conventions, whatever you want or need it to be.<p>...so, like gRPC over HTTP? Last time I checked, gRPC is pretty well understood from an integration perspective. Much better than Enterprise Java Beans from the last century. Isn&#x27;t this ironic? And where are the performance considerations for this backplane? Didn&#x27;t we criticize microservices before because they have substandard performance?
评论 #34232670 未加载
ilitirit超过 2 年前
There are two things that people often misunderstand about Microservices - there is no single definition about what they actually are, and -- arguably more importantly -- there exists no single rationale about why you would want to move to Microservice architecture in the first place.<p>Take for example Gartner&#x27;s definition:<p>&gt; A microservice is a service-oriented application component that is tightly scoped, strongly encapsulated, loosely coupled, independently deployable and independently scalable.<p>That&#x27;s not too controversial. But... as a team why and when would you want to implement something like this? Again, let&#x27;s ask Gartner. Here are excerpts from &quot;Should your Team be using Microservice Architectures?&quot;:<p>&gt; In fact, if you aren’t trying to implement a continuous delivery practice, you are better off using a more coarse-grained architectural model — what Gartner calls “Mesh App and Service Architecture” and “miniservices.”<p>&gt; If your software engineering team has already adopted miniservices and agile DevOps and continuous delivery practices, but you still aren’t able to achieve your software engineering cadence goals, then it may be time to adopt a microservices architecture.<p>For Gartner, the strength of Microservice Architecture lies in delivery cadence (and it shouldn&#x27;t even be the first thing you look at to achieve this). For another institution it could be something else. My point is that when people talk about things like Microservices they are often at cross-purposes.
mkl95超过 2 年前
I want modules that are highly decoupled. But it&#x27;s often more painful than extracting some API from a monolith and defining a message passing strategy, interfaces, etc.<p>Another way to put it is that teams that share parts of the same codebase introduce low level bugs that affect each other, and most organizations are clueless about preventing it and in some cases do not even detect it.
ChrisMarshallNY超过 2 年前
I&#x27;ve been doing modules for decades.<p>Part of the reason is that anything that leaves the application package increases the error potential exponentially.<p>Also, modules &quot;bottleneck&quot; functionality, and allow me to concentrate work into one portion of the codebase.<p>I&#x27;m in the middle of &quot;modularizing&quot; the app I&#x27;ve been developing for some time.<p>I found that a great deal of functionality was spread throughout the app, as it had been added &quot;incrementally,&quot; as we encountered issues and limitations.<p>The new module refines all that functionality into one discrete codebase. This allows us to be super-flexible with the actual UI (the module is basically the app &quot;engine&quot;).<p>We have a designer, proposing a UX, and I found myself saying &quot;no&quot; too often. These &quot;nos&quot; came from the limitations of the app structure.<p>I don&#x27;t like saying &quot;no,&quot; but I won&#x27;t make promises that I can&#x27;t keep.<p>BTW: The module encompasses interactions with two different servers. It&#x27;s just that I wrote those servers.
college_physics超过 2 年前
After scanning 300+ comments my conclusion is that not only there is no conclusion in this debate, there is no discernible framework that would help generate a conclusion<p>Most likely the question is not well defined in the first place.
评论 #34235433 未加载
jcadam超过 2 年前
As a senior software engineer, the most tiresome type of software dev to deal with is not the junior developer, it&#x27;s the highly opinionated intermediate-level dev. They say things like &quot;we&#x27;ll obviously build the system using modern microservices architecture using node.js&quot; before they even know the requirements.
评论 #34234330 未加载
评论 #34234887 未加载
hinkley超过 2 年前
&gt; At the heart of microservices, we often find...<p>&gt; ... the Fallacies of Distributed Computing.<p>I feel like I’m taking crazy pills, but at least I’m not the only one. I think the only reason this fallacy has survived so long this cycle is because we currently have a generation of network cards that is so fast that processes can’t keep up with them. Which is an architectural problem, possibly at the application layer, the kernel layer, or the motherboard design. Or maybe all three. When that gets fixed there will be a million consultants to show the way to migrate off of microservices because of the 8 Fallacies.
matt_s超过 2 年前
I think a lot of microservices are defined as separate apps and code repositories. This sounds good for initial build and deployment but the long term maintenance is the issue. Developers like the idea of independence of other teams writing parts of the overall solution but that trade-off can mean a lot of overhead in maintaining different code repositories of the same stack.<p>When a critical vulnerability comes out for whatever language you are using, you now have to patch, test and deploy X apps&#x2F;repos vs much fewer if they are consolidated repositories written modularly. Same can be said for library&#x2F;framework upgrades, breaking changes in versions, deprecated features, taking advantage of new features, etc.<p>Keeping the definition of runtimes as modular as the code can be instrumental in keeping a bunch of related modules&#x2F;features in one application&#x2F;repository. One way is with k8s deployments and init params where the app starts specific modules which then lends itself to be scaled differently. I&#x27;m sure there are home-grown ways to do this too without k8s.
vinay_ys超过 2 年前
This article builds up a bunch of straw man arguments based on what other people claimed in blog posts and then attacks them. In real world where micro services really made a difference, they enabled being more tolerant to a mix of different quality&#x2F;maturity&#x2F;velocity in different parts of the overall system and still keeping things as healthy as possible. If you have a monolithic execution binary that hosted all the logic code, then they all have to be of high quality or the entire thing can be taken down with one bad quality stuff. Having a mix of different quality&#x2F;maturity&#x2F;velocity in different parts of your systems is a business reality if your system is modeling a complex multi-pronged business that&#x27;s evolving and growing and maturing in different prongs with different timelines. If this core value prop isn&#x27;t needed, then probably you can solve your problems without micro services just as good or even better.
kovac超过 2 年前
I was initially quite enthusiastic about microservices as I saw Unix philosophy ingrained in it. Especially that each service would be lightweight and small. Instead, what I see is each service tending towards more complexity and code mass because people started adding more ideas to them like DDD. So, on top of the network and authentication code that now need to be added to each service, people started defining classes for each domain object, adding validation code and unit tests for them, layering each service like application, infrastructure, domain etc. Now we are building systems that are more complex both as individual services and aggregates. Much of that complexity does not serve any functional purpose and its utility is difficult to measure in other respects.<p>I&#x27;m glad that this post was written so that we can look at widely accepted ideas a little more critically.
tail_exchange超过 2 年前
I don&#x27;t think microservices are the answer to everything, but I don&#x27;t see how monoliths can keep up with developer velocity when an organization reaches thousands of developers.<p>Monoliths are way slower to deploy than microservices, and when you have hundreds or thousands of changes going out every day, this means lots of changes being bundled together in the same deployment, and as a consequence, lots of bugs. Having to stop a deployment and roll it back every time a defect is sent to production would just make the whoe thing completely undeployable.<p>Microservices have some additional operational overhead, but they do allow much faster deployments and rollbacks without affecting the whole org.<p>Maybe I am biased, but I would love an explanation from the monolith-evangelist crowd on how to keep a monolith able to deploy multiple times a day and capable of rolling back changes when people are pushing hundreds of PRs every day.
评论 #34235859 未加载
评论 #34236043 未加载
LeZuse超过 2 年前
There are so many misconceptions about what microservices are or what problems they are trying to solve. Most people don&#x27;t even experience the problems (yet or ever) they are meant to solve and they go straight to micro. 5 person teams making 5 services to power their product :faceplam:. A relatively simple b2b web application without any serious traffic also does not need microservices to handle its load.<p>People just read up on whatever seems to be the newest, coolest thing. The issue is that MS articles are usually coming from FAANG&#x2F;ex-FANNG. These companies are solving problems that 99% of others do not.<p>As engineers we should be looking for the most effective solutions to a given business problem. Sadly, I see engineers with senior&#x2F;staff titles just throwing cool tech terms&#x2F;libs around. Boring tech club ftw
评论 #34247639 未加载
danielovichdk超过 2 年前
I have done a lot of service development for what would be called microservices.<p>The article gets it right in ny opinion.<p>1. It has a lot to do with organisational constraints.<p>2. It has a lot to do with service boundaries. If services are chatty they should be coupled.<p>3. What a service does must be specified in regards to which data it takes in and what data it outputs. This data can and should be events.<p>4. Services should rely and work together based on messaging in terms of queues, topics, streams etc.<p>5. Services are often data enrichment services where one service enrich some data based on an event&#x2F;data.<p>6. You never test more than one service at a time.<p>7. Services should not share code which is vibrant or short lived in terms of being updated frequently.<p>8. Conquer and divide. Start by developing a small monolith for what you expect could be multiple service. Then divide the code. And divide it so each coming service own its own implementation as per not sharing code between them.<p>9. IaaS is important. You should be able to push deploy and a service is setup with all of its infrastructure dependencies.<p>10. Domain boundaries are important. Structure teams around them based in a certain capability. E.g. Customers, Bookings, Invoicing. Each team owns a capability and its underlying services.<p>11. Make it possible for other teams to read all your data. They might need it for something they are solving.<p>12. Don&#x27;t use kubernetes or any other orchestra unless you can&#x27;t it what you want with cloud provider paas. Kubernetes is a beast and will put you to the test.<p>13. Services will not solve your problems if you do not understand how things communicate, fail and recovers.<p>14. Everything is eventually consistent. The mindset around that will take time to cope with.<p>A lot more...
iddan超过 2 年前
Are there similar tools for modules like microservices for observability, discoverability and documentation? I&#x27;m thinking something like Backstage [1] that was featured on HN lately but for modules.<p>[1]: <a href="https:&#x2F;&#x2F;backstage.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;backstage.io&#x2F;</a>
onehair超过 2 年前
&gt; At the heart of microservices, we&#x27;re told we&#x27;ll find...<p>Well, in our +20 product teams with all serving different workflows for 3 different user types, the separate micro services are doing wonders for us for exactly the things you&#x27;ve listed.<p>My comment should just stop here to be honest.
revskill超过 2 年前
In theory microservice is cool. In practice, it&#x27;s not.<p>Microservice and modularity is orthogonal, it&#x27;s not the same.<p>Modularity is related to business concept, microservice is related to infrastructure concept.<p>For example, i could have a module A which is deployed into microservide A1 and A2. In this case, A is almost abstract concept.<p>And of course, i could deploy all modules A, B, C using 1 big service (monothlic).<p>Moreover, i could share one microservice X for all modules.<p>All confusion from microservice, is made from the misconception that microservice = module.<p>Worse, most of &quot;expert advice&quot; which i&#x27;ve learnt actually relate Domain Driven Design to Microservice. They&#x27;re not related, again.<p>Microservice to me, is to scale. Scale the infrastructure. Scale the team (management concept).
mypalmike超过 2 年前
I have to believe these anti-microservices articles tend to be written by people who just don&#x27;t need microservices, and maybe who also don&#x27;t have much experience applying them to useful effect. Amazon, cited in the article as an originator of the practice, is a perfect example of where microservices are virtually unavoidable and central to the success of the company. There is no way to Amazon could have been built on on a small number of monoliths. None.
ChicagoDave超过 2 年前
This article seems to have missed 16 years of event-based architectures, domain driven design, bound contexts, CQRS, and pretty much every reason we use microservices.
wodenokoto超过 2 年前
I’m surprised none of the big 3 cloud providers have come out with a cloud native language where modules or even classes gets deployed as micro services that scales horizontally.<p>Then you can have a mono repo that deploys to multiple micro services &#x2F; cloud functions &#x2F; lambdas as needed depending on code changes and programmers don’t have to worry about RPC or json when communicating between modules and can just call the damn function normally.
评论 #34230901 未加载
评论 #34230976 未加载
评论 #34231461 未加载
评论 #34231103 未加载
评论 #34230918 未加载
Zvez超过 2 年前
I didn&#x27;t get this article. It seems like it contains two things: 1. It was already invented before 2. All the wrong reasons why people decide to use microservices.<p>But author clearly avoided the real reasons why you actually need to split stuff into separate services: 1. Some processes shouldn&#x27;t be mixed in the same runtime. Simple example batch&#x2F;streaming vs &#x27;realtime&#x27;. Or important and not important. 2. Some things need different stack, runtimes, frameworks. And is much easier to separate them instead of trying to make them coexist.<p>And regarding &#x27;it was already in Simpsons&#x27; argument, I don&#x27;t think it should even be considered as argument. If you are old enough to remember EJB, you don&#x27;t need to be explained why it was a bad idea from the start. Why services built on EJB were never scalable or maintainable. So even if EJB claimed to cover the same features as microservices right now, I&#x27;m pretty sure EJB won&#x27;t be a framework of choice for anybody now.<p>Obviously considering microservices as the only _right_ solution is stupid. But same goes for pretty much any technology out there.
fennecfoxy超过 2 年前
Idk I feel like one of the benefits to uservices is isolation; not in design or architecture as many comments say, but isolation from one service affecting another.<p>If I run a monolith and one least-used module leaks memory real hard, the entire process crashes even though the most-used&#x2F;more important modules were fine.<p>Of course it&#x27;s possible to run modularised code such that they&#x27;re sandboxed&#x2F;resources are controlled - but at that point it&#x27;s like...isn&#x27;t this all the same concept? Managed monolith with modules vs microservices on something like k8s.<p>I feel like rather than microservices or modules or whatever we need a concept for a sliding context, from one function-&gt;one group of functions-&gt;one feature-&gt;one service-&gt;dependent services-&gt;all services-&gt;etc.<p>With an architecture like that it would surely be possible to run each higher tier of context in any way we wanted; as a monolith, containerised, as lambdas. And working on it would be a matter of isolating yourself to the context required to get your current task done.
评论 #34235038 未加载
ftlio超过 2 年前
On the subject of modules, I often recommend “Composite &#x2F; Structured Design” and&#x2F;or “Reliable Software Through Composite Design” by Glenford Myers.<p>It’s old. The examples are in PL&#x2F;I. But his framework for identifying “Functional Strength” and Data Coupling is something every developer should have. Keep in mind this is before functional programming and OOP.<p>I personally think it could be updated around his concepts of data homogeneity. Interfaces and first class functions are structures he didn&#x27;t have available to him, but don’t require any new categories on his end, which is to say his critique still seems solid.<p>Overall, most Best Practices stuff all seem either derivative of or superfluous to this guy just actually classifying modules by their boundaries and data.<p>I should note, I haven&#x27;t audited his design methodologies, which I&#x27;m sure are quite dated. His taxonomy concerning modules was enough for me.<p>&quot;The Art of Software Testing&quot; is another of his. I picked up his whole corpus concerning software on thriftbooks for like $20.
EGreg超过 2 年前
I also realized recently that PHP-FPM can just prefork a number of processes that equals N x (# of cores). And the OS scheduling and waking up threads on I&#x2F;O is fast enough that you don&#x27;t really need evented stuff at all. The advantages are that there are no memory leaks, there is isolation, one hung process doesn&#x27;t bring down the whole server, and you don&#x27;t have to rewrite your scripts to worry about sharing a process.<p>Having said that, if you want to eke out another 3x throughput improvement, then by all means, grab your OpenSwoole or ReactPHP or AMPHP and go to town. But PHP already has Fibers, while OpenSwoole still has coroutines. Oh yeah, and the try&#x2F;catch in OpenSwoole is broken so good luck catching stuff.<p><a href="https:&#x2F;&#x2F;twitter.com&#x2F;openswoole&#x2F;status&#x2F;1576948742909198337" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;openswoole&#x2F;status&#x2F;1576948742909198337</a>
dools超过 2 年前
In my experience of building stuff in a way that I guess you would describe as micro services, but purely by happenstance (ie. I didn’t set out to “do micro services”) at the heart of micro services are queues.<p>Queues are awesome, just use queues almost all the time and then either build micro services or don’t.
Sparkyte超过 2 年前
Answer is no.<p>It is about where the shoe fits. If you become too heavily dependent on modules you risk module incompatibility due to version changes. If you are not the maintainer of your dependent module you hold a lot of risk. You don&#x27;t get that with microservices.<p>If you focus too much on microservices you introduce virtualized bloat that adds too much complexity and complexities are bad.<p>Modules are like someone saying it is great to be monolithic. Noone should upright justify an overly complicated application or a monolithic one.<p>The solution is to build common modules that are maintainable. You follow that up with multi-container pods have them talk low level between each other.<p>Stricking that exact balance is what is needed not striking odd justifications for failed models. It is about, &quot;What does my application do?&quot; and answering with which design benefits it the most.
评论 #34237155 未加载
CraigJPerry超过 2 年前
You want to get away from sweeping generalisations because once the build&#x2F;test&#x2F;package&#x2F;deployment tax of a modules approach bites, you do want to go monorepo microservices - it’s free clawback of time wasted building and deploying all the parts of a huge system that you didn’t change in your PR.
评论 #34231075 未加载
lucasfcosta超过 2 年前
Couldn’t agree more.<p>The way I usually describe my preferred heuristic to decide between modules and microservices is:<p>If you need to deploy the different parts of your software individually, and there’s a cost of opportunity in simply adopting a release train approach, go for microservices.<p>Otherwise, isolated modules are enough in the vast majority of cases.
alkonaut超过 2 年前
The biggest appeal to me for microservices (which might be in the list in terms of &quot;maintainability&quot; but isn&#x27;t explicitly called out) is that it <i>enforces</i> the modularization. Yes I want modules. But no, I don&#x27;t have the discipline to actually keep a code base modular. Platforms and languages have evolved for rapid development and convenience, and realities for modularization that aren&#x27;t architectural, for example compilation units or deployment.<p>A failed lookup of a function is greeted by &quot;Do you want to import X so you can call foo()?&quot;. Having a battery of architectural unit tests or linters ensuring at module foo doesn&#x27;t use module bar feels like a crutch.<p>Now, it might seem like making microservices just to accomplish modularization seems like a massive overkill and sa huge overhead for what should be accomlished at the language level - and you&#x27;d be right.<p>But that leads to the second largest appeal, which is closely related. The one thing that kills software is the big ball of mud where you can&#x27;t <i>really</i> change that dependency, move to the next platform version or switch a database provider. Even in well-modularized code, you still share dependencies. You build all of it on react, or all the data is using Entity Framework or postgres. Because why not? Why would you want multiple hassles when one hassle is enough? But this really also means that when something is a poor fit for a new module, you shoehorn that module to use whatever all the other modules use (Postgres, Entity Framework, React...). With proper microservices, at least in theory you should be able to use multiple versions of the same frameworks, or different frameworks all together.<p>It should also be said that &quot;modules vs microservices&quot; is also a dichotomy that mostly applies in one niche of software development: Web&#x2F;SaaS development. Everywhere else, they blur into one and the same, but sometimes surfacing e.g. in a desktop app offloading some task to separate processes for stability or resource usage (like a language server in an IDE).
评论 #34232927 未加载
throwawaaarrgh超过 2 年前
Software architecture can be tailored to a specific use case to best fit an application. Rather than strictly align to some thereoreical design principle, one can consider the use case and end goals and make the architecture match it.<p>But in general,just write some damn code. Presumably you <i>have</i> to write code, because building a software engineering department is one of the most difficult things you can do in order to solve a business problem. Even with the smartest engineers in the world (which you don&#x27;t have), whatever you ship is inevitably going to end up an overly complex, expensive, bug-riddled maintenance nightmare, no matter what you do. Once you&#x27;ve made the decision to write code, just write the damn code, and plan to replace it every 3-5 years, because it probably will be anyway.
anankaie超过 2 年前
Ideally, What I want is the ability to decide later whether a particular call should be local, or RPC, and I should not have to care about any of it until I need to start scaling. I should also not need to specify locally what is going on - my reference infrastructure should handle turning the call into a jump-call or a net-call. Ideally, the fiber system that simulates multithreading for me should have an extensibility point that allows my RPC infrastructure to hook into it and &quot;do the right thing&quot; by treating RPC calls as the equivalent of cross-proc co-routines, especially if my OS lets me transparently share memory between two processes: In a way that would let me share pointers and modules across them.<p>Someday I will find a way to untangle this wishlist enough to turn into a design.
评论 #34231067 未加载
评论 #34231050 未加载
评论 #34231032 未加载
评论 #34230996 未加载
评论 #34231034 未加载
评论 #34231841 未加载
评论 #34230989 未加载
rglover超过 2 年前
The easiest approach I&#x27;ve found to this whole debate: start with a monolith, making notes about where you think a server is most likely to have bottlenecks.<p>Push the monolith to production, monitoring performance, and if and when performance spikes in an unpleasant way, &quot;offload&quot; the performance intensive work to a separate job server that&#x27;s vertically scaled (or a series of vertically scaled job servers that reference a synced work queue).<p>It&#x27;s simple, predictable, and insanely easy to maintain. Zero dependency on third party nightmare stacks, crazy configs, etc. Works well for 1 developer or several developers.<p>A quote I heard recently that I absolutely love (from a DIY construction guy, Jeff Thorman): &quot;everybody wants to solve a $100 problem with a $1000 solution.&quot;
评论 #34237943 未加载
bayesian_horse超过 2 年前
The only good reason to have a micro-service is so you don&#x27;t have to write and maintain it yourself.
ladyattis超过 2 年前
I think microservices are fine for businesses which have a general idea of how &#x27;big&#x27; things could get with respect to their platforms. But if you&#x27;re more in a company that has many one-off programs, scripts, and the like then maybe microservices aren&#x27;t a thing that you need. Better organization is good, but that shouldn&#x27;t be just a microservices thing, everyone benefits when you&#x27;ve organized not just individual projects and their source code but also just organizing what does what with external documents that can be updated to explain their purpose is useful. There&#x27;s nothing worse than looking at source code or an program by name only to ask, &quot;what is this thing?&quot;
EdSharkey超过 2 年前
It&#x27;s easy to crap on EJB, lots to disagree with, but vendors like WebLogic were trying to do interesting things with them when they were ascending. I recall they had a nifty feature where if you were trying to call a remote EJB and the container knew it was deployed locally, it would automatically do a cheaper local call instead of RMI. It was awkward as hell, but it did do that, and it was faster. J2EE also had the concept of people _roles_ as part of its prescribed SDLC, something we could benefit from exploring, especially the _deployer_ role.<p>Ideally we could flexibly deploy services&#x2F;components in the same way as WebLogic EJB. Discovery of where components live could be handled by the container and if services&#x2F;components were deployed locally to one another, calls would be done locally without hitting the TCP&#x2F;IP stack. I gather that systems like Kubernetes offer a lot of this kind of deployment flexibility&#x2F;discovery, but I&#x27;d like to see it driven down into the languages&#x2F;frameworks for maximum payoff.<p>Also, the right way to do microservices is for services to &quot;own&quot; all their own data and not call downstream services to get what they need. No n+1 problem allowed! This requires &quot;inverting the arrows&quot;&#x2F;&quot;don&#x27;t call me, I&#x27;ll call you&quot; and few organizations have architectures that work that way - hence the fallacies of networked computing reference. Again, the services language&#x2F;framework needs to prescribe ways of working that seamlessly establish (*and* can periodically&#x2F;on-demand rebroadcast) data feeds that our upstreams need so they don&#x27;t need to call us n+1-style.<p>Microservices are great to see, even with all the problems, they DO solve organizational scaling problems and let teams that hate each other work together productively. But, we have an industry immaturity problem with the architectures and software that is not in any big players&#x27; interest in solving because they like renting moar computers on the internet.<p>I have no actual solutions to offer, and there is no money in tools unless you are lucky and hellbent on succeeding like JetBrains.
btbuildem超过 2 年前
Yes, generally that&#x27;s what we want -- modularity. I think the article touches upon a key truth, that There is Nothing New Under the Sun -- we always deal with complexity and we always find the same ways of structuring our responses to it.<p>One thing I&#x27;ve observed in a microservice-heavy shop before was that there was the Preferred Language and the Preferred Best Practices and they were the same or very similar across the multiple teams responsible for different things. It lead to a curious phenomenon, where despite the architectural modularity, the overall SAAS solution built upon these services felt very monolithic. It seemed counter-productive, because it weakened the motivation to keep separation across boundaries.
ibejoeb超过 2 年前
100% true for certain classes of problem.<p>If I want to calculate the price of a stock option, that&#x27;s an excellent candidate to package into a module rather than to expose as a microservice. Even if I have to support different runtimes as presented in the article, it&#x27;s trivial.<p>A different class of problem that doesn&#x27;t modularize well, in shared library terms, is something with a significant timing component, or something with transient states. Perhaps I need to ingest some data, wait for some time, a process the data, and then continue. This is would likely benefit from being an isolated service, unless all of the other system components have similar infrastructure capabilities for time management and ephemeral storage.
kjcondon超过 2 年前
It&#x27;s not really about what&#x27;s better, it&#x27;s about whats been standardized upon.<p>I&#x27;m sure I could gain many of the advantages of microservices through an OSGi monolith, however, an OSGi monolith is not the hot thing of the day, I&#x27;m likely to be poorly supported if I go down this route.<p>Ideally I also want some of my developers to be able to write their server on the node ecosystem - if they so choose, and don&#x27;t want updating the language my modules run on (in this case the JVM) to be the biggest pain of the century.<p>Besides, once my MAU is in the hundreds of thousands, I probably want to scale the different parts of my system independently anyway - so different concerns come in to play.
danabrams超过 2 年前
This article nails it, but I still like microservices because I’ve yet to see a team doing a modular architecture in memory keep from creating a spaghetti mess of interdependence.<p>Yes, the same often happens in microservices, but the extra complexity of a distributed system provides a slightly stronger nudge to decouple that means some teams at the margin do achieve something modular.<p>I’m something of a skeptic on modular monoliths until we as an industry adopt practices that encourage decoupling more than we currently do.<p>Yes, in theory they’re the same as microservices, without the distributed complexity, but in practice, microservices provide slightly better friction&#x2F;incentives to decouple.
lowbloodsugar超过 2 年前
Modules vs Microservices, January 2023 edition<p>I&#x27;ve done monoliths and microservices. I&#x27;ve worked in startups, SMEs and at FAANGS. As usual, nothing in this article demonstrates that the person has significant experience of running either in production. They may have experience of <i>failure</i>.<p>In my experience, microservices are simply one possible scaling model for modules. Another way to scale a monolith is to just make the server bigger: the One Giant Server model.<p>If you have a fairly well defined product, that needs a small (&lt;30) number of engineers, then the One Giant Server model might be best for you. If you have a wide feature set, that requires &gt;50 engineers, then microservices is probably the way to go.<p>There is no noticeable transition from a well implemented monolith with a small team into a well implemented Giant Server with a small team. Possibly some engineers are worrying about cold start times for 1TB of RAM, but that&#x27;s something that can happen well ahead of time, and hardware qualification is something one needs to do for microservices too. Some of the best examples of Giant Servers are developed by small teams of very well paid developers.<p>The transition from a monolith to a set of microservices, however is a very different affair. Unfortunately, the kind of projects that need to go microservices are often in a very poor state. Many such adventures one reads about are having to go to microservices because they&#x27;ve already gone to One Giant Server and those are now unable to handle the load. Usually these stories are accompanied by a history of blog posts about moving fast and breaking things, yolo, or whatever is cool. The transition to microservices is difficult because there are no meaningful modules: no modules, or modules that all use each other&#x27;s classes and functions.<p>I don&#x27;t believe that, once a particular scale is reached, microservices are a choice. They are either required or they are not. Either you can scale successfully with One Giant Server, or you can&#x27;t.<p>The problem is that below a certain scale, microservices are a drag. And without microservices, it&#x27;s very easy for inexperienced teams to fail to keep module discipline.
game_the0ry超过 2 年前
I am a front end dev, so microservice architecture is not something I am super familiar with my day-to-day, but I occasionally do work in our back end project, which is a service-oriented java project. The project is broken down into different services, but they are aggregated in &quot;parent&quot; projects, where the parent declares the modules in the pom.xml (in the &quot;modules&quot; xml declaration).<p>I like that architecture - the services are abstracted with clearly defined boundaries and they are easy to navigate &#x2F; discover. Not sure if Java modules satisfy the concerns of the author or other HN users, but I liked it.
danias超过 2 年前
A benefit of microservices is that you can use specialised languages for different parts of the system. The core of your system might be written in Java but you might one to use Python for an ML heavy module. Nonetheless, I tend to agree that in an organisation with 100 microservices probably the ideal way would be to have 4 or 5 based on exceptions where you have modules that need a specific hardware profile (e.g. a lot of RAM) or a different programming language than your core system. Everything else could go into modules in a megaservice.
gillh超过 2 年前
While we are on the topic, I would like to point out that the decoupled nature of microservices is governed by queuing theory. Microservices are especially susceptible to positive feedback loops and cascading failures.<p>Going back to systems thinking, flow control (concurrency and rate limiting) and API scheduling (weighted fair queuing) are needed to make these architectures work at any scale. Open source projects such as Aperture[0] can help tackle some these issues.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;fluxninja&#x2F;aperture">https:&#x2F;&#x2F;github.com&#x2F;fluxninja&#x2F;aperture</a>
discussDev超过 2 年前
There is a time and place but as soon as you have a few teams that build thigns differently or someone wants to upgrade how things are done on a very big project you will wish you used services instead of modules.
bob1029超过 2 年前
We&#x27;ve done the round trip of splitting up a monolith into microservices and then going back the other way. Network API overhead being the biggest reason. This kind of hell is totally unnecessary until it <i>absolutely</i> is (i.e. hard information theory requirements demand you spread your app across more than 1 physical computer).<p>Monolith is better in almost every way. The only thing that still bothers us is the build&#x2F;iteration time. We could resolve this by breaking our gigantic dll into smaller ones that can be built more incrementally. This is on my list for 2023.
deterministic超过 2 年前
The worst software I have ever seen in my 30+ years career is a 20 years old micro-services system. Basically the worst spaghetti code you can imagine, distributed over 150+ micro-services.<p>I have worked on a monolith that solved the exact same problem. And it was straightforward to maintain and upgrade.<p>I feel sorry for future developers who will have to take over and maintain micro-services systems created today. Teams that can’t create maintainable, well designed monoliths, will create an even bigger cluster f** using micro-services.
UltraViolence超过 2 年前
Bring back the monoliths! Divided up into modules and each of those modules being developed by another team, but essentially still the same deliverable (binary).<p>You only need to agree on an API between the modules and you&#x27;re good to go!<p>Microservices suck dick and I hate the IT industry for jumping on this bandwagon (hype) without thoroughly discussing the benefits and drawbacks of the method. Debugging in itself is a pain with Microservices. Developing is a pain since you need n binaries running in your development environment.
sergiomattei超过 2 年前
You want Elixir and Erlang&#x2F;OTP process trees, not Microservices.
评论 #34230930 未加载
tabtab超过 2 年前
As a general rule of thumb, fully explore and exhaust your &quot;monolith&quot; options before you switch to Microservices. They quite often create more problems than they solve.
mcculley超过 2 年前
You don’t have to necessarily decide one way or the other. I have systems where the decision to put the module in the same process or to call it via RPC is done at runtime. Java’s dynamic proxies help with this, but it can be done in any language. The only downside is that one has to think about the size of messages crossing the API and that they need to be immutable values, not references to something in the process.
评论 #34231085 未加载
smrtinsert超过 2 年前
The best experience I&#x27;ve had with modular code in the java space was osgi. Very cool to be able to upload a new jar and have it start working just like that. Microservices and eda... not really a fan. Yes you can release faster but operationalizing is a massive nightmare to me. Of course one size doesn&#x27;t fit all but I&#x27;m pretty convinced this is only a popular solution for now.
imwillofficial超过 2 年前
Nah, I want micro services. Not everyone does however.
qaq超过 2 年前
The original hard limitation was DBMS did not scale horizontally. This is no longer the case so for 90+% of use cases monolith is fine.
pshirshov超过 2 年前
Right.<p>We delivered many talks on that subject and implemented an ultimate tool for that: <a href="https:&#x2F;&#x2F;github.com&#x2F;7mind&#x2F;izumi">https:&#x2F;&#x2F;github.com&#x2F;7mind&#x2F;izumi</a> (the links to the talks are in the readme).<p>The library is for Scala, though all the principles may be reused in virtually any environment.<p>One of the notable mainstream (but dated) approaches is OSGi.
maxrev17超过 2 年前
I&#x27;ve sadly never seen micros achieve the purported benefits. All I&#x27;ve seen is problems. Monolith, or a set of distinct systems which are owned by teams with little to no blur (just agreed contracts), anything else gets painfully messy and you&#x27;d have been better with code modules.
michaelfeathers超过 2 年前
Microservices might be a hack to gain modularity when nothing else works.<p><a href="https:&#x2F;&#x2F;michaelfeathers.silvrback.com&#x2F;microservices-and-the-failure-of-encapsulaton" rel="nofollow">https:&#x2F;&#x2F;michaelfeathers.silvrback.com&#x2F;microservices-and-the-...</a>
banq超过 2 年前
Microservices is a different perspective than modules, there is a business perspective, referencing DDD; there is a data perspective; there is also an operations and maintenance perspective; there is also a technical architecture perspective
fedeb95超过 2 年前
If the same thing is said about A and B, it is not guaranteed that A=B, unless that thing specifies equality. Anyway I agree with the article that microservices are basically modules. They extend the domain of modules. They&#x27;re usually overhyped.
techthumb超过 2 年前
Transaction boundaries are a critical aspect of a system.<p>I&#x27;ve often noticed that these boundaries are not considered when carving out microservices.<p>Subsequently, workarounds are put in place that tend to be complicated as they attempt to implement two phase commits.
jhoelzel超过 2 年前
ah come on, there is a reason why we start most estimates with &quot;it depends&quot;.<p>It&#x27;s on the same page as &quot;yes, we could have written this in assembler better&quot; or &quot;this could simply be a daemon, why is it a container?&quot;<p>As if an agile, gitops based, rootlessly built, microservice oriented, worldwide clustered app will magially solve all your problems :D<p>If i learned anything it&#x27;s to expect problems and build a stack that is dynamic enough to react. And that any modern stack includes the people managing it just as much as the code.<p>But yes, back when ASP.NET MVC came out i too wanted to rebuild the world using c# modules.
d--b超过 2 年前
This is the usual: &quot;don&#x27;t use a one size fits all solution, sometimes microservices are good, sometimes they&#x27;re bad. Just be smart and think about why you&#x27;re doing things before doing them&quot;.
newbieuser超过 2 年前
The maintenance cost is a debt that must be paid by all means. and microservices may be the cleanest solution if there are teams that develop businesses completely independent of each other.
ndemir超过 2 年前
Unfortunately, people keep forgetting that microservice also requires organizational change. Otherwise, it&#x27;s just a heavy overhead.
jpswade超过 2 年前
A tail as old as time…<p><a href="https:&#x2F;&#x2F;martinfowler.com&#x2F;ieeeSoftware&#x2F;coupling.pdf" rel="nofollow">https:&#x2F;&#x2F;martinfowler.com&#x2F;ieeeSoftware&#x2F;coupling.pdf</a>
martythemaniak超过 2 年前
You know what&#x27;s missing from all microservices discussions? An actual definition. At what point does a microservice stop being micro? 5kloc of python equivalent? 10k? 25k?
AcerbicZero超过 2 年前
Wear shoes that fit; not shoes you think you&#x27;ll grow into.
评论 #34235216 未加载
z3t4超过 2 年前
Microservices are an optimization. Do not premature optimize.
ascendantlogic超过 2 年前
How about &quot;Architecture decisions based on the needs of our company, and by extension our software, not blog posts from Hacker News&quot;
BulgarianIdiot超过 2 年前
What I want is modules that I can instantly convert to services without changing any code using the module.<p>And this is how I work all the time.
codesnik超过 2 年前
I usually say that microservices are a good concept. Do everything to enable the split of your monolith, then ..don&#x27;t.
jimmont超过 2 年前
Layers, Not Modules, Not Microservices Like donkeys, onions, caching, networking, my feelings and perceptions.
heavenlyblue超过 2 年前
Modules can not constrain resource boundaries, microservices can. This is often overlooked.
jmartrican超过 2 年前
Monoliths r hard. Microservices r hard. Pick your poison and get good.
HardlyCurious超过 2 年前
Perhaps we should coin the phase &#x27;embedded microservices&#x27;.
boricj超过 2 年前
I&#x27;ve been thinking for a while about how to architecture systems and I wonder if perhaps we could generalize something like Fuchsia&#x27;s device driver stack design [1] for arbitrary systems and eliminate this monolithic vs microservice applications debate altogether.<p>In Fuchsia, the device driver stack can be roughly split into three layers:<p>* Drivers, which are components (~ libraries with added metadata) that both ingest and expose capabilities,<p>* A capability-oriented IPC layer that works both inside and across processes,<p>* Driver hosts, which are processes that host driver instances.<p>The system then has the mechanism to realize a device driver graph by creating device driver instances and connecting them together through the IPC layer. What is interesting however is that there&#x27;s also a policy that describes how the system should create boundaries between device driver instances [2].<p>For example, the system could have a policy where everything is instantiated inside the same driver host to maximize performance by eliminating inter-process communication and context switches, or where every device driver is instantiated into its own dedicated driver host to increase security through process isolation, or some middle ground compromise depending on security vs performance concerns.<p>For me, it feels like the Docker-like containerization paradigm is essentially an extension of good old user processes and IPC that stops at the process boundary, without any concern about what&#x27;s going on inside it. It&#x27;s like stacking premade Lego sets together into an application. What if we could start from raw Lego bricks instead and let an external policy dictate how to assemble them at run-time into a monolithic application running on a single server, micro-services distributed across the world or whatever hybrid architecture we want, with these bricks being none the wiser?<p>Heck, if we decomposed operating systems into those bricks, we could even imagine policies that would also enable composing from the ground up, with applications sitting on top of unikernels, microkernels or whatever hybrid we desire...<p>[1] <a href="https:&#x2F;&#x2F;fuchsia.dev&#x2F;fuchsia-src&#x2F;development&#x2F;drivers&#x2F;concepts&#x2F;device_driver_model&#x2F;protocol#process_protocol_mapping" rel="nofollow">https:&#x2F;&#x2F;fuchsia.dev&#x2F;fuchsia-src&#x2F;development&#x2F;drivers&#x2F;concepts...</a><p>[2] <a href="https:&#x2F;&#x2F;fuchsia.dev&#x2F;fuchsia-src&#x2F;development&#x2F;drivers&#x2F;concepts&#x2F;device_driver_model&#x2F;device-model#devices_drivers_and_driver_hosts" rel="nofollow">https:&#x2F;&#x2F;fuchsia.dev&#x2F;fuchsia-src&#x2F;development&#x2F;drivers&#x2F;concepts...</a>
hgsgm超过 2 年前
How do I horizontally scale my modules across multiple machines? How do I release a new version of my module without waiting for hundreds of other teams to all fix their bugs? .99^100^365 is a very small number.
评论 #34230947 未加载
评论 #34233363 未加载
exabrial超过 2 年前
Microservices are one of the many AbstractAdapterVistorFactories of this generation of programmers.<p>Just because you can, doesn&#x27;t mean you should.
pulse7超过 2 年前
So the time has come that people FINALLY see this! Modules! Inside! A! Monolith! Monolith is dead! Long live the monolith!
orose_超过 2 年前
Conway&#x27;s law