Skip to content

Commit bf1a1d2

Browse files
committedJun 23, 2019
新增“附加信息”中关于部署、IDE、书籍和视频以及可能改变等内容的翻译
1 parent 222859b commit bf1a1d2

File tree

6 files changed

+120
-16
lines changed

6 files changed

+120
-16
lines changed
 

‎README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,13 @@ Akka 是一个用 Scala 编写的库,用于在 JVM 平台上简化编写具有
125125
- [许可证](https://github.com/guobinhit/akka-guide/blob/master/articles/project/licenses.md)
126126
- [项目](https://github.com/guobinhit/akka-guide/blob/master/articles/project/links.md)
127127
- [附加信息](https://doc.akka.io/docs/akka/current/additional/index.html)
128-
- [二进制兼容规则](https://doc.akka.io/docs/akka/current/common/binary-compatibility-rules.html)
129-
- [模块标记为“可能改变”](https://doc.akka.io/docs/akka/current/common/may-change.html)
130-
- [如何部署 Akka?](https://doc.akka.io/docs/akka/current/additional/deploy.html)
131-
- [常见问题](https://doc.akka.io/docs/akka/current/additional/faq.html)
132-
- [IDE 提示](https://doc.akka.io/docs/akka/current/additional/ide.html)
133-
- [书籍和视频](https://doc.akka.io/docs/akka/current/additional/books.html)
134-
- [OSGi 中的 Akka](https://doc.akka.io/docs/akka/current/additional/osgi.html)
128+
- [二进制兼容规则](https://github.com/guobinhit/akka-guide/blob/master/articles/additional/binary-compatibility-rules.md)
129+
- [模块标记为“可能改变”](https://github.com/guobinhit/akka-guide/blob/master/articles/additional/may-change.md)
130+
- [如何部署 Akka?](https://github.com/guobinhit/akka-guide/blob/master/articles/additional/deploy.md)
131+
- [常见问题](https://github.com/guobinhit/akka-guide/blob/master/articles/additional/faq.md)
132+
- [IDE 提示](https://github.com/guobinhit/akka-guide/blob/master/articles/additional/ide.md)
133+
- [书籍和视频](https://github.com/guobinhit/akka-guide/blob/master/articles/additional/books.md)
134+
- [OSGi 中的 Akka](https://github.com/guobinhit/akka-guide/blob/master/articles/additional/osgi.md)
135135

136136

137137

‎articles/additional/books.md

+26-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,37 @@
1-
# 作为 FSM 的行为
1+
# 书籍和视频
2+
## 书籍
3+
### 推荐阅读
24

5+
- [Reactive Design Patterns](https://www.reactivedesignpatterns.com/), by Roland Kuhn with Jamie Allen and Brian Hanafee, Manning Publications Co., ISBN 9781617291807, Feb 2017
6+
- [Akka in Action](https://www.lightbend.com/resources/e-book/akka-in-action), by Raymond Roestenburg and Rob Bakker, Manning Publications Co., ISBN: 9781617291012, September 2016
37

8+
### 其他关于 Akka 和 Actor 模型的书籍
9+
- [Akka Cookbook](https://www.packtpub.com/application-development/akka-cookbook), by Héctor Veiga Ortiz & Piyush Mishra, PACKT Publishing, ISBN: 9781785288180, May 2017
10+
- [Mastering Akka](https://www.packtpub.com/application-development/mastering-akka), by Christian Baxter, PACKT Publishing, ISBN: 9781786465023, October 2016
11+
- [Learning Akka](https://www.packtpub.com/application-development/learning-akka), by Jason Goodwin, PACKT Publishing, ISBN: 9781784393007, December 2015
12+
- [Reactive Messaging Patterns with the Actor Model](http://www.informit.com/store/reactive-messaging-patterns-with-the-actor-model-applications-9780133846836), by Vaughn Vernon, Addison-Wesley Professional, ISBN: 0133846830, August 2015
13+
- [Developing an Akka Edge](https://bleedingedgepress.com/developing-an-akka-edge/), by Thomas Lockney and Raymond Tay, Bleeding Edge Press, ISBN: 9781939902054, April 2014
14+
- [Effective Akka](http://shop.oreilly.com/product/0636920028789.do), by Jamie Allen, O’Reilly Media, ISBN: 1449360076, August 2013
15+
- [Akka Concurrency]](https://www.artima.com/shop/akka_concurrency), by Derek Wyatt, artima developer, ISBN: 0981531660, May 2013
16+
- [Akka Essentials](https://www.packtpub.com/application-development/akka-essentials), by Munish K. Gupta, PACKT Publishing, ISBN: 1849518289, October 2012
17+
- [Start Building RESTful Microservices using Akka HTTP with Scala](https://www.amazon.com/dp/1976762545/), by Ayush Kumar Mishra, Knoldus Software LLP, ISBN: 9781976762543, December 2017
418

519

20+
## 视频
21+
22+
- [Effective Akka HTTP](https://www.youtube.com/watch?v=uxQta776jJI), by Johannes Rudolph, Reactive Systems Meetup Hamburg, November 2016
23+
- [Zen of Akka - an overview of good and bad practices in Akka](https://www.youtube.com/watch?v=vgFoKOxrTzg), by Konrad Malawski, ScalaDays New York, June 2016
24+
- [Learning Akka Videos](https://www.packtpub.com/application-development/learning-akka-video), by Salma Khater, PACKT Publishing, ISBN: 9781784391836, January 2016
25+
- [Building Microservice with AKKA HTTP (Video)](https://www.packtpub.com/application-development/building-microservice-akka-http-video), by Tomasz Lelek, PACKT Publishing, ISBN: 9781788298582, March 2017
26+
627

7-
----------
828

9-
**英文原文链接**[Behaviors as Finite state machines](https://doc.akka.io/docs/akka/current/typed/fsm.html).
1029

1130

31+
----------
32+
33+
**英文原文链接**[Books and Videos](https://doc.akka.io/docs/akka/current/additional/books.html).
34+
1235

1336
----------
1437
———— ☆☆☆ —— [返回 -> Akka 中文指南 <- 目录](https://github.com/guobinhit/akka-guide/blob/master/README.md) —— ☆☆☆ ————

‎articles/additional/deploy.md

+57-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,67 @@
1-
# 作为 FSM 的行为
1+
# 如何部署 Akka?
22

3+
Akka 可以以不同的方式使用:
4+
5+
- 作为库:在应用程序的环境变量中作为一个常规 JAR 使用,将其放入`WEB-INF/lib`
6+
- 作为与「[sbt-native-packager](https://github.com/sbt/sbt-native-packager)」打包的应用程序
7+
8+
## 原生打包程序
9+
10+
`sbt-native-packager`是用于创建任何类型应用程序(包括 Akka 应用程序)的分发的工具。
11+
12+
`project/build.properties`文件中定义 sbt 版本:
13+
14+
```yml
15+
sbt.version=0.13.13
16+
```
17+
18+
`project/plugins.sbt`文件中添加`sbt-native-packager`
19+
20+
```
21+
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.5")
22+
```
23+
24+
按照「[ sbt-native-packager 插件文档](https://sbt-native-packager.readthedocs.io/en/latest/archetypes/java_app/index.html)」中`JavaAppPackaging`的说明进行操作。
25+
26+
## 在 Docker 容器中
27+
28+
你可以在 Docker 容器内同时使用 Akka 远程处理和 Akka 集群。但是请注意,在使用 Docker 时,你需要特别注意网络配置,在「[Akka behind NAT or in a Docker container](https://doc.akka.io/docs/akka/current/remoting.html#remote-configuration-nat)」中描述了相关信息。
29+
30+
你可以查看「[带有 docker-compse 示例项目的集群](https://developer.lightbend.com/start/?group=akka&project=akka-sample-cluster-docker-compose-java)」,以了解实际中的情况。
31+
32+
为了让 JVM 在 Docker 容器中运行良好,可能需要调整一些通用(不是特定于 Akka)参数。
33+
34+
### 资源限制
35+
36+
Docker 允许限制每个容器的资源使用。
37+
38+
### 内存
39+
40+
你可能希望在 JVM `8u131`之后使用「[-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap](https://dzone.com/articles/running-a-jvm-in-a-container-without-getting-kille)」选项设置,这使它了解`c-group`内存限制。在 JVM 10 和更高版本上,则不再需要`-XX:+UnlockExperimentalVMOptions`选项设置。
41+
42+
### CPU
43+
44+
对于多线程应用程序(如 JVM),CFS 调度程序限制是不合适的,因为它们会限制允许的 CPU 使用,即使主机系统有更多的 CPU 周期可用。这意味着你的应用程序可能缺少 CPU 时间,但你的系统似乎处于空闲状态。
45+
46+
因此,最好完全避免`--cpus``--cpu-quota`,而是使用`--cpu-shares`指定相对容器权重。
47+
48+
## 在 Kubernetes 中
49+
### 集群 bootstrap
50+
51+
为了利用你在 Kubernetes 内部运行而形成集群这一事实,你可以使用「[Akka Cluster Bootstrap](https://doc.akka.io/docs/akka-management/current/bootstrap/)」模块。
52+
53+
你可以查看「[带有 Kubernetes 示例项目的集群]()」,以了解实际中的情况。
54+
55+
### 资源限制
56+
57+
为了避免 CFS 调度程序限制,最好不要使用`resources.limits.cpu`,而是使用`resources.requests.cpu`配置。
358

459

560

661

762
----------
863

9-
**英文原文链接**[Behaviors as Finite state machines](https://doc.akka.io/docs/akka/current/typed/fsm.html).
64+
**英文原文链接**[How can I deploy Akka?](https://doc.akka.io/docs/akka/current/additional/deploy.html).
1065

1166

1267

‎articles/additional/ide.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
# 作为 FSM 的行为
1+
# IDE 提示
2+
## 在 IntelliJ / Eclipse 中配置自动导入功能
23

4+
为了获得平稳的开发体验,当使用诸如 Eclipse 或 IntelliJ 之类的 IDE 进行 Scala 和 viceversa 的工作时,你可以从`javadsl`中禁止自动导入(`auto-importer`)功能。
35

6+
在 IntelliJ 中,自动导入设置位于`Editor/General/Auto Import`下。使用诸如`akka.stream.javadsl*``akka.stream.scaladsl*``*javadsl*``*scaladsl*`等名称掩码指示要从`import/completion`中排除的 DSL。请参见下面的屏幕截图:
7+
8+
![auto-import](https://github.com/guobinhit/akka-guide/tree/master/images/additional/ide/auto-import.png)
9+
10+
Eclipse 的使用者则可以在 IDE 的`Window/Preferences/Java/Appearance/Type Filters`路径下进行配置。
411

512

613

714
----------
815

9-
**英文原文链接**[Behaviors as Finite state machines](https://doc.akka.io/docs/akka/current/typed/fsm.html).
16+
**英文原文链接**[IDE Tips](https://doc.akka.io/docs/akka/current/additional/ide.html).
1017

1118

1219

‎articles/additional/may-change.md

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
1-
# 作为 FSM 的行为
1+
# 模块标记为“可能改变”
22

3+
为了能够引入新的模块和 API,而不必在它们发布时冻结它们,因为我们的「[二进制兼容性](https://github.com/guobinhit/akka-guide/blob/master/articles/additional/binary-compatibility-rules.md)」保证了我们引入的术语可能会改变。
34

5+
具体地说,可能改变(`may change`)意味着 API 或模块处于早期访问模式,并且它:
46

7+
- 不包括在 LightBend 的商业支持范围内(除非另有明确规定)
8+
- 不能保证在次要版本中是二进制兼容的
9+
- 可能在小版本中以中断方式更改了 API
10+
- 可能会在一次小的发布中从 Akka 中完全放弃
11+
12+
完整的模块可以标记为“可能改变”,这可以在其模块描述和文档中找到。
13+
14+
单独的公共 API 可以用`akka.api.annotation.ApiMayChange`进行注释,以表明它比它所在的模块的其余部分的安全性更低。例如,当将“新” Java 8 API 引入到现有的稳定模块中时,这些 API 可以用这种注释标记,以指示它们尚未被冻结。请小心使用这些方法和类,但是如果你看到这样的 API,那么现在就是最好的来尝试使用它们的时候,并且可以在它们被冻结为完全稳定的 API 之前提供反馈,例如使用`akka-user`邮件列表、GitHub 问题或 Gitter。
15+
16+
可以提供尽最大努力的迁移指南,但这取决于可能更改模块的具体情况。
17+
18+
这样做的目的是能够尽早发布特性,使它们易于使用,并根据反馈进行改进,或者甚至发现模块或 API 根本就没有用。
19+
20+
这些是标记为“可能改变”的当前完整模块:
21+
22+
- [多节点测试](https://github.com/guobinhit/akka-guide/blob/master/articles/clustering/multi-node-testing.md)
23+
- [Akka 类型](https://doc.akka.io/docs/akka/current/typed/actors.html)
524

625

726
----------
827

9-
**英文原文链接**[Behaviors as Finite state machines](https://doc.akka.io/docs/akka/current/typed/fsm.html).
28+
**英文原文链接**[Modules marked “May Change”](https://doc.akka.io/docs/akka/current/common/may-change.html).
1029

1130

1231

‎images/additional/ide/auto-import.png

212 KB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.