Skip to main content

[Programming] XMPP and Office Guru (Part 1)

I heard an idea one day.. They wanted some kind of 'online board' where everyone is duly accounted for. May it be that someone is on a meeting, or went out for coffee or whatever. Another thing they wanted was they wanted to have an in house chat application. I squirmed at the thought of building one just for that sole purpose when there are already gajillions of chat programs out there, open source, free, robust and would most likely work great. I dont see the point in reinventing the wheel if there is already a Michelin tire available up for grabs. Not to mention that it would easily integrate with any existing system.

To those who dont know, Google made a half baked embodiement of their intelligent search engine in a form of a chat bot.. Aka, Google Guru. Feel free to add him (or her) to your GChat (guru@googlelabs.com) and ask him (or her) simple things like "temperature manila" .. So why not create something like Google Guru, like Office Guru or something?

Please dont ask it the meaning of life, we already tried. Im wondering, if in the future, this guy would pass the Turing test.
So what Office Guru does is that, you add Office Guru to your chat application and tell it something if ever you plan on leaving your desk. For example "meeting at Coffee Bean" or "went to pee" or "on sick leave" then Office Guru would post that to the 'online board' where everyone could see and know where in the world are you.

So going to the technical side, you would need a server which has and XMPP server application. Google Chat uses the XMPP protocol so which, in theory you could use it to be able to have your Google Chat account communicate with the XMPP server.

I was looking for a quick and dirty solution for me to deploy to my Ubuntu home server, so I started Googling XMPP server and Ubuntu. I found several articles which seems to be a good lead

http://www.ubuntu-unleashed.com/2007/08/howto-install-openfire-xmpp-jabber.html
http://www.classhelper.org/articles/debian-openfire-chat-server/openfire-server-install-p1.shtml

Well looking at the Google Chat api, it seems to be in beta, and is currently in labs.

Im not quite sure if im doing the right approach. What i actually want is:

My sever (running XMPP client/server or whatever, logged in to my Office Guru account) would accept messages from anyone and parse that message and then save that to a database.. which a webpage would look into that database to see the latest updates/messages from the user.

Apparently, looking a bit further, Google App Engine supports XMPP service.. This is exactly what I want. But unfortunately, Im really not good in speaking Java or Python.. I kinda wish that this setup could be emulated in my local server.

Good read though. http://code.google.com/appengine/articles/using_xmpp.html

Ok. So I think I need to read more. Im gonna try installing an XMPP server and see the functionality from there.

Will update again for progress.

ps: I was kinda thinking of naming my guru, PogzBot .. Pretty neat huh?

pps: Im thinking of extending this by having an SMS gateway where you could text PogzBot and.. wait.. scratch that thought.. If I have an SMS gateway like Gnokii, it could directly write to the database.. I would just need a proper identifier which could link a certain cellphone number to an email account. No points for being unecessarily creative. Haha.

-- 10:47PM Logs Start --


ok let me try looking for the package if it exists
apt-cache search openfire 
seems like it returned empty. checked openfire website.. well there is a consolation.. it has some deb packages, which is probably compatible with my ubuntu server. well, lets try it.

visiting http://www.igniterealtime.org/downloads/index.jsp#openfire

clicked on linux platform. copy the deb link and issued a
wget http://www.igniterealtime.org/downloads/download-landing.jsp?file=openfire/openfire_3.7.0_all.deb 
command on the server to fetch the file.

why is it taking so long to resolve the domain? anyway, there it is, downloaded. great. now lets install the package ..
dpkg -i openfire_3.7.0_all.deb
well that was pretty much stupid, it downloaded it as
download-landing.jsp?file=openfire%2Fopenfire_3.7.0_all.deb
what? ok let me rename that..
mv download-landing.jsp?file=openfire%2Fopenfire_3.7.0_all.deb openfire_3.7.0_all.deb
lets try the previous command

ok still got an error
root@odin:/home/odin# dpkg -i openfire_3.7.0_all.deb
dpkg-deb: `openfire_3.7.0_all.deb' is not a debian format archive
dpkg: error processing openfire_3.7.0_all.deb (--install):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 openfire_3.7.0_all.deb
not a debian package? are you blind? ok, i think there was a download problem. i tried heading on to the web browser and clicking the link directly.. as suspected, i was thrown into a new page which contained the link 'if the download window does not appear please click here" .. coped the link on the click here hyperlink.. that stuff is more reliable..
wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3.7.0_all.deb
now we're talking.

reading through the manual found at

http://library.linode.com/communications/xmpp/openfire/ubuntu-9.04-jaunty#install_openfire

seemed to get me drowsy and sleepy. I was never a fan of reading manuals.

ok as expected, i skipped installing the java part. it threw a dependency error.

root@odin:/home/odin# dpkg -i openfire.deb
Selecting previously deselected package openfire.
dpkg: regarding openfire.deb containing openfire, pre-dependency problem:
 openfire pre-depends on sun-java5-jre | sun-java6-jre
  sun-java5-jre is not installed.
  sun-java6-jre is not installed.
dpkg: error processing openfire.deb (--install):
 pre-dependency problem - not installing openfire
Errors were encountered while processing:
 openfire.deb
I ran a quick apt

apt-get install sun-java6-jre
but for some reason, it says that its unavailable. what the? seriously. 

ok again, because i was skipping the manual, i skipped editing the repository to enable multiverse.
nano /etc/apt/sources.list
ran an apt-get update and apt-get upgrade after. 

still cant find the packages. oh come on. 



i think ill sleep for a while.

-- 10:47PM Logs End--

Comments

Popular posts from this blog

Moving to a New Linux Web Based Torrent Client

For years, I have been using TorrentFlux (url here) as my primary torrent client situated in my Ubuntu download server. But as time went on, the developers completely abandoned the development of TorrentFlux which led to several forks which I think is still insufficient for my needs. Main GUI of TorrentFlux Ive checked several options which runs on a GUI-less environment. Since my Ubuntu server is just running on command line to save precious memory, I needed something bare, simple and is packed with features. Installing uTorrent Server is pretty straight forward. Download. Uncompress. Run. This is better than the approach of TorrentFlux which you need to setup LAMP server and create a database. More often than not, it happens to me that some of the data in the DB gets corrupted. I normally just reinstall the whole thing again. Main GUI of uTorrent Server To further elaborate on the setup process, I've gotten an excerpt from this thread which, quite simply discusses ho

LTE and the Unlocked iPhone 5

So heres the deal, theres a new iPhone out there and its got the new blazing LTE. If you're planning to get one buying from countries which have unlocked options (Canada, Singapore, Hong Kong) doesnt necessarily merit that you'll get LTE compatibility wherever you go. In the iPhone 5 website, theres a little asterisk there. Pretty sneaky if you ask me, that they have created 2 different models probably using 2 different LTE chips. GSM model A1428*: UMTS/HSPA+/DC-HSDPA (850, 900, 1900, 2100 MHz); GSM/EDGE (850, 900, 1800, 1900 MHz); LTE (Bands 4 and 17)  GSM model A1429*: UMTS/HSPA+/DC-HSDPA (850, 900, 1900, 2100 MHz); GSM/EDGE (850, 900, 1800, 1900 MHz); LTE (Bands 1, 3, 5) - From: http://www.apple.com/iphone/specs.html So what does this mean? If you're planning to get an unlocked unit from other country, LTE speeds might not be compatible with yours. From Wikpedia , theres a working list of LTE bands per country. With me residing in the Philippines it seems t

Ive Messed Up My Master Boot Record

I got too overly excited in refreshing my OS installation in my old Inspiron 640m that I just cleaned off the Linux partition through the Drive Management Snap-in of Microsoft while I was still booted in XP. I completely forgot that the GRUB was the bootloader managing my OS selection in the Master Boot Record of my drive. In plain English, I wanted to clear out my old Linux installation and merge the partition with the old XP partition when I run the Windows 7 install. It was a mistake to use the Drive Management Snap-in rather than having the Windows 7 installation take care of the partition clearing. This caused problems because the bootloader (GRUB) or the one which asks which OS are you going to boot is in the partition I wiped out. Therefore, I cannot go into the Linux partition (obviously, since it has already been wiped out) nor the Windows XP partition. There is a quick fix with this by using the XP install CD and fixing the MBR by going to the command prompt and typing fi