

Building Jabber Chat Bots in place of redundant web applications - ashwinraghav
http://ashwinraghav.wordpress.com/2011/05/09/interactive-jabber-bots/
I spoke at a conference recently on building jabber chat bots as interfaces instead of getting end-users to run scripts on their machines. I find it an interesting way to present scripts to non technical users
======
whileonebegin
This is an interesting solution, but I wonder if it was more novelty-based,
than a product of necessity. It's true that the chat bot can be decentralized,
running from anyone's laptop, to serve incoming requests. However, so could a
web application. Sooner or later, it would have to be run from a dedicated
server anyway. As far as maintenance, how is a chat bot wrapping the script
any easier to maintain than a web app?

~~~
ashwinraghav
Thanks for bringing up the web-app vs chat bot straight away. I did get some
questions on these lines during the conference itself. 1) I do not agree that
maintaining bots and web apps are the same effort-wise. An IRC can very easily
be served of a framework that is event driven in nature -- on the lines of a
node.js or eventmachine with barely any additional effort. On the other hand,
doing this for a web application would require extensive effort for writing
your code the right way and bringing in the right tools like a templating
engine. You will build your own framework almost.

2) Since the application is process heavy and take over 45 seconds to serve a
request, this would involve extensive tweaking of your forward proxy which in
the case of most data centres and clouds will simply respond with a "Service
Unavailable" after 30 seconds. Off course you can defer this to a background
job and provide the results elsewhere on your application. But like I said,
you would be doing things that the user actually does not need.

3) How would you scale up such an operation heavy application if it were a web
app. Have 1000 background jobs running for a 1000 users? An event driven
approach will pay off for sure. And 1) illustrates why its easier to do this
with a bot.

The real disadvantage I came across was to be able to get it to work with a
load balancer. I can write about this if there is more interest.

------
uniclaude
I almost had a tear in my eye while watching that video. It makes me feel like
we're back in the 90s creating IRC bots, but come to think of it, it's a
simple and working solution to some problem.

~~~
ashwinraghav
Ah well, I guess there is nothing wrong in getting back to an 'old' yet
'proven' solution.

------
pbreit
So is there an easy way to set this up, preferably server-agnostic?

~~~
ashwinraghav
Here is the ruby library that I used <https://github.com/ashwinraghav/marvin>.
It can help you write a pure ruby application that you can later convert to an
event-driven app(If you wish)

------
th0ma5
i feel this is all essentially what message oriented middleware is.

------
thomasdavis
I enjoyed this and quite an inspiring alternative to solving problems.

