我想知道一个最常见的应用程序/网站/解决方案的列表,成功与否。
解释一下为什么它被用于特定的解决方案,而不是其他编程语言,也会非常受欢迎。
列出BAD Erlang案例研究(误用Erlang的案例)也会很有趣。
我想知道一个最常见的应用程序/网站/解决方案的列表,成功与否。
解释一下为什么它被用于特定的解决方案,而不是其他编程语言,也会非常受欢迎。
列出BAD Erlang案例研究(误用Erlang的案例)也会很有趣。
当前回答
上面已经介绍了Erlang最常见的应用程序(CouchDb, ejabberd, RabbitMQ等),但我想贡献以下内容。
在这些应用程序中使用它的原因来自Erlang的核心优势:管理应用程序可用性。
Erlang是为电信环境从头开始构建的,该环境要求系统满足至少5x9的可用性(每年99.999%的正常运行时间)。这个数字并没有给一年的停机时间留下太多的空间!主要出于这个原因,Erlang加载了以下特性(非详尽的):
Horizontal scalability (ability to distribute jobs across machine boundaries easily through seamless intra & inter machine communications). The built-in database (Mnesia) is also distributed by nature. Vertical scalability (ability to distribute jobs across processing resources on the same machine): SMP is handled natively. Code Hot-Swapping: the ability to update/upgrade code live during operations Asynchronous: the real world is async so Erlang was built to account for this basic nature. One feature that contributes to this requirement: Erlang's "free" processes (>32000 can run concurrently). Supervision: many different strategies for process supervision with restart strategies, thresholds etc. Helps recover from corner-cases/overloading more easily whilst still maintaining traces of the problems for later trouble-shooting, post-mortem analysis etc. Resource Management: scheduling strategies, resource monitoring etc. Note that the default process scheduler operates with O(1) scaling. Live debugging: the ability to "log" into live nodes at will helps trouble-shooting activities. Debugging can be undertaken live with full access to any process' running state. Also the built-in error reporting tools are very useful (but sometimes somewhat awkward to use).
当然,我可以谈论它的功能根源,但这方面与主要目标(高可用性)有点正交。在我看来,有助于实现目标的功能性质的主要组成部分是:“不分享任何东西”。这一特性有助于控制“副作用”并减少对昂贵的同步机制的需求。
我想所有这些特性都有助于在关键业务应用程序中使用Erlang。
Erlang确实不擅长的一件事是:处理大块数据。
其他回答
上面已经介绍了Erlang最常见的应用程序(CouchDb, ejabberd, RabbitMQ等),但我想贡献以下内容。
在这些应用程序中使用它的原因来自Erlang的核心优势:管理应用程序可用性。
Erlang是为电信环境从头开始构建的,该环境要求系统满足至少5x9的可用性(每年99.999%的正常运行时间)。这个数字并没有给一年的停机时间留下太多的空间!主要出于这个原因,Erlang加载了以下特性(非详尽的):
Horizontal scalability (ability to distribute jobs across machine boundaries easily through seamless intra & inter machine communications). The built-in database (Mnesia) is also distributed by nature. Vertical scalability (ability to distribute jobs across processing resources on the same machine): SMP is handled natively. Code Hot-Swapping: the ability to update/upgrade code live during operations Asynchronous: the real world is async so Erlang was built to account for this basic nature. One feature that contributes to this requirement: Erlang's "free" processes (>32000 can run concurrently). Supervision: many different strategies for process supervision with restart strategies, thresholds etc. Helps recover from corner-cases/overloading more easily whilst still maintaining traces of the problems for later trouble-shooting, post-mortem analysis etc. Resource Management: scheduling strategies, resource monitoring etc. Note that the default process scheduler operates with O(1) scaling. Live debugging: the ability to "log" into live nodes at will helps trouble-shooting activities. Debugging can be undertaken live with full access to any process' running state. Also the built-in error reporting tools are very useful (but sometimes somewhat awkward to use).
当然,我可以谈论它的功能根源,但这方面与主要目标(高可用性)有点正交。在我看来,有助于实现目标的功能性质的主要组成部分是:“不分享任何东西”。这一特性有助于控制“副作用”并减少对昂贵的同步机制的需求。
我想所有这些特性都有助于在关键业务应用程序中使用Erlang。
Erlang确实不擅长的一件事是:处理大块数据。
我是在写报告的过程中遇到的:声学射线追踪中的Erlang。
这是一个研究小组尝试使用Erlang进行声学射线追踪的经验报告。他们发现这样写程序更容易,bug更少等等。它的可伸缩性更差,执行速度比类似的C程序慢10倍。因此,它可能不太适合的一个地方是CPU密集型场景。
不过要注意的是,写这篇论文的人还处于第一次学习Erlang的阶段,可能还不知道CPU密集型Erlang的正确开发过程。
我们使用Erlang构建了一个投注交易(又名预测市场)。我们之所以选择Erlang而不是一些更传统的金融语言(c++、Java等),是因为它具有内置的并发性。市场的功能与电话交换机非常相似。我们的CTO在CTO大会上做了一个关于Erlang使用的演讲。
我们还使用CouchDB和RabbitMQ作为我们的堆栈的一部分。
Erlang的优势在于它是一种没有共享内存的函数式语言。因此,在我看来,Erlang不适合需要内存操作的应用程序。例如图像编辑。
显然,雅虎使用Erlang制作了一个名为Harvester的东西。关于它的文章在这里:http://www.ddj.com/architect/220600332