uCme

The ucme project has gone through three significant cycles. The system was never really intended to be used in any production environment. It was rather started as an exersise and well… something to do.

These are the cycles:

  1. C++ CGI programs using flat files for storage of user profiles and messages
  2. Servlet based system with MySQL for storage of user profiles and messages
  3. JSP/Servlet based system with MySQL storage, and a SOAP webservice API

C++ based CGI system

The first stage began back in 1997 when I began writing a server side instant messaging system with C++ using CGI. Although this project founded the basis for UCME, at the time I called the system ICU. It was a rather rudimentary attempt and became partially functional before I lost interest.

Although unfinished, the project features a few somewhat elegant solutions. One solution in particular was the separation of HTML code from the C++ CGI code. In order to accomplish this a mechanism was created that performed simple substitution of “macros” inside “thtml” (template html) files. These thtml files contained strings staring with two “@” chars and terminated by a semi-colon. These strings were parsed then substituted with the output of either some function or straight value substitution.

List of implemented items:

  • registration
  • login
  • search, add, remove buddies from your list
  • auto refresh buddies list with online status indicators

List of items that did not get implemented:

  • messaging
  • file sending

ICU utilized a specific directory structure to store user profiles in flat files. The theory was to use this directory structure to store the text messages and files as well.

A semi-working copy of my code is running at icu.slashdev.ca

Servlet based system

The second cycle in the life of the UCME project began in my first year of college when A friend of a friend offered me some Java development work. At this point my language of choice was C and C++, however I was willing to learn so Tamas bought me a book and sent me on my way. I was to read the book and begin working on some sort of project of choice to prove that I had acquired the skills Tamas required. I did eventual finish my project and that project was a complete re-write of UCME using Java Servlets and JSP.

This re-write was database driven with MySQL. All user accounts, buddie lists, and messages were stored in tables. The file sending feature, however, used a directory structure to store the files. The directory tree was structured in such a way that the system could determain a users list of pending files without resorting to a master index.

This form of the system again used a templated html sollution to seperate the html code from the servlets. I wrote a similar java implimentation of the macro system designed in cycle 1 to accomplish this. The entire system was primarily comprised of Servlets along with a few small JSP pages. The Servlets each had there own set of template html files and it quickly became complicated to scale the system.

JSP/Servlet front end, webservice backend

The third and final version was a ground up re-write of the UCME system. This iteration continued to use MySQL, however, I choose to use a SOAP webservice as the primary front end to the database. This aspect of the implementation provided a common API for the system which theoreticly allows the developer to create a client in virtually any platform that has some sort of SOAP implementation.

Again user accounts, buddie lists and messages were stored in tables. Storing files in a complex directory tree became cumersome with the previous UCME system, therefore I choose to store all files allong with everything else… in a table.

For this re-write I decided to stay away from servlets were possible. All interaction with the backend of the system was handled through the API provided by the webservice, therefore, most JSP pages were kept very simple.

This version of the system was full featured with implemented file and message sending. A live version of a web based client is running at ucme.org