<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-11  評論-10  文章-8  trackbacks-0
    多謝 erlang-china 的提醒,今天從 mailing list 中翻出了關于RPC的討論,深有感觸 -- 牛人就是牛人!!!

    關于 RPC is bad 的主要論點如下:
    The fundamental problem of RPC, which is trying to make remote calls look local, is based on essentially trying to ignore the problems covered by the fallacies or trying to pretend they don't even exist

    嚴重同意,理由如下:

    Network partitions are real, timeouts are real, remote host and service
    crashes are real, the need for piecemeal system upgrade and handling
    version differences between systems is real, etc. The distributed
    systems programmer
    *must* deal with these and other issues because
    they affect different applications very differently.


    這一點非常贊同,也深有同感。在做FileServer的時候所有的節點都是通過RMI進行通訊,最初使用RMI的目的就是
    簡化網絡部分的開發,對于一般的開發人員無須理解RMI,動態代理,只需要像使用本地方法一樣就可以訪問遠程
    節點。這種方案確實很好的隱藏了網絡細節,使網絡對開發人員完全透明,但有個問題始終無法很好的處理:異常。
    網絡錯誤是隨時都有可能發生的,對于不同的錯誤需要根據環境和需要做具體的處理,比如,多試幾次,嘗試下一個
    節點,對于無法處理的還可以直接拋出。而這種策略的選擇和使用必須由應用邏輯層完成,可是應用層假設是不知道
    網絡存在的,它甚至無法知道自己調用的方法中哪個是遠程調用,哪個是本地調用。這種矛盾從根本上說明了網絡的
    復雜性和多樣性是開發分布式應用的程序員必須面對的,是逃不掉的,要直面這慘淡的人生T_T

    下面闡述了使用類型系統的缺陷:
    Such systems also have problems with impedance mismatch between the
    IDL and whatever languages you're translating it to. If the IDL is
    minimal so that it can be used with a wide variety of programming
    languages, it means advanced features of well-stocked languages like
    Java and C++ can't be used. OTOH if you make the IDL more powerful so
    that it's closer to such languages, then translating it to C or other
    more basic languages becomes quite difficult.
    On top of all that, no matter how you design the IDL type system, all
    the types won't -- indeed, can't -- map cleanly into every desired
    programming language.

    類型系統一直都在進化,從弱到強到動態,你相信會有一種類型系統可以和所有
    的其他語言進行完美的映射嗎?如果真存在,類型系統的進化就毫無意義了。定義
    一個新的語言,然后映射到其他語言,最后號稱“我是跨語言跨平臺的!”,這種
    解決問題的方式根本就是有問題的。WSDL使用XML描述,有著更好的可擴展性,只是
    酒瓶換新酒,根爛了,再換也沒用。

    Ultimately, RPC is a leaky abstraction. It can't hide what it tries to
    hide, and because of that, it can easily make the overall problem more
    difficult to deal with by adding a lot of accidental complexity.

    下面對為什么 message queuing system 適合分布式系統做了很好的總結:
    Message queuing systems work well because (in no particular
    order):

    * they don't pretend to be programming language procedure or method
    calls, so they avoid the associated impedance mismatch problems
    * they don't try to hide distributed systems issues
    * coupling is low -- drop a message into a queue here, pick up a
    message from a queue there
    * queues can be persistent, or more generally, delivery guarantees can
    be varied as needed
    * asynchrony
    * payloads need not conform to some made-up IDL type system
    * getting two different messaging systems to interoperate is easier
    than getting two different RPC or distributed object systems to
    interoperate
    這和我在自己的碩士論文中的觀點有些相似:完全使用消息機制進行構件間的通訊。構件可以
    是分布式的或在容器中的,基于消息的通訊都是完全適用的。對于網絡應用同樣如此。對于流行
    的網絡協議,HTTP,FTP,LDAP 等等都是消息式的,完全經歷了時間的考驗。

    posted on 2008-05-28 00:32 JBahamut 閱讀(485) 評論(1)  編輯  收藏

    評論:
    # re: 讀 Erlang mailing list 有感 2008-06-24 01:55 | mier
    你java好強大  回復  更多評論
      

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 中文字幕视频免费在线观看| 美女扒开尿口给男人爽免费视频| 24小时免费直播在线观看| 亚洲成色WWW久久网站| 97久久精品亚洲中文字幕无码 | 日本卡1卡2卡三卡免费| 亚洲色成人中文字幕网站| 国产男女爽爽爽免费视频| 免费成人福利视频| 亚洲毛片基地日韩毛片基地| 亚洲视频在线免费播放| 国内精品久久久久影院亚洲| 成人性生交大片免费看午夜a| 亚洲欧美中文日韩视频| 四只虎免费永久观看| 国产视频精品免费视频| 亚洲A∨无码无在线观看| 中文字幕免费视频| 亚洲天然素人无码专区| 亚洲国产成人爱av在线播放| 国产裸体美女永久免费无遮挡| 国产成A人亚洲精V品无码| 在线观看免费中文视频| 亚洲日韩国产二区无码| 婷婷综合缴情亚洲狠狠尤物| 99re6在线精品免费观看| 亚洲最新中文字幕| 国产又大又粗又硬又长免费 | 久久久久免费精品国产| 亚洲国产精品线观看不卡| 精品剧情v国产在免费线观看| 免费国产va视频永久在线观看| 亚洲三级高清免费| 校园亚洲春色另类小说合集| 国产亚洲精品资在线| 亚洲啪啪免费视频| 黄色免费网址大全| 亚洲综合无码一区二区三区| 曰皮全部过程视频免费国产30分钟 | 亚洲AV成人无码天堂| 亚洲精品成人a在线观看|