亚马逊怎么样变成 SOA(面向服务的架构)
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><img src="data:image/svg+xml,%3C%3Fxml version=1.0 encoding=UTF-8%3F%3E%3Csvg width=1px height=1px viewBox=0 0 1 1 version=1.1 xmlns=http://www.w3.org/2000/svg xmlns:xlink=http://www.w3.org/1999/xlink%3E%3Ctitle%3E%3C/title%3E%3Cg stroke=none stroke-width=1 fill=none fill-rule=evenodd fill-opacity=0%3E%3Cg transform=translate(-249.000000, -126.000000) fill=%23FFFFFF%3E%3Crect x=249 y=126 width=1 height=1%3E%3C/rect%3E%3C/g%3E%3C/g%3E%3C/svg%3E" style="width: 50%; margin-bottom: 20px;"></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">01-</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">亚马逊<span style="color: black;">机构</span>不仅是世界最大的网络书店,还是世界最大的云服务商。它是怎么实现从电商到云商的转变</span><span style="color: black;">呢?</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">一切都是CEO杰夫·贝索斯促成的,他对市场有着超乎<span style="color: black;">一般人</span>的理解和预见。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">02-</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2000年前后,贝索斯有一次在员工大会上<span style="color: black;">说到</span>,<span style="color: black;">各样</span>办公工具、书籍、影音制品都<span style="color: black;">能够</span>数字化,<span style="color: black;">因此</span><span style="color: black;">亦</span><span style="color: black;">寓意</span>着很容易盗版。数字<span style="color: black;">制品</span>可能会利润越来越低,<span style="color: black;">火速</span>就<span style="color: black;">再也不</span>产生任何收入了。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">所有的民用工业品<span style="color: black;">亦</span>都很不妙,服装和电子消费品的消费周期越来越短。连烤炉这种东西,<span style="color: black;">亦</span>没人想要去年的型号。总之,卖这些东西,看上去<span style="color: black;">亦</span>不太会赚大钱。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">亚马逊<span style="color: black;">将来</span>靠什么<span style="color: black;">挣钱</span>,贝索斯不仅忧心忡忡。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">03-</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2002年,贝索斯<span style="color: black;">忽然</span>向全<span style="color: black;">机构</span>发布了一道指令。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(1)从今天起,所有的团队都要以服务接口的方式,<span style="color: black;">供给</span>数据和<span style="color: black;">各样</span>功能。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(2)团队之间必须<span style="color: black;">经过</span>接口来通信。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(3)不<span style="color: black;">准许</span>任何其他形式的互操作:不<span style="color: black;">准许</span>直接链接,不<span style="color: black;">准许</span>直接读其他团队的数据,不<span style="color: black;">准许</span>共享内存,不<span style="color: black;">准许</span>任何形式的后门。<span style="color: black;">独一</span>许可的通信方式,<span style="color: black;">便是</span><span style="color: black;">经过</span>网络调用服务。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(4)<span style="color: black;">详细</span>的实现技术不做规定,HTTP、Corba、PubSub、自定义协议皆可。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(5)所有的服务接口,必须从一<span style="color: black;">起始</span>就以<span style="color: black;">能够</span>公开<span style="color: black;">做为</span>设计导向,<span style="color: black;">无</span>例外。这<span style="color: black;">便是</span>说,在设计接口的时候,就默认这个接口<span style="color: black;">能够</span>对<span style="color: black;">外边</span>人员开放,<span style="color: black;">无</span>讨价还价的余地。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">(6)不遵守上面规定,就开除。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">他<span style="color: black;">认识</span>到,亚马逊现有的卖书送书的<span style="color: black;">基本</span><span style="color: black;">设备</span>,其实<span style="color: black;">能够</span>变成一个非常出色、可定制的计算平台,让用户付费<span style="color: black;">运用</span>。<span style="color: black;">然则</span>前提是,<span style="color: black;">全部</span><span style="color: black;">基本</span><span style="color: black;">设备</span>必须改<span style="color: black;">导致</span>面向服务的架构。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><img src="http://mmbiz.qpic.cn/mmbiz_jpg/Ng7bJHbt4kEicW14gXKicw8zEvCjH0aqmNhQhXGia1rbsUXiaWwC5VrEqmPsia04x0v9kO8GNcSHukVaCibuibsbAUwJg/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">04-</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">接下来的几年里,亚马逊全<span style="color: black;">机构</span>都转向了面向服务的架构(SOA)。这个过程中,工程师们得到了<span style="color: black;">海量</span>的经验教训。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">教训一:SOA架构的错误定位,非常麻烦。</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">一个请求可能要经过20次服务器调用,<span style="color: black;">才可</span>找到问题的真正所在。<span style="color: black;">一般</span>,单单是问题的定位就要花费15分钟到几个小时,除非搭建<span style="color: black;">海量</span>的外围监控和报警<span style="color: black;">办法</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">教训二:同事<span style="color: black;">亦</span>是潜在的 DOS 攻击者。</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">机构</span>内部某个小组,会<span style="color: black;">忽然</span>对你的服务发起<span style="color: black;">海量</span>请求。除非<span style="color: black;">每一个</span>服务都设有严格的用量和限量<span style="color: black;">办法</span>,否则<span style="color: black;">基本</span><span style="color: black;">没法</span><span style="color: black;">保准</span>可用性。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">教训三:监控和质量<span style="color: black;">保证</span>(QA)是两回事。</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">监控一个服务的时候,可能会得到"一切正常"的回复。<span style="color: black;">然则</span><span style="color: black;">特别有</span>可能,<span style="color: black;">全部</span>服务<span style="color: black;">独一</span>还正常工作的部分,<span style="color: black;">便是</span>这个<span style="color: black;">回复</span>"一切正常"的模块。<span style="color: black;">仅有</span>完整地调用服务,<span style="color: black;">才可</span>确定服务是正常的。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">这<span style="color: black;">寓意</span>着,真正监控一个服务,必须做到对所有的服务和数据进行完整的语意<span style="color: black;">检测</span>,否则是看不出问题的。<span style="color: black;">倘若</span>做到了这一点,本质上<span style="color: black;">便是</span>在做自动化 QA 了。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">教训四:必须有服务<span style="color: black;">发掘</span>机制。</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">面对成百上千的服务时,<span style="color: black;">无</span>服务<span style="color: black;">发掘</span>机制是不可想象的。这又离不开服务注册机制,而它本身<span style="color: black;">亦</span>是一个服务。亚马逊有一套统一的服务注册机制,<span style="color: black;">能够</span><span style="color: black;">经过</span>编程的方式找到所有服务,<span style="color: black;">包含</span>一个服务有<span style="color: black;">那些</span>API,<span style="color: black;">日前</span>是不是运行正常,在什么位置等。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">教训五:必须有沙箱用来调试</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">倘若</span>代码中调用了他人服务,<span style="color: black;">查询</span>问题的难度要高<span style="color: black;">非常多</span>,除非有统一的方式在沙箱里运行所有服务,否则几乎不可能进行任何调试。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">教训六:<span style="color: black;">不可</span>信任任何人</span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">团队采用服务的方式进行合作以后,基本上就<span style="color: black;">不可</span>信任其他团队了,正如<span style="color: black;">不可</span>信任第三方工程师<span style="color: black;">同样</span>。</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">✦ ✦ ✦ ✦ ✦ ✦ ✦ ✦</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">作者:阮一峰</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">他的博客:http://www.ruanyifeng.com/blog/</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><span style="color: black;">原文:</span></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">http://www.ruanyifeng.com/blog/2016/09/how_amazon_take_soa.html</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><img src="http://mmbiz.qpic.cn/mmbiz_jpg/Ng7bJHbt4kG15ibdxnLaJxOkMyhaRr8NRkJPtR18V5zLqk8oaWmxHnxbAiam9zvfRmBXp9fDXXplqFHWVKTNS2nA/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" style="width: 50%; margin-bottom: 20px;"></span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;"><strong style="color: blue;"><span style="color: black;">点击“<span style="color: black;">阅读原文</span>”,</span></strong></span><strong style="color: blue;"><span style="color: black;">看<span style="color: black;">更加多</span></span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">精选<span style="color: black;">文案</span></span></strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;"><span style="color: black;">↓↓↓</span></strong></p>
外贸论坛是我们的,责任是我们的,荣誉是我们的,成就是我们的,辉煌是我们的。
页:
[1]