Erlang 的可扩展性秘诀是什么?
Erlang 因在处理大量消息和请求方面无可挑剔而享有盛誉。 我还没有时间下载并尝试深入了解 Erlang 先生对切换理论的理解......所以我想知道是否有人可以教我(或指向一个好的教学网站)。
说作为一个思想实验我我想将 Erlang ejabberd 移植到 Python 和 C 的组合,以一种给我相同的速度和可扩展性的方式。 我必须理解和实施哪些结构或模式? (Python 的 Twisted 已经这样做了吗?)
Erlang is getting a reputation for being untouchable at handling a large volume of messages and requests. I haven't had time to download and try to get inside Mr. Erlang's understanding of switching theory... so I'm wondering if someone can teach me (or point to a good instructional site.)
Say as a thought-experiment I wanted to port the Erlang ejabberd to a combination of Python and C, in a way that gave me the same speed and scalability. What structures or patterns would I have to understand and implement? (Does Python's Twisted already do this?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
函数式语言(特别是 Erlang)如何/为何使用规模很好?(讨论原因)
http://erlang.org/course/course .html(用于教程链)
就移植到其他语言而言,消息传递系统在大多数现代语言中很容易实现。 尽管您无法“免费”获得 Erlang 的内部调度功能,但在 Python 中可以轻松地获得函数式风格。 Stackless Python 可以复制 Erlang 的许多并发功能,尽管我不能透露细节,因为我没有太多使用它。 如果确实看起来更加“明确”(因为它要求您在代码中定义并发性,而 Erlang 的设计将允许内部发生并发性)。
How/why do functional languages (specifically Erlang) scale well? (for discussion of why)
http://erlang.org/course/course.html (for a tutorial chain)
As far as porting to other languages, a message passing system would be easy to do in most modern languages. Getting the functional style can be done in Python easily enough, although you wouldn't get the internal dispatching features of Erlang "for free". Stackless Python can replicate much of Erlang's concurrency features, although I can't speak to details as I haven't used it much. If does appear to be much more "explicit" (in that it requires you to define the concurrency in code in places that Erlang's design will allow concurrency to happen internally).
Erlang 不仅涉及可扩展性,而且主要涉及
Erlang is not only about scalability but mostly about
Erlang 的另一个对可扩展性有影响的特性是轻量级的廉价进程。 由于进程的开销很小,erlang 可以产生比大多数其他语言更多的进程。 与许多其他语言相比,使用 erlang 进程可以获得更多的收益。
Another of the features of erlang that have an impact on scalability is the the lightweight cheap processes. Since processes have so little overhead erlang can spawn far more of them than most other languages. You get more bang for your buck with erlang processes than many other languages give you.
我认为 Erlang 的最佳选择是网络绑定应用程序 - 使节点之间的通信更加简单,并且 OTP 中内置了诸如心跳监控、使用 Supervisor 自动重启之类的功能。
I think the best choice for Erlang is Network bound applications - makes communication much simpler between nodes and things like heartbeat monitoring, auto restart using supervisor are built into OTP.