The following started out as an exploration of erlang, but the side trip has proven interesting enough to merit its own entry. Accordingly, here are notes regarding the installation of a personal (or “workgroup”, if you prefer) Jabber server on a home LAN. Beware, specific user and host names are filled in, as well as a dummy password; adjust as required.
The first command installs the server. The second command is quite optional, but may be helpful later if you experiment with erlang. The plus side of installing this way is that the installation is standard and will be kept up to date with the distribution. The downside is that the initial install wizard that comes with ejabberd isn’t run, so three small configuration steps are required.
First, sudo vi /etc/ejabberd/ejabberd.cfg.
Now uncomment out one of the administrators, and set it to your preferred user id:
Next, the default setup will insert what this machine knows itself by into the configuration, but what you actually want is what other machines on this LAN know this machine as, so make the following change:
{hosts, ["localhost"]}.
{hosts, ["rubix"]}.
Now, write and exit that configuration file, restart the server, and add your user:
While Jabber (the protocol) allows Jabber IDs to be used by multiple resources (/Laptop and /echocmd are examples above), I couldn’t get this to work with the “simple” Ruby and Python libraries. No problem: since this is your server, creating new IDs are a piece of cake:
sudo ejabberdctl register george rubix password
Note: the first time you receive a message from any new Jabber ID, you will need to confirm it in your GAIM window.
At the moment, I’m primarily using this for “best effort delivery” of notification of events for various background processes I have running. If I’m not online, ejabberd will apparently queue up the messages. Being able to send these messages from the command line, Python, or Ruby makes integration easy. Of course, there are plenty of other libraries spanning most of the popular languages. And anything available to these languages, are accessible via ssh or CGI or any other means you may have set up to tunnel into your LAN from the outside.
For example, Planet Intertwingly reflects my predilection for Atom 1.0 feeds. At first, I periodically spot checked feeds. Then I produced a template which produces a report every time the page is generated. Now I’ve completely automated the check so that I’m notified if any of the feeds is ever replaced by a feed of another flavor by the following small script:
SproutCore Because every language (even JavaScript) needs an MVC framework. Cerny.js - Introduction There might be some good ideas here. Mostly, it smells of bloat. Functional JavaScript at Oliver Steele Yet another JavaScript library that provides...
I have my “personal jabber server” too, using ejabberd. I use it only to run ICQ (pyicq-t), MSN (pymsn-t) and IRC (irc.py, heavily patched) transports. It is only available when my laptop is running and has ipv6 at marlow.memojo.com.
It is a bit tricky, as it can reach IPv4 through NAT, but it is only reachable using IPv6.
As client I use gajim (www.gajim.org) since I got a patch to use different languages in different chat windows in, something that I tried unsuccessfully for years with gaim/pidgin. I have contributed some patches, including polishing the xhtml-im and a ReStructured text xhtml-im generator. :)
Should we call running our own “personal” servers (Nokia’s Apache+mod_python, ejabberd in laptops) PC^2.0? As in PeerComputing2PeerComputing :-P
I’ve been running my own Jabber server for the same reason you give for quite a while now but it really came in handy when the jabber.org server started having uptime issues, I was able to still receive IM’s because now the endpoint is under my control.
This whole idea of using Jabber for near-realtime event notification has got my brain churning. I just may have to get ejabberd up and running on my own server. Did you happen to see any comparisons of ejabberd with djabberd?
Is it possible with sendxmpp or xmpp4r-simple (and cron) to receive notifications of process events as soon as they happen ?
It is possible with sendxmpp or xmpp4r-simple (and cron) to send notifications of process events as soon as they happen. The code above that calls jabber.deliver is an example.
It is possible to receive such notifications with any client that supports Jabber. I use GAIM.
It is possible with sendxmpp or xmpp4r-simple (and cron) to send notifications of process events as soon as they happen. The code above that calls jabber.deliver is an example.
Thanks for the explanation. Actually, I was thinking that process events would be sent only when cron was running.
BTW, when using sendxmpp, have you thought to replying to the JID ? I, for one, would like to manage my shell directly through Jabber with a kind of SSH-over-XMPP transport/component.
(I’ve not really used ejabberd in anger, so this is only a surface comparison)
ejabberd is written in Erlang. djabberd is written in Perl.
ejabberd is designed (by virtue of being written in Erlang) to scale out into a big cluster. djabberd currently has no cluster support.
ejabberd is an XMPP(-IM) server. djabberd is an XMPP server framework, though it happens to come bundled with enough add-ons to make a useful XMPP(-IM) server. (I use djabberd for my own personal Jabber server using only core components.)
djabberd is designed to run in a single thread, using non-blocking I/O for a minimal memory footprint. I couldn’t tell you what ejabberd’s comparable design goals are.
ejabberd is stable, well-tested and widely-used. djabberd is currently used on relatively few servers, has relatively little documentation, and a few XMPP-related bugs are still being found occasionally.
But it should be mentioned that Djabberd runs LJ’s Jabber server with plenty of users, and so far I haven’t noticed any downtime. It may not be written in Erlang, but its scalability story is clearly adequate.
Sam Ruby, who is playing around with ejabberd and XHTML-IM, makes an astute observation: I do believe that Jabber will be a key part of Web 3.0. Whether the recipient will ultimately be a PC or a mobile device is yet to be seen. Ah yes, we’ve...
I’m using a local Jabber server for exactly the same reasons. Because I got into this before I started tinkering with Erlang, I’m using OpenFire. You might want to take a look at that actually, since you don’t need the scalability of Erlang for a ‘personal server’, but it has a lot more features, e.g. built in gateways to other networks, e.g. AIM/MSN. This means you can ditch your multi-protocol clients and go pure Jabber, which opens up a lot of possibilities for rolling your own client or incorporating it into something else.
A Comment on Static Typing Looking at all the problems caused by an even minor issue like SQL Injection it’s pretty difficult to believe that less typing will lead to more robust code. Personal Jabber Server Because everybody ends up managing their...
Mark: I’m pretty sure that I was referring to $HOME. And after installing {ejabberd on a fresh machine today, I see that the problem that I had at the time no longer exists, at least on Ubuntu Gutsy (i.e., installing ejabberd does not create a cookie that will cause you problems down the road).
The following started out as an exploration of erlang, but the side trip has proven interesting enough to merit its own entry. Accordingly, here are notes regarding the installation of a personal (or “workgroup”, if you prefer) Jabber server on a...
There are plenty of IM networks available but most must connect to a remote server, something which is unnecessary for a business, school or home network and lowers the network’s performance. It also makes IM impractical on networks not...
Building a Remote Message Monitor for the iPhone (tags: ruby programming sinatra web2.0 iphone) Time Machine and netatalk (tags: linux mac backup sysadmin) Sam Ruby: Personal Jabber Server (tags: jabber sysadmin) Веб-сервисы и Ruby (tags: ruby web...