什么是N层架构意味着越来越大呢? [英] What does N-tier Architecture mean nowadays?

查看:101
本文介绍了什么是N层架构意味着越来越大呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在传统意义上,N层意味着应用程序分成层,并把不同服务器上的每个层。这是至少3原因:

In a traditional sense, N-tier means separating the application into "tiers" and putting each "tier" on different servers. This was done for at least 3 reasons:


  1. 保养:

  1. Maintenance:

A)code维护:容易做bug修复和功能的增加

a) Code Maintenance: Easier to do bug fixes and feature additions.

二)硬件维修:以一台服务器下来没有从其他层中断服务

b) Hardware Maintenance: Taking one server down does not disrupt service from other tier.

性能:一台服务器往往不够快处理Web请求,业务逻辑计算,并在同一时间的数据库/文件访问

Performance: One server was often not fast enough to handle web requests, business logic computations, and database/file access at the same time.

可扩展性:具体来说横向扩展

Scalability: Specifically horizontal scalability

一)容错:1时,服务器停机能力有每层超过100台物理服务器意味着,应用程序仍然可以作为一个整体

a) Fault Tolerance: Ability to have more than 1 physical server per tier means when 1 server is down, the application can still function as a whole.

二)负载平衡:有一个层次的多个实例,帮助服务大量请求

b) Load-balancing: Having multiple instances of a tier helps service large amount of requests.

如今,硬件和网络足够快,以满足成千上万的每秒请求的一台服务器上。此外,对于IT的时髦词语,现在是整合。因此,即使应用程序被分为多层,他们最终可能会托管虚拟机在一台服务器上。

Nowadays, hardware and networks are fast enough to serve thousands of requests per second on a single server. Also, the buzz word for IT right now is "consolidation". So even if the application is split into tiers, they probably will end up hosting on virtual machines on a single server.

我觉得今天当人们谈论N层架构,他们谈论的应用程序中的关注点分离。它是一个多物理一个逻辑分离。我想,只要我们做到的关注和松耦合分离效果好,应用程序不必是N层。这似乎只是很多程序员认为N层架构是一个金标准,每一个Web应用程序都必须遵守。

I think nowadays when people talk about N-tier architecture, they are talking about separation of concerns within the application. It is more of a logic separation than a physical one. I think as long as we achieve good separation of concerns and loose coupling, applications do not have to be N-tier. It just seems that many programmers think that N-tier architecture is a golden standard that every web application must comply with.

那么,什么是N层架构对你现在?

So, what is N-tier architecture to you nowadays?

推荐答案

从维基百科的文章我读

通常,术语层是用来描述的物理分配
  在单独的服务器,计算机,或网络的系统的部件
  (处理节点)。然后,三层体系结构将有三个
  处理节点。层是指组件的逻辑分组
  其可以或可以不物理地位于一个处理节点上

Generally, the term tiers is used to describe physical distribution of components of a system on separate servers, computers, or networks (processing nodes). A three-tier architecture then will have three processing nodes. Layers refer to a logical grouping of components which may or may not be physically located on one processing node.

我不认为层和梯队的概念,这个概念搞混了时间。
我个人比较喜欢谈论层只,而不是我preFER PAAS解决方案,在我的担心是只在软件层,而该行业朝这个方向缓慢移动。

I do think that the concept of "layer" and the concept of "tier" got mixed up with time. I personally like to talk about layers only rather than tiers as I prefer PAAS solutions where my concerns are only on the software, and the industry is slowly moving in this direction.

此外,当您规划,可以大大拓展我仍然不认为你应该想想n层的可扩展性的应用程序。
事实上,有很多的流量非常受欢迎的网站只有自己分成3个部分:
数据库服务器,web服务器(包括缓存服务器),和一些CDN(内容分发网络)。
这种分离可以在任何应用程序来实现。

Also when you plan for an application that could greatly expand I still don't think that you should think about n-tier for scalability. In fact, very popular websites with a lot of traffic only separate themselves into 3 components: Database servers, web servers (including the caching servers), and a few CDN (content delivery networks). This kind of separation can be achieved in any application.

但得出结论,我认为程序员应该只觉得说不上层和应用中的关注点分离,实现了最重要的(和困难)任务:维护从长远看

But to conclude, I think a programmer should only think abuot layers and separation of concerns within the application to achieve the most important (and difficult) task: maintainability in the long run.

这篇关于什么是N层架构意味着越来越大呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆