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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

The New Three-Tier Application

81 点作者 qianli_cs大约 2 个月前

21 条评论

davedx大约 2 个月前
I think people in this industry make using complicated, powerful paradigms part of their identity. They don’t feel like they’re important unless they’re reaching for N-tier architecture or exotic databases or lambdas or whatever else it is.<p>Most apps I’ve worked on could have been a monolith on postgres but they never ever are as soon as I’m not the sole engineer.
评论 #43446425 未加载
localghost3000大约 2 个月前
It took me a bit to realize the author is selling me something. I guess good job there sir.<p>I’ve built a bunch of distributed architectures. In every case I did, we would have been better served with a monolith architecture and a single relational DB like Postgres. In fact I’ve only worked on one system that had the kind of scale that would justify the additional complexity of a distributed architecture. Ironically that system was a monolith with Postgres.
评论 #43447368 未加载
评论 #43455569 未加载
评论 #43451291 未加载
评论 #43447381 未加载
geophile大约 2 个月前
Orchestration tier. Oy.<p>So something goes wrong, and you need to back out an update to one of your microservices. But that back-out attempt goes wrong. Or happens after real-world actions have been based on that update you need to back out. Or the problem that caused a backout was transient, everything turns out to be fine, but now your backout is making its way across the microservices. Backout the backout? What if <i>that</i> goes wrong? The &quot;or&quot;s never end.<p>Just use a centralized relational database, use transactions, and be done with it. People not understanding what can go wrong, and how RDB transactions can deal with a vast subset of those problems -- that&#x27;s like the 21st century version of how to safely use memory in C.<p>Yes, of course, centralized RDBs with transactions are sometimes the wrong answer, due to scale, or genuinely non-atomic update requirements, or transactions spanning multiple existing systems. But I have the sense that they are often rejected for nonsensical reasons, or not even considered at all.
评论 #43446780 未加载
ptx大约 2 个月前
&gt; <i>In the beginning (that is, the 90’s), developers created the three-tier application. [...] Of course, application architecture has evolved greatly since the 90&#x27;s. [...] This complexity has created a new problem for application developers: how to coordinate operations in a distributed backend? For example: How to atomically perform a set of operations in multiple services, so that all happen or none do?</i><p>This doesn&#x27;t seem like a correct description of events. Distributed systems existed in the 90s and there was e.g. Microsoft Transaction Server [0] which was intended to do exactly this. It&#x27;s not a new problem.<p>And the article concludes:<p>&gt; <i>This manages the complexity of a distributed world, bringing the complexity of a microservice RPC call or third-party API call closer to that of a regular function call.</i><p>Ah, just like DCOM [1] then, just like in the 90s.<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Microsoft_Transaction_Server" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Microsoft_Transaction_Server</a><p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Distributed_Component_Object_Model" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Distributed_Component_Object_M...</a>
评论 #43447236 未加载
mmastrac大约 2 个月前
Company hawking an orchestrating backend server says you should use an orchestrating backend server?<p>You still have four layers, it&#x27;s just that one is hidden with annotations.
评论 #43446187 未加载
dventimi大约 2 个月前
<i>&quot;In the beginning (that is, the 90’s), developers created the three-tier application. Per Martin Fowler, these tiers were the data source tier, managing persistent data, the domain tier, implementing the application’s primary business logic, and the presentation tier, handling the interaction between the user and the software. The motivation for this separation is as relevant today as it was then: to improve modularity and allow different components of the system to be developed relatively independently.&quot;</i><p>Immediately, I see problems. Martin Fowler&#x27;s &quot;Patterns of Enterprise Application Architecture&quot; was first published in 2002, a year that I think most people will agree was not in &quot;the 90&#x27;s.&quot; Also, <i>was</i> that the motivation? Are we sure? Who had that motivation? Were there any other motivations at play?
评论 #43445869 未加载
bazizbaziz大约 2 个月前
Workflows&#x2F;orchestration&#x2F;reconciliation-loops are basically table stakes for any service that is solving significant problems for customers. You might think you don&#x27;t need this, but when you start needing to run async jobs in response to customer requests, you will always eventually implement one of the above solutions.<p>IMO the next big improvement in this space is improving the authoring experience. In short, when it comes to workflows, we are basically still writing assembly code.<p>Writing workflows today is done in either a totally separate language (StepFunctions), function-level annotations (Temporal, DBOS, etc), or event&#x2F;reconciliation loops that read state from the DB&#x2F;queue. In all cases, devs must manually determine when state should be written back to the persistence layer. This adds a level of complexity most devs aren&#x27;t used to and shouldn&#x27;t have to reason about.<p>Personally, I think the ideal here is writing code in any structure the language supports, and having the language runtime automatically persist program state at appropriate times. The runtime should understand when persistence is needed (i.e. which API calls are idempotent and for how long) and commit the intermediate state accordingly.
评论 #43456091 未加载
itsthecourier大约 2 个月前
bought a ten years old company, a division of a public company, some million dollars.<p>got an overly complex, over 30 micro services architecture, over usd20k in monthly cloud fees.<p>rewrote the thing into a monolith in 6 months. reduced development team in half, costs of servers by 80-90%, latency by over 60%<p>newer is not better. each micro service must be born from a real necessity out of usage stats, server stats, cost analisis. not by default following tutorials.
评论 #43445773 未加载
评论 #43445889 未加载
评论 #43447301 未加载
评论 #43445788 未加载
recursivedoubts大约 2 个月前
Every day we stray further from God’s light.
评论 #43445952 未加载
评论 #43445597 未加载
politelemon大约 2 个月前
I haven&#x27;t noticed the same trend or evolution of application tiers, perhaps we live in different echo chambers. Teams using microsevices need to evaluate whether it&#x27;s still a good fit considering the inherent overhead it brings. Applying a bandaid solution on top of it, if it isn&#x27;t a good fit, only makes the problem worse.
评论 #43452345 未加载
recroad大约 2 个月前
I like building one-tier applications in Elixir.
xyst大约 2 个月前
_Maybe_ something like this is needed at GOOG or NFLX. But for most companies, this added complexity of an “orchestration tier” is unnecessary.
whilenot-dev大约 2 个月前
Following the <i>Getting Started</i>[0] section it seems like <i>DBOS</i> requires the configuration of a Postgres-compatible database[1] (NOTE: <i>DBOS currently only supports Postgres-compatible databases.</i>). Then, after decorating your application functions as workflow steps[2], you&#x27;ll basically run those workflows by spawning a bunch of worker threads[3] next to your application process.<p>Isn&#x27;t that a bit... unoptimized? The orchestrator domain doesn&#x27;t seem to be demanding on compute, so why aren&#x27;t they making proper use of <i>asyncio</i> here in the first place? And why aren&#x27;t they outsourcing their runtime to an independent process?<p>EDIT:<p>So &quot;To manage this complexity, we believe that any good solution to the orchestration problem should combine the orchestration and application tiers.&quot; (from the article) means that your application runtime will also become the orchestrator for its own workflow steps. Is that a good solution?<p>EDIT2:<p>Are they effectively just shifting any uptime responsibility (delivery guarantees included) to the application process?<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;dbos-inc&#x2F;dbos-transact-py&#x2F;tree&#x2F;a3bb7cb6dd53ec58ef4d96a4c9314a16391a0aa5#getting-started" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dbos-inc&#x2F;dbos-transact-py&#x2F;tree&#x2F;a3bb7cb6dd...</a><p>[1]: <a href="https:&#x2F;&#x2F;docs.dbos.dev&#x2F;python&#x2F;reference&#x2F;configuration#database" rel="nofollow">https:&#x2F;&#x2F;docs.dbos.dev&#x2F;python&#x2F;reference&#x2F;configuration#databas...</a><p>[2]: <a href="https:&#x2F;&#x2F;github.com&#x2F;dbos-inc&#x2F;dbos-transact-py&#x2F;blob&#x2F;a3bb7cb6dd53ec58ef4d96a4c9314a16391a0aa5&#x2F;dbos&#x2F;_core.py#L846" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dbos-inc&#x2F;dbos-transact-py&#x2F;blob&#x2F;a3bb7cb6dd...</a><p>[3]: <a href="https:&#x2F;&#x2F;github.com&#x2F;dbos-inc&#x2F;dbos-transact-py&#x2F;blob&#x2F;a3bb7cb6dd53ec58ef4d96a4c9314a16391a0aa5&#x2F;dbos&#x2F;_dbos.py#L784" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dbos-inc&#x2F;dbos-transact-py&#x2F;blob&#x2F;a3bb7cb6dd...</a>
评论 #43448495 未加载
ape4大约 2 个月前
Just mentioning MVC (Model-View-Controller) <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Glossary&#x2F;MVC" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Glossary&#x2F;MVC</a>
mrkeen大约 2 个月前
&gt; By persisting execution state to a database, a lightweight library can fulfill the primary goal of an orchestration system: guaranteeing code executes correctly despite failures. If a program fails, the library can look up its state in Postgres to figure out what step to take next, retrying transient issues and recovering interrupted executions from their last completed step.<p><pre><code> program = email all customers failure = throttled by mailchimp</code></pre>
评论 #43448516 未加载
gizzlon大约 2 个月前
This is pretty weak, makes very bold statements (&quot;this is the way it has to be now&quot;) with no evidence.<p>Reads like the set up for a sales pitch, which came at the end
turnsout大约 2 个月前
So basically front end, back end and data.
Trasmatta大约 2 个月前
&gt; At the technical and organizational scale of modern enterprises, the complexity of orchestrating distributed systems is unavoidable.<p>*citation needed<p>We continue to make things much more complex than they need to be. Even better when NON &quot;enterprise&quot; applications also buy into the insane complexity because they feel like they have to (but they have nowhere near the resources to manage that complexity).
评论 #43446634 未加载
评论 #43445881 未加载
tnvmadhav大约 2 个月前
i have something positive to say. I really liked the website UX on mobile
Toine大约 2 个月前
Was this written by an infamous 26 yo &quot;senior&quot; developer with 4 years of experience ?
评论 #43451282 未加载
dartos大约 2 个月前
How often do the trades ask “what’s next?”