Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are most Erlang applications such as MochiWeb, Riak, RabbitMQ, Zotonic, ejabberd and CouchDB OTP applications?

Tags:

erlang

Just started reading the OTP chapter on the great Erlang book by Francesco Cesarini. Are most Erlang applications such as MochiWeb, Riak, RabbitMQ, Zotonic, ejabberd and CouchDB OTP applications?

like image 505
Gaius Parx Avatar asked Sep 23 '10 21:09

Gaius Parx


2 Answers

CouchDB had lot of problems with that but the newest sources published by Cloudant show CouchDB in rebar, so it must be otp compliant.

Riak - the same, on rebar (btw. the same devs rebar and riak). Btw2. it is very nicely written app, good place to learn good practices.

Zotonic source code looks like mess a little bit. I can see there 'application' etc. but directory structure do not look like any proper OTP node. Btw. even Licence is not added on the top of all modules :?

ejabberd is full of sups and apps, but it has also some interesting;) design choices, so maybe do not learn Erlang on this example.

like image 171
user425720 Avatar answered Oct 29 '22 18:10

user425720


The Hibari database app is definitely OTP-based. The server is broken into several OTP apps, including a small one for managing config and logging (gmt), a big one for the server itself (gdss), a small one for native Erlang clients (gdss_client), and separate OTP apps for each of the server-side protocol handlers (e.g. JSON-RPC, UBF, EBF/BERT).

Sometimes a picture is worth at least a few hundred words. I've got some screen captures from the Erlang "appmon" (application monitor) app that shows the supervisor-and-worker process tree. Sorry, the protocol handler apps aren't shown in image #01, but they would be if I had had them running when I captured the image.

The link is here: OTP 'appmon' screen shots

-Scott

like image 32
Scott Lystig Fritchie Avatar answered Oct 29 '22 17:10

Scott Lystig Fritchie