Posts

Showing posts from September, 2015

Erlang OTP

Joe Erlang had fault tolerance in his mind when he designed and implemented Erlang. He was the chief architect of the project which built Erlang/OTP. Features of Erlang: Concurrent Scalable Soft-Real Time Distributed Fault Tolerant Where all is Erlang used? Telecom Banking E-Commerce Instant Messaging Computer Telephony What is OTP? OTP is set of Erlang libraries and design principles providing middle-ware to develop these systems. It includes its own distributed database applications to interface towards other languages debugging release handling tools Ericsson managed to get the nine 9's reliability in one of its product (99.9999999% reliability). Erlang is based on the following ideas: Share Nothing Pure message passing Crash detection. Let it crash and recover principle Erlang processes are very lightweight. Erlang can have hundreds of thousands of processes. Garbage collection is also good. It can have thousands of independent heaps and all are

Writing your own ejabberd Module

Coming soon: What is ejabberd? What is erlang? Installation details. I will start with writing the ejabberd module first. Once you have done all the installations: sudo make sudo make install sudo ejabberdctl start sudo ejabberdctl stop You can check the status using: sudo ejabberdctl status You can locate logs at: (With default installation) /var/log/ejabberd All config related changes will be mainly done at: /etc/ejabberd/ejabberd.yml You will need a basic understanding of erlang. You can take a short crash course at: http://www.erlang.org/course/course.html This is a good reference. Go to your ejabberd-15.07/src directory. This is where you will write the hook for your ejabberd server. Create a file, say mod_changeBody.erl. Your module name and file name should be same. Add the following basic contents into your erl file: -module(mod_changeBody). -behavior(gen_mod). -include("ejabberd.hrl"). -include("logger.hrl"). -expo