2

I am building an Erlang/OTP system which consists of a MochiWeb web server, some custom Erlang/OTP applications and a few non-native components, which are the following:

  • a CouchDB database to store both the state of the MochiWeb web server and the persistent data (users, accounts, etc.)
  • a legacy PostgreSQL database to store some other entities (orders, accounts, etc; client's requrement: can not be migrated to CouchDB, the data should be used as is);
  • an Asterisk server to provide phone notifications to the users of the system.

I would like to achieve a high level of uptime and availability and thus I would like to know what is the best way to monitor those non-Erlang/OTP elements of the system. Basically, I would like to have each element of the system to be supervised, monitored and restarted if needed. It is easy achieveable for Erlang/OTP applications, but I don't know how to do that with non-Erlang components.


Should I wrap them as Erlang/OTP applications and include into the OTP supervision tree?

Or should I use some third-party software tools to monitor and supervise those non-Erlang/OTP components of the Erlang/OTP system?

What is the best known practice to do that?

4

1 回答 1

3

答案取决于:P

我已经看到使用这两种方法,但我不太确定一种方法是否比另一种更有优势。我的直觉是选择一个通过 erlang 中的端口管理应用程序的应用程序。这样,您就有了一种很好的集中方式来了解问题是否出现,并且可以轻松解决问题。

于 2013-07-12T10:03:42.373 回答