Akka 文檔瞎翻譯(一)Akka 介紹

Akka 介紹

Welcome to Akka, a set of open-source libraries for designing scalable, resilient systems that span processor cores and networks. Akka allows you to focus on meeting business needs instead of writing low-level code to provide reliable behavior, fault tolerance, and high performance

Akka 是一套用于設計可擴展的票灰,可容錯呕童,高并發(fā)的分布式系統(tǒng)的開源類庫,Akka 讓你可以專注于業(yè)務需求而不是糾結于如何處理可用性傍妒,容錯性和可靠性蛉签。

Common practices and programming models do not address important challenges inherent in designing systems for modern computer architectures. To be successful, distributed systems must cope in an environment where components crash without responding, messages get lost without a trace on the wire, and network latency fluctuates. These problems occur regularly in carefully managed intra-datacenter environments - even more so in virtualized architectures.

常見的實踐和編程模型沒有很好的解決在現代計算機架構中系統(tǒng)設計面臨的重要挑戰(zhàn)胡陪,一個成功的分布式系統(tǒng)必須能成功的應付由系統(tǒng)組件崩潰,消息丟失正蛙,網路延時帶來的問題督弓。這些問題經常出沒在細心維護的內部數據中营曼,在虛擬化架構中更是如此乒验。

To deal with these realities, Akka provides:

為了解決這些問題,Akka提供了如下手段:

Multi-threaded behavior without the use of low-level concurrency constructs like atomics or locks. You do not even need to think about memory visibility issues.

不使用低級別并發(fā)結構(原子操作或鎖)的多線程行為蒂阱,永遠不需要考慮內存的可見性問題锻全。


Transparent remote communication between systems and their components. You do not need to write or maintain difficult networking code.

系統(tǒng)間透明的遠程交互,不需要編寫和維護難懂的網絡編程代碼录煤。

A clustered, high-availability architecture that is elastic, scales in or out, on demand.

可按需擴張的容錯性的高可用集群架構

All of these features are available through a uniform programming model: Akka exploits the actor model to provide a level of abstraction that makes it easier to write correct concurrent, parallel and distributed systems. The actor model spans the set of Akka libraries, providing you with a consistent way of understanding and using them. Thus, Akka offers a depth of integration that you cannot achieve by picking libraries to solve individual problems and trying to piece them together.

所有這些特性基于同一的編程模型:Akka利用actor模型提供一種同一級別的抽象使得編寫正確的并發(fā)并行的分布式系統(tǒng)更加容易鳄厌。actor 模型貫穿了整個Akka類庫,使得你可以在同一的思想下的學習和使用它們妈踊,因此了嚎,Akka提供了一種深度融合讓你你不用為了解決個別的問題去挑選不同的類庫并把他們組裝在一起。

By learning Akka and its actor model, you will gain access to a vast and deep set of tools that solve difficult distributed/parallel systems problems in a uniform programming model where everything fits together tightly and efficiently.

通過學習Akka和它的Actor模型廊营⊥嵊荆可以獲得一個龐大的且具有深度的工具集,而這個工具集可用幫助你通過同一的編程模型解決復雜的分布式并行系統(tǒng)問題露筒,并且這些工具可以緊密而高效的配合呐伞。

What is the Actor Model?

什么事Actor 模型?

The characteristics of today’s computing environments are vastly different from the ones in use when the programming models of yesterday were conceived. Actors were invented decades ago byCarl Hewitt. But relatively recently, their applicability to the challenges of modern computing systems has been recognized and proved to be effective.

現在的計算機結構已經和之前編程模型所能應付的計算機架構有了很多不同慎式,Actor模型雖然早在十年前就被發(fā)明了伶氢,但是它被證明可以高效的應對現代計算機系統(tǒng)架構中的面臨的挑戰(zhàn)趟径。

The actor model provides an abstraction that allows you to think about your code in terms of communication, not unlike people in a large organization. The basic characteristic of actors is that they model the world as stateful entities communicating with each other by explicit message passing.

Actor模型把一切都抽象成有狀態(tài)的實體并通過消息傳遞的方式進行彼此之間的溝通

As computational entities, actors have these characteristics:

作為計算實體,actors 擁有如下特征:

They communicate with asynchronous messaging instead of method calls

通過異步消息溝通而不是方法調用

They manage their own state

自己管理自己的狀態(tài)

When responding to a message, they can:

當它們應答消息時癣防,他們可以做出以下動作:

Create other (child) actors

創(chuàng)建另外的actors(子actors)

Send messages to other actors

發(fā)送消息給其他的actors

Stop (child) actors or themselves

終止自己或者子actors

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
  • 序言:七十年代末蜗巧,一起剝皮案震驚了整個濱河市,隨后出現的幾起案子蕾盯,更是在濱河造成了極大的恐慌惧蛹,老刑警劉巖,帶你破解...
    沈念sama閱讀 222,729評論 6 517
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件刑枝,死亡現場離奇詭異香嗓,居然都是意外死亡,警方通過查閱死者的電腦和手機,發(fā)現死者居然都...
    沈念sama閱讀 95,226評論 3 399
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來凛忿,“玉大人届案,你說我怎么就攤上這事∷嘁叮” “怎么了?”我有些...
    開封第一講書人閱讀 169,461評論 0 362
  • 文/不壞的土叔 我叫張陵,是天一觀的道長迅诬。 經常有香客問我,道長婿牍,這世上最難降的妖魔是什么侈贷? 我笑而不...
    開封第一講書人閱讀 60,135評論 1 300
  • 正文 為了忘掉前任,我火速辦了婚禮等脂,結果婚禮上俏蛮,老公的妹妹穿的比我還像新娘。我一直安慰自己上遥,他們只是感情好搏屑,可當我...
    茶點故事閱讀 69,130評論 6 398
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著粉楚,像睡著了一般辣恋。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上模软,一...
    開封第一講書人閱讀 52,736評論 1 312
  • 那天伟骨,我揣著相機與錄音,去河邊找鬼撵摆。 笑死底靠,一個胖子當著我的面吹牛,可吹牛的內容都是我干的特铝。 我是一名探鬼主播暑中,決...
    沈念sama閱讀 41,179評論 3 422
  • 文/蒼蘭香墨 我猛地睜開眼壹瘟,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了鳄逾?” 一聲冷哼從身側響起稻轨,我...
    開封第一講書人閱讀 40,124評論 0 277
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎雕凹,沒想到半個月后殴俱,有當地人在樹林里發(fā)現了一具尸體,經...
    沈念sama閱讀 46,657評論 1 320
  • 正文 獨居荒郊野嶺守林人離奇死亡枚抵,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 38,723評論 3 342
  • 正文 我和宋清朗相戀三年线欲,在試婚紗的時候發(fā)現自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片汽摹。...
    茶點故事閱讀 40,872評論 1 353
  • 序言:一個原本活蹦亂跳的男人離奇死亡李丰,死狀恐怖,靈堂內的尸體忽然破棺而出逼泣,到底是詐尸還是另有隱情趴泌,我是刑警寧澤,帶...
    沈念sama閱讀 36,533評論 5 351
  • 正文 年R本政府宣布拉庶,位于F島的核電站嗜憔,受9級特大地震影響,放射性物質發(fā)生泄漏氏仗。R本人自食惡果不足惜吉捶,卻給世界環(huán)境...
    茶點故事閱讀 42,213評論 3 336
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望廓鞠。 院中可真熱鬧帚稠,春花似錦、人聲如沸床佳。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,700評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽砌们。三九已至,卻和暖如春搁进,著一層夾襖步出監(jiān)牢的瞬間浪感,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,819評論 1 274
  • 我被黑心中介騙來泰國打工饼问, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留影兽,地道東北人。 一個月前我還...
    沈念sama閱讀 49,304評論 3 379
  • 正文 我出身青樓莱革,卻偏偏與公主長得像峻堰,于是被迫代替她去往敵國和親讹开。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 45,876評論 2 361

推薦閱讀更多精彩內容