CodeConnect 2 Server and Protocol

Some History

Nearly 4 years ago, I started writing CodeVault. It was a simple program which allowed a user to store "snippets" of code in "vaults" for easy lookup and retreival. It was nice to be able to develop or find a piece of code and have a place to store it, in case you found yourself later involved in a project where you could use the same code.

CodeConnect 2 Early Development

I haven't released a new version since the original CodeVault, but I've rewritten the program about 20 times (not kidding). It has transformed from a local program where the vaults are stored in a local directory to the same principle, but a program which allows incoming connections to the vaults, to what it is now, (and renamed to CodeConnect): a protocol. CodeConnect is a TCP/IP protocol which defines a method for storing and retreiving code. I wrote the first version of the protocol in January, 2003, and the first server in C++ around the same time (GNU/Linux). However, I still wasn't satisfied, so I never completed the protocol nor the server implementation. I have just recently started from scratch in pure C writing a new server (well, I'm using GLib and libxml2). It uses XML for storring configuration and vault profiles. Vault items are storred in XML too.

Where This is Going

I'll add a feature list later, but if you are interested in working on CodeConnect 2, please contact me! I have NO intentions to sell it. The protocol is to be an open protocol. All of my code is released under the GPL. I have had people email me many times asking for me to sell CodeVault (CodeConnect is a derivative implementation of my original principle; CodeVault has been discontinued, CodeConnect is in the beginning stages of development). I will not sell the original CodeVault nor anything regarding the CodeConnect project, so don't ask. However, if you are interested in working on the project with me, please do contact me at aaronbockover at users dot sourceforget dot net.

See current, "live" CC2 development.

If you click the link above, I think you'll wander into my working CC2 development directory. This means you can view the latest source, and possibly download whatever binaries I have compiled, but I offer absolutely no guarantee to the stability or functionality of CodeConnect at any given moment. Right now, I haven't even implemented any of the protocol in the server. I've written the server core, which implements the TCP/IP part for listening for connections and spawning servlets whenever a connection is made. I've also written a cache system for managing all dynamic memory used by the server core and spawned servlets. At some point in the future, when development reaches some minute level of maturity, I'll move CC2 into CVS. I'll also eventually create a separate web site for CC2, but I'd rather focus on its actual development :-P.

I should also note (as I have had many inquiries regarding this matter as well) that I only plan to develop CodeConnect under GNU/Linux. If when CodeConnect reaches stable maturity, someone would like to start a port of CodeConnect to another platform, I certiantly welcome such an undertaking. My code is clean, and both GLib and libxml2 are written in C and port rather well I do beleive.

Also, the current development is for version 2. Version 1 was discontinued (the Jan. 2003 C++ development), and I'm tired of thinking up new names for the project.

Now that the project has been approved at SourceForge, maybe the ball will get rolling on development, and I can have some sort of alpha release soon.

The Official Project Description (What I submitted for approval)

CodeConnect is an open server, client, and protocol enabling users to store useful "snippets" of code in a vault-like structure. The server is designed to allow user-management; administrators can assign vault-owners, each vault-owner may create sub-level vaults under which code items can be organized and stored for public or private access. Private access to a vault is controlled by the vault-owner or the server administrator.

The main reason CodeConnect is being developed is to provide a global method of publicly sharing commonly used and useful source code snippets (though private, controlled access is supported by the underlying CodeConnect protocol as well). CodeConnect is not intended to be an access method for sharing entire projects; rather it allows users to share useful parts of existing projects which can be incorporated into other projects.

Code items can be organized in vaults such that when a user connects to a CodeConnect server and enters a vault, they are provided a remote directory structure which they may traverse; top-level directories may be "Sockets," "GLib Examples," "libxml2 Examples," "POSIX threads examples," etc. The user may then enter one of the top-level directories and be presented with specific items from which the user may request. These items are stored in XML and contain a description of the code, comments from other users, and the actual code. Owners of a particular vault may have write-access (supported by the protocol) to their vaults, so they may add new items or edit existing ones. Public access to a vault is read-only, though it is up to the vault owner to allow public commenting on vault items. The vault owner may also administer user-accounts specific to his or her vault. Specific rights may be given to users of a vault to control different aspects of the vault.

The CodeConnect protocol governs the transfer of commands and data which control the CodeConnect server, and also the response from the server to govern the actions of a connected client. The protocol is designed much like a hybrid of other protocols (the FTP and POP3 protocols were very influential in the design of the CodeConnect protocol, although the CodeConnect protocol is very unique).

The CodeConnect server is the main project goal and is written in C and developed under GNU/Linux. It uses the libxml2 library ( and the GLib library extensively. The server is connection-oriented and sessions-based, and services multiple clients at a time. XML is used for reading server configuration and vault/user configuration. Actual vault-items are stored in a normal directory structure, but the item data is stored in XML as well. Item data files are what the server delivers to the client after a valid request is made.

The client (to be written in C using GTK) connects to the server and requests vault-items (after supplying proper credentials and vault access requests). The server then sends the client the XML vault-item which the client may parse and display to the user in a friendly manner.

No actual development has been started on the client, though development on the server is rapid. Telnet is currently used to test the server. A cache system has been developed for the server using GLib to manage client sessions.

Plans are to support primarily GNU/Linux systems as CodeConnect is being developed under GNU/Linux. Other UNIX-like systems are welcomed, though we do not have the resources to access them.

Features include:

It is possible to use CodeConnect not only to store code items in a structured manner, but really any type of data. One may choose to store collections of poems or quotes. The idea is to provide a global means of access to useful data.

CodeConnect2 Vault System Diagram

I drew this diagram last night (20030806) which (I hope) provides an idea of how the vault system is set up. Drawn in Draw. Click the PNG for a printable EPS version.

CodeConnect2 Vault System Diagram

More diagrams and other publishings coming soon! The protocol is being further developed (on paper) and documented as you read this! :-D Logo

Valid XHTML 1.0 Valid CSS! Copyright © 2003 Aaron Bockover (aaronbockover at users dot sourceforge dot net). Verbatim copying and distribution of this entire text is permitted in any medium, provided this notice is preserved.