My story of an IM Chat bot from 2002...

Back from vacation, let's get to my story for this blog post.

So in 2002 I was still working for this big Online Service Provider and had just successfully introduced CVS to the release process of our software/content projects. This success got me the offer to move from Web Developer to System Architect. Which I took, of course, cause after more ore less 10 Years of mainly develop software I was ready for a change.

In my new role as Software Architect my main task was to help and support 3rd party content providers to develop adapters for our advanced template publishing system, which we used to publish content to our web pages, affiliate content placement and of course our Online Client. Since this system was pretty sophisticated, well documented, well maintained, well designed and easy to develop for, I had some time on my hand.

I used this time to introduce a web driven process to the newly introduced CVS release process. With this all involved personnel could use a web page, written in java and jsp, to get information about releases, schedule releases, aso.

But that's not what I want to talk about. My boss visited our Mother company in US early 2002 and when he came back, he brought a nice piece of software with him. But a little background first. As you can imagine our company had a IM service and client, too, like so many in the early 2000's. This client was written in C++ and was UI only and only available for Windows and MacOs.

The software my boss brought back was an IM client which implemented a cli only interface in java for our proprietary IM protocol. It was written by our R&D with the help from some students from MIT. And the best part was, my boss brought back the source code. Since I had not much to do and I was a newly named System Architect, he wanted to see what I would make out of this proprietary software.

So I started to analyse the software. After a few weeks I made a report, which basically stated, it was very well written, designed and implemented. And it was easily extendable. And that was very good news for us, since for our normal IM, if you wanted to do extensions, you had to hoop trough loops and fill out many forms and contact many managers to get a meeting to present your extension or plug-in.

So after I presented my findings to my boss, and showed him the java IM client running on my Windows workstation and answering to a "Hello" from my account - it was a little hack I did, and not the plug-in I developed later -, he gave me the official task to investigate further and come up with an idea what to do with it.

After some distractions, like summer vacation and work for ATPS, I was able to finalise my idea and present it to my boss and his managers. My idea was basically the same what I had implemented in the CVS release web page. So the idea was to write a bot which would react in the same way like the web page. And what can I say I got the go for that CVS release bot by all managers.

Obviously it would be nice to show some code, but 1) it is almost 20 years ago since I worked on my bot, so the code is long lost and 2) it was proprietary and copyrighted code, so I have no right to show code, even so, that the company long stopped to exist, at least in Germany, and is only a Brand Name only, nowadays. But what I can do is describe a little what I did and what it was.

Ok, let's dive into it. The java IM client was able to login to the IM network, but it was not able to register a user. So I registered a normal IM user and created a private group, where I added this new "technical" user IM account. With this IM account, the IM client was able to login into the IM network. Oh I forgot to say, that it was not running on Unix, yet. Only on my windows workstation. There was no VMs or Containers where you could simulate a Unix environment. At least for us. Back then we had only the "Snow Flake" or "Pet" systems concept, available. But the IM worked on Windows and that was ok, since most of java development was done on Windows, anyway.

After the the login worked, I moved on to implement a plug-in and a simple plug-in system, which listened to commands send in the private and react accordingly. Since the java IM client was well structured and well designed, it was easy to find a hook where I could introduce my plug-in system. Here is a nice post so you get an idea what I did.

The basic plug-in simply reacted on basic words, like "Hello" and "help". And I implemented a simple authorisation system, by asking a question, where the operator had to answer with the secret. Well, not so secure, but back then security was not a concern. Making it work was.

Making the basic commands work with the plug-in was only the first step. The next was to make it work on our Dev Unix server. As usual you had to struggle with the Windows / Unix differences, but in the end I got it running on our Dev Test server. So I was able to enter a "Hello" on my Windows workstation in the UI IM client and the java IM client on the Dev Test server answered and asked for the secret.

Since that worked well, I started to implement more "unix-like" commands, like "ls", "cat", "cd" and of course "rm" :-) Cause of the very basic plug-in system it was a simple task. Basically I simple used the Java Runtime features to execute those commands on a unix shell, capturing the output and mirror the output to the chat.

All in all, not so impressive, I just implemented something you could do in one way or another with ssh or say an upgraded web page, too. But the real story is, that I did it over the big company chat network. Of course nowadays this would be considered extremely insecure, since there was no end-to-end encryption, no proper authorisation and mixing public and internal stuff, cause there where simply no internal chat servers available for us. Anyway, this was 2002 and most of the security features and concepts where not yet invented or implemented or followed by.

As you remember I set out to write a CVS release bot. Naturally after I was able to send commands over chat to our Dev Test server, I wanted to achieve my goal. First I tried to use the "cvs" shell command to accomplish what I want, but I was not happy with that. So I searched around and found a java implementation of a cvs client. I tried to find it again, but almost 20 years later, it is lost to the speed of I.T. progress. But with this CVS java client, I was able to enhance my plug-in and connect to the cvs server and get repository information directly in java, without detour over a unix shell.

The new enhanced plug-in was now a POC and stable enough to be presented in our Autumn/Winter showcase company meeting. What I did. And it was a success.

But as life is there are always changes. In 2002 the bubble bursted, and we in Germany where effected from it, too.

Our Mother company needed to cut costs, not only in US, no worldwide, so we got a new CEO for the german branch, he was from France and known as cost cutter. After one visit and I guess some analysing of the structure of the German branch and their offices, he decided to close down the Munich branch and lay off (we got informed one week before Christmas, what a nice Christmas surprise it was) all employees in Munich, ok not all some essential personnel could join the staff in the German Main Office. For me it meant I was out of a job in some month. Thankfully I had an old contract, where my lay off period was 6 month, so after finally getting my lay-off notice in February 2003, I had 6 month paid leave. And I used it to find a job at a bail bonding company in US. But that's another story for the future.

For my CVS release bot project, even it was a success so far, it meant the end. No finishing up, no doing documentation, no archiving the code for later use. Just stop and forget about it. Well, very sad for me, cause I thought if I could have continued it would have been a great addition to our workflow. Anyway, 20 years later I still think it was pioneering work combining a Version Control System, with Chat and integrating it with unix servers. Not as sophisticated and secure as it is done with ChatOps nowadays, but still impressive, IMHO.

But I let you judge, if what I did was pioneer work or just a pragmatic solution for an everyday I.T. problem. That's my story how I did write a bot and do ChatOps in 2002.

Well, since my return from vacation I realised I don't want to continue a weekly schedule for my blog. Most likely I do a by-weekly or maybe monthly blog post, with some irregular post, when I find something I want to share. Mainly what Scott Hanselman does with his blog. And by the way, you should pop by his blog, he just released a nice blog post about his usage of "Oh My Posh". And I was inspired inspired by him to use it, too.

As always apply this rule: "Questions, feel free to ask. If you have ideas or find errors, mistakes, problems or other things which bother or enjoy you, use your common sense and be a self-reliant human being."

Have a good one. Alex