Files
the-way-to-go_ZH_CN/eBook/19.10.md
marjune 50c2158fe0 Add chapter 19.9 19.10 (#710)
* add chapter 19.9

* add chapter 19.10
2019-08-06 09:24:17 -07:00

16 lines
914 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 19.10 总结和增强
通过逐步构建 goto 应用程序,我们遇到了几乎所有的 Go 语言特性。
虽然这个程序按照我们的目标行事,仍然有一些可改进的途径:
- *审美*:用户界面可以(极大地)美化。为此可以使用 Go 的 `template` 包(见 [15.7 节](15.7.md))。
- *可靠性*master/slave 之间的 RPC 连接应该可以更可靠:如果客户端到服务器之间的连接中断,客户端应该尝试重连。用一个 "dialer" 协程可以达成。
- *资源减负*:由于 URL 数据库大小不断增长,内存占用可能会成为一个问题。可以通过多台 master 服务器按照键分片来解决。
- *删除*:要支持删除短 URLmaster 和 slave 之间的交互将变得更复杂。
## 链接
- [目录](directory.md)
- 上一节:[使用代理缓存](19.9.md)
- 下一章:[Google App Engine 中的 Go](20.0.md)