Seven fallacies of developing distributed computing applications were coined in 1997 by Peter Deutsch. Later, the eighth was coined by James Gosling (the father of Java).

Peter Deutsch在1997年提出了七个开发分布式计算应用程序的谬论。 后来,第八枚硬币是由Javas之父James Gosling创造的。

These fallacies directly relate to us as PHP developers since we build distributed applications each and every day. We build mashups, applications that interact with SOAP and REST services, authenticate users via Facebook, Google, or Twitter APIs, retrieve information from remote databases and caching services, etc. Make no mistake, we’re building distributed computer applications.

这些谬论与我们作为PHP开发人员直接相关,因为我们每天都在构建分布式应用程序。 我们构建混搭,与SOAP和REST服务交互的应用程序,通过Facebook,Google或Twitter API对用户进行身份验证,从远程数据库和缓存服务中检索信息,等等。毫无疑问,我们正在构建分布式计算机应用程序。

Given that we are building distributed applications, it’s important that we understand the eight fallacies and how they affect us.

鉴于我们正在构建分布式应用程序,因此了解八个谬论及其对我们的影响非常重要。

1.网络可靠 (1. The Network is Reliable)

It’s fair to say that this is obviously untrue. Though network latency has decreased and bandwidth has increased markedly year after year since 1995, to say that the network is reliable is false.

可以公平地说,这显然是不正确的。 尽管自1995年以来网络等待时间减少了,带宽显着增加,但是说网络可靠是错误的。

Let’s say we’ve setup a simple application that doesn’t use too many services – a basic PHP application that uses MySQL as it’s backend. There’s arguably not much that could go wrong. However, let’s say that later we decide to go with a hosting provider for MySQL, such as Xeround to provide our database needs. Despite good scalability and high availability, what if something goes wrong at their end? What if their infrastructure suffers a DDoS attack or has downtime because of a internal issue?

假设我们已经建立了一个不使用太多服务的简单应用程序-一个将MySQL作为后端的基本PHP应用程序。 几乎没有什么可能出错。 但是,可以说,稍后我们决定与MySQL的托管提供程序一起使用,例如Xeround,以满足我们的数据库需求。 尽管具有良好的可伸缩性和高可用性,但如果最终出现问题怎么办? 如果他们的基础架构由于内部问题遭受DDoS攻击或停机,该怎么办?

We hear quite a lot about 99.999% uptime, but even that is never 100%. With the proliferation of services and the usually high availability of bandwidth available today, it can be easy to forget that nothing’s ever perfect.

我们听到很多关于正常运行时间的信息,大约99.999%,但是即使那样也永远不会达到100%。 随着服务的增长以及当今通常可用带宽的高可用性,人们很容易忘记没有什么是完美的。

How do you account for a failure of a service within your application?

您如何解决应用程序中的服务故障?

2.延迟为零 (2. Latency is Zero)

Though latency may be low, indeed lower than it was some years ago, it’s never zero. To quote Arnon Rotem-Gal-Oz in his Fallacies of Distributed Computing Explained post:

尽管延迟可能很低,但确实比几年前要低,但它永远不会为零。 引用Arnon Rotem-Gal-Oz在他的《分布式计算解释的谬论》中 :

At roughly 300,000 kilometers per second (3.6 * 10E12 teraangstrom per fortnight), it will always take at least 30 milliseconds to send a ping from Europe to the US and back, even if the processing would be done in real time.

以每秒约300,000公里(每两周3.6 * 10E12兆兆秒)的速度,从欧洲向美国发送查验通知和返回查验通知将始终至少花费30毫秒,即使处理是实时进行的也是如此。

Is this a bad thing? Well, yes and no. Depending on how we structure our application and the resources available to us, we can largely mitigate the issue of latency.

这是坏事吗? 好吧,是的,不是。 根据我们如何构造应用程序和可用资源的多少,我们可以在很大程度上缓解延迟问题。

Instead of having our applications deployed in a single datacenter, we can host it with a service such as Amazon Web Services and make use of S3 so that we have data located in several regions around the world, bringing it closer to our end users and reducing the latency of the application over the network. But even though we can reduce latency, we can’t remove it. We can employ a series of methods and architectures to reduce its impact on us, but no matter what we do, it will always be present.

无需将应用程序部署在单个数据中心中,我们可以将其托管在诸如Amazon Web Services之类的服务中并利用S3,这样我们就可以将数据分布在世界各地的多个区域中,从而使数据与我们的最终用户更加接近,并减少应用程序在网络上的延迟。 但是,即使我们可以减少延迟,也无法将其删除。 我们可以采用一系列方法和体系结构来减少它对我们的影响,但是无论我们做什么,它都将始终存在。

Have you considered this when you designed your application?

在设计应用程序时您是否考虑过这一点?

3.带宽是无限的 (3. Bandwidth is Infinite)

Can bandwidth really be infinite? If so, at what price is it infinite? When we consider that the web is increasingly going mobile, everything old is new again.

带宽真的可以无限吗? 如果是这样,那么它的价格是无限的? 当我们认为网络越来越移动时,旧的事物又是新事物。

Now I’m not suggesting that we’re starting over from the speed of dial-up, and the newer 4G networks are notable faster than the earlier 2G and 3G networks. But still, even their peak data rates are currently less than those of a standard broadband connection.

现在,我不建议我们从拨号速度重新开始,而较新的4G网络明显比较早的2G和3G网络快。 但是,即使它们的峰值数据速率目前也低于标准宽带连接的峰值数据速率。

Also, with the increasing uptake of mobile broadband, the amount of possible users seeking to use our service (we all want to be popular and have at least some of the success of Facebook) is growing at a phenomenal rate. Consider these statistics from mobithinking:

另外,随着移动宽带的普及,寻求使用我们的服务的可能用户数量(我们都希望受到欢迎,并且至少在Facebook上取得了一些成功)正以惊人的速度增长。 考虑一下来自mobithinking的这些统计数据:

  • There are 5.9 billion mobile subscribers.有59亿移动用户。
  • There are 1.2 billion mobile web users with 3G coverage.有12亿移动Web用户覆盖3G。
  • Mobile devices account for 8.49 percent of global hits.移动设备占全球点击量的8.49%。

Given that, it’s fair to say that even though bandwidth rates and the penetration of it around the world is increasing, the rate of increase of users serves to balance it out. Going further, with the massive flexibility that mobile broadband provides, a clear adhoc consumption of service naturally arrives.

鉴于此,可以公平地说,即使带宽速率及其在世界范围内的普及率在增加,用户的增长速率也可以使带宽保持平衡。 更进一步,随着移动宽带所提供的巨大灵活性,服务的明确即然消耗自然就到了。

Are you prepared for the sheer volume of potential load on your service? Can you handle the spike that this kind of availability can deliver?

您是否已准备好应对潜在的大量服务负担? 您能应付这种可用性所能带来的高峰吗?

4.网络安全 (4. The Network is Secure)

I think it’s fair to say without going in to too much detail that this is, and will always be, false. If you have any doubts, maybe you should talk to a LinkedIn or eHarmony member.

我认为可以公平地说,这是错误的,而且将永远是错误的。 如果您有任何疑问,也许您应该与LinkedIn或eHarmony成员交谈。

When we design and deploy our applications, how much emphasis do we place on security, both in where the application’s hosted, such as Rackspace, PagodaBox or cloudControl, and also in the design of the application itself?

在设计和部署应用程序时,我们在应用程序的托管位置(例如Rackspace , PagodaBox或cloudControl )以及应用程序本身的设计上都对安全性有多大重视?

According to SecurityAffairs, Prolexic reported:

根据SecurityAffairs的报道,Prolexic报告:

  • 3,000% quarter-on-quarter increase in malicious packet traffic targeting the financial services sector.针对金融服务部门的恶意数据包流量环比增长3,000%。
  • 19.1TB of data and 14 billion packets of malicious traffic against financial services sector during Q4 2011, increasing during 2012.2011年第四季度,金融服务业的19.1 TB数据和140亿个恶意流量数据包在2012年期间呈上升趋势。
  • 65TB of data and 1.1 trillion packets that were identified and mitigated in 2012, 80 times greater than in 2011.2012年发现并缓解了65TB的数据和1.1万亿个数据包,是2011年的80倍。

Given that the network is not secure, we need to be certain that we are using good security practices as a matter of course. Given the plethora of good advice from such sources as Chris Shiflett’s blog, Essential PHP Security, the PHP Security Consortium, and others, it’s hard not to know how and why to bake security in to the core of our applications.

鉴于网络是不安全的,因此,我们当然需要确定我们正在使用良好的安全做法。 考虑到Chris Shiflett的博客 , Essential PHP Security , PHP Security Consortium等来源的大量建议,很难不知道如何以及为什么将安全性纳入我们应用程序的核心。

What are your security practices? Do you assess the vendors that you deploy with?

您的安全做法是什么? 您是否评估与您一起部署的供应商?

5.拓扑结构不变 (5. Topology doesn’t Change)

Doesn’t it? Really? Does it not change, or do we just not know about it? When we host our applications with others, we just don’t know. If the provider reconfigures their data center, upgrades it, adjusts it, for whatever reason, the topology changes.

是不是 真? 它不会改变,还是我们只是不知道它? 当我们与其他人托管应用程序时,我们只是不知道。 如果提供商重新配置其数据中心,对其进行升级,对其进行调整,则无论出于何种原因,拓扑都会发生变化。

Given the earlier reference to the increased rate of smart phone usage, the topology changes frequently. From both a user and a provider perspective, topology can change nearly daily!

早先提到了智能手机使用率的增长,因此拓扑结构经常更改。 从用户和提供者的角度来看,拓扑几乎每天都在变化!

If the topology changes and an external service that it relies on can no longer be reached, resulting in say, no database access, then sure this is an issue. But if, internally at our provider, things change, and the application continues to function, then it may not be a problem.

如果拓扑发生更改,并且无法再访问它所依赖的外部服务,导致无法访问数据库,那么请确保这是一个问题。 但是,如果在我们提供商的内部,情况发生了变化,并且应用程序继续运行,则可能不是问题。

Granted, it’s easy to code an application that’s small and hosted in a simple configuration. But applications change, and those that gain in popularity more so. Do you consider changes in topology in your design? How do you account for or handle failures in the application design and deployment design?

当然,编写小型且托管在简单配置中的应用程序很容易。 但是,应用程序会发生变化,而那些越来越流行的应用程序则是如此。 您是否考虑设计中拓扑的变化? 您如何解决或处理应用程序设计和部署设计中的失败?

6.一位管理员 (6. There is One Administrator)

“But I have my application hosted with a single service provider. They provide the OS, database, and web server support”, you say. Okay, assuming that that’s your application, is there really one administrator? And if there was really only one administrator, would you really trust the provider with your application? I’d hate to think what could wrong if they were sick or went on vacation.

“但是我的应用程序托管在一个服务提供商的手中。 他们提供了操作系统,数据库和Web服务器支持。” 好的,假设那是您的应用程序,真的有一位管理员吗? 如果真的只有一名管理员,您是否真的会信任提供者的应用程序? 我不愿意考虑如果他们生病或去度假怎么办。

Normally, there will be at least a few administrators, though each may not have the same level of training and astuteness, both technically and more broadly. There should be policies in place, such as network intrusion detection and other security policies, but there’s no guarantee they will all follow them with the same level of thoroughness and diligence.

通常,至少会有几个管理员,尽管从技术上和更广泛的角度来看,每个管理员都可能没有相同水平的培训和敏锐度。 应该有适当的策略,例如网络入侵检测和其他安全策略,但不能保证它们都将以相同的彻底性和勤奋性遵循它们。

Given the plethora of hosting providers available today and the low time required to update DNS records, we have a lot of choice and flexibility that if one provider’s not meeting our needs and expectations, we can move away from them to another.

鉴于当今有大量的托管服务提供商,并且更新DNS记录所需的时间很短,我们有很多选择和灵活性,如果一个提供商不能满足我们的需求和期望,我们可以将其转移到另一个提供商。

Have you considered how this affects you? What if you’re not in a position where you can easily change vendors? What if you have a high amount of vendor lock-in, or it will be costly to move? What if your application’s architecture is not flexible enough? What can you do to mitigate such risks?

您是否考虑过这对您有何影响? 如果您无法轻松更换供应商该怎么办? 如果您有大量的供应商锁定,或者搬家成本很高,该怎么办? 如果您的应用程序体系结构不够灵活怎么办? 您可以采取什么措施来减轻此类风险?

7.运输成本为零 (7. Transport Cost is Zero)

As with all of the statements thus far, the validity of this too is highly unlikely. If the servers that support our application are in the same rack in the same data center then transport cost can be greatly reduced, but in terms of the time cost. What about the monetary costs?

与到目前为止的所有声明一样,这样做的有效性也不大可能。 如果支持我们应用程序的服务器位于同一数据中心的同一机架中,则可以大大降低运输成本,但可以节省时间成本。 货币成本呢?

Yes, we can infinitely scale up and down elastically as the demand requires it and we can store the data for our applications across geo-located data centers so that it’s as physically close to our end user as possible, but at what cost?

是的,我们可以根据需求进行无限伸缩,并且可以跨地理位置的数据中心存储应用程序的数据,从而使其在物理上尽可能接近最终用户,但以何种成本呢?

What’s the architecture composition of your application or service? Is it approaching zero in respect to either cost or time? If you could reduce one, does it increase the other?

您的应用程序或服务的架构组成是什么? 在成本或时间上接近零吗? 如果可以减少一个,是否增加另一个?

8.网络是同质的 (8. The Network is Homogeneous)

Unlike the other fallacies, I think that this is one where we as PHP developers inherently understand. We host our applications on Windows, Linux, Solaris, BSD and Mac OS X servers. We use MySQL, SQLServer, SQLite, PostgreSQL, mongoDB, Hadoop, and Oracle for storing data. We consume external services via XML or JSON requiring different interfaces. As a multi-operating system and multi-service community, arguably right from the early days, we’ve never expected a homogeneous network.

与其他谬论不同,我认为这是我们作为PHP开发人员所固有的理解。 我们将应用程序托管在Windows,Linux,Solaris,BSD和Mac OS X服务器上。 我们使用MySQL,SQLServer,SQLite,PostgreSQL,mongoDB,Hadoop和Oracle来存储数据。 我们通过XML或JSON使用需要不同接口的外部服务。 作为一个多操作系统和多服务社区,可以说从成立之初就可以说,我们从来没有想到过一个统一的网络。

But the question still needs to be asked, are you flexible in your approach? Can you work with multiple databases and datasources? Do you use relevant design patterns, such as abstract factory, to to consume data from a variety of sources and types with a transparent code interface? Or does your code break if you need to do something as simple as swap from XML to JSON?

但是仍然需要问这个问题,您的方法灵活吗? 您可以使用多个数据库和数据源吗? 您是否使用诸如抽象工厂之类的相关设计模式通过透明的代码界面来使用来自各种源和类型的数据? 或者,如果您需要做一些简单的事情,例如从XML转换为JSON,代码就会中断吗?

结论 (In Conclusion)

I think as PHP developers the eight fallacies of distributed computing are as relevant as they ever were. Given the plethora of information and resources available, we are in a great position to understand them and mitigate the risks that stem from believing in them.

我认为,作为PHP开发人员,分布式计算的八个谬论与以往一样重要。 鉴于有大量可用的信息和资源,我们处于很好的位置来理解它们并减轻因相信它们而产生的风险。

What do you think? Do you account for them when developing your applications and services? How do you think the eight fallacies affect your application?

你怎么看? 您在开发应用程序和服务时会考虑它们吗? 您认为八个谬论如何影响您的申请?

进一步阅读 (Further Reading)

  • How Relevant Are The Fallacies Of Distributed Computing Today?

    当今分布式计算的谬论有多重要?

  • New Relic – The Fallacies of Distributed Computing Reborn: The Cloud Era

    新文物–分布式计算的谬论重生:云时代

  • The Web vs. The Fallacies

    网络与谬论

  • CarbonFive – iPhone Distributed Computing Fallacy #1: the network is reliable

    CarbonFive – iPhone分布式计算谬误#1:网络可靠

  • Distributed Systems: Principles and Paradigms

    分布式系统:原理和范例

  • Introduction to Distributed System Design

    分布式系统设计导论

  • Netflix – 5 Lessons We’ve Learned Using AWS

    Netflix –我们从AWS中学到的5课

Image via Perrush / Shutterstock

图片来自Perrush / Shutterstock

翻译自: https://www.sitepoint.com/8-fallacies-of-distributed-computing-for-php-developers/

PHP开发人员的8个分布式计算谬论相关推荐

  1. 对开发人员有用的定律和原则

    这篇文章包含对一些定律.原则以及模式的解释,但不提倡其中任何一个.它们的应用始终存在着争论,并且很大程度上取决于你正在做什么. 一.定律 1.布鲁克斯法则 这个定律表明,在许多情况下,试图通过增加人力 ...

  2. 软件开发向大数据开发过渡_如果您是过渡到数据科学的开发人员,那么这里是您的最佳资源...

    软件开发向大数据开发过渡 by Cecelia Shao 邵Ce It seems like everyone wants to be a data scientist these days - fr ...

  3. 辞职前为什么挣扎_当您感到自己像开发人员一样挣扎时,为什么学得最多

    辞职前为什么挣扎 by Walt Schlender 由Walt Schlender 当您感到自己像开发人员一样挣扎时,为什么学得最多 (Why you learn the most when you ...

  4. 心得丨在人工智能领域, 开发人员需要什么技能?

    为了收集有关人工智能(AI)及其所有变体(包括机器学习(ML),深度学习(DL),自然语言处理(NLP),预测分析和多重神经网络)情况的见解,我们与22位熟悉人工智能领域的高管进行对话. 我们向他们询 ...

  5. java分布式系统开发_从微服务到分布式系统-Java开发人员生存指南

    java分布式系统开发 感觉像是对微服务的炒作正在慢慢地落到实处,并且我们的行业开始意识到,根据微服务背后的体系结构范式无法通过仅在现有组件之上公开一些HTTP接口来轻松创建一个系统. . 我们似乎确 ...

  6. 从微服务到分布式系统-Java开发人员生存指南

    感觉像是对微服务的炒作正在慢慢地落到实处,并且我们的行业开始意识到,仅通过在现有组件之上公开一些HTTP接口就无法轻松创建根据微服务背后的体系结构范式的系统. 我们似乎确实同意必须进行服务优化的基础架 ...

  7. 苏格拉底婚姻_苏格拉底如何教我与开发人员交谈

    苏格拉底婚姻 当涉及到"最有效的工具来解开心理障碍并弄清问题"时,有两个项目出现在我列表的顶部. 首先是本尼·希尔(Benny Hill )的这段剪辑,内容涉及我们进行假设时的情况 ...

  8. 如何成为一个成功的 Java 开发人员?

    如果你是一名成功的Java程序员,那么在任何公司中的Java开发人员中,你都有机会获取一席之地. 作者 | ASHISH KHURAISHY 译者 | 苏本如,责编 | 郭芮 出品 | CSDN(ID ...

  9. 开发人员该选择什么大数据工具提高工作效率?

    开发人员该选择什么大数据工具提高工作效率? 海量数据使得数据分析工作变得繁重困难,开发人员选择合适的大数据工具来开发大数据系统成为新的挑战.因此开发人员要根据不同的数据处理方式对大数据工具进行分类. ...

最新文章

  1. C++/C++11中头文件numeric的使用
  2. Schama —— Xml文档约束技术 学习笔记
  3. CentOS 6.3 运维监控之Cacti 监控主机系统(二)
  4. 促使网站关键词排名稳定的技巧有哪些?
  5. 在S4 key user tool里创建Custom Logic的后台实现
  6. .NET Conf 2017后初尝Xamarin Forms 3.0@Linux
  7. 软件工程---1.概述
  8. 第三十六期:人工智能统计调查:86%的消费者更喜欢人工客服
  9. 简洁版即时聊天---I/O多路复用使用
  10. 新版php卡盟排行榜网站源码
  11. 算法设计与分析基础(三)
  12. 第一课:OD软件界面基本介绍
  13. Windows(多)操作系统启动过程
  14. 艺术创作六步法则、浅谈色彩、如何理解漫画
  15. 在线旅游中需要上传获取那些信息,对接旅行社护照录入系统
  16. Github下载速度慢 提升github下载速度最新解决方案 跟龟速说拜拜(持续更新 保证方案可行 建议收藏)
  17. MySQL之索引及其背后的数据结构
  18. 【科软课程-信息安全】Lab12 SQL Injection Attack
  19. 基于Java毕业设计阳光社区新冠瘦苗接种系统源码+系统+mysql+lw文档+部署软件
  20. OpenCV视频篇——从.JPG到.AVI:视频编码最强入门科普

热门文章

  1. osgEarth示例分析——osgearth_minimap
  2. 微信小程序-RSA签名、验签、加密、解密
  3. 【Linux】四、Linux 进程概念(上篇)
  4. Linux文件查找find
  5. C语言-求矩阵的对角线之和
  6. JAVA内存管理机制
  7. 时钟分频原理 - 时钟分频原理详解
  8. 什么是数字化供应链系统?企业如何利用数字化供应链系统增加销售渠道?
  9. 08年总结评述(一)
  10. 使用sql语句实现 报表的小计合计