New Blog
My blog has moved to http://blog.greghaynes.net. This is due to issues I have run into while transferring Wordpress to my new server. Although there are many applications which do just this, some interesting choices by the Wordpress developers don’t allow it to run using the software I would like (most notably, PostgreSQL). Sorry for the inconvenience, and hopefully this new blog system works out for the better.
Kobby GSoC: Connections and Browsing support
Its been a couple weeks since I last blogged about Kobby, and much has happened since then. In my last post I was having issues implementing a Qt socket event plugin for libinfinity, but thanks to some advice from Armin Burgmeier I was able to get this working very quickly. Since then, I have created and then added some features to the Connection Manager for Kobby to make it a little more user friendly (see below)

After getting this worked out I started on the next big step, browsing support in libinfinitymm, which not only includes traversing the directory tree of the Infinote server, but also creating and removing nodes. While looking through the infinote repository I noticed an awesome test application which creates a sort of interactive shell with the server using the client library, so I decided a great way to go about testing my C++ bindings for the Client Browser portion of libinfinity would be to replicate this test, which I just completed this afternoon. Hopefully, I will be able to implement a GUI for this by monday (meaning more screenshots) now that all the backend issues seem to be out of the way.
GSoC: Kobby Week 8
There has been a lot of development work this past week with Kobby. After posting about some design issues I was attempting to clear up before diving into code, Armin Burgmeier (Creator of infinote) pointed out that the term ’session’ in infinote is used to describe the editing ’session’ of a single document, unlike in Kate where it is used to describe a set of documents. Instead of deciding whether confuse either users or developers, I came up with a new naming scheme for the control dialogs which might actually better represent the actions being performed.
After getting the control dialogs worked out I went to connect the infinote functionality for an XmppConnection and ran into some issues with sigc++ and Qt. Luckilly this was a quick (albeit somewhat dirty) fix. It wasnt much longer before I got the connection functionality working, and ran into the next issue: Needing to use the Glib event system from my Qt app. Luckilly, libinfinity was designed to allow for the plugging in of any event system by implementing the Io interface the library provides to register sockets to be monitored and the handling callback functions (very cool). The only issue now is that as far as I can tell, the way this is implemented doesnt doesnt fit well with Glibmm’s design, meaning I may have to create the C GObject subclass for proxying the C++ wrapper by hand.
GSoC Phase 2: Kobby Development
After over a month of working on a C++ wrapper for the infinote libraries I was finally able to start development of the collaborative editing KTextEditor plugin this week. Its amazing what getting to see some of your development work in action, no matter how little, can do for inspiration. This week I plan on completing the session management interface and all its appendages (join session dialog, create session dialog, etc…) and hopefully will have functionality for users to connect to infinote servers by the weeks end. For those of you wondering what I’m referring to by session management: The infinote libraries allow for a set of documents, which comprise a session, to be hosted on a server and be collaboratively edited simultaneously. The Kobby session manager will allow users to join any number of sessions, keeping track of the documents in each editing session and opening/closing them when joining/leaving an infinote session. This brings up some design issues: Because a session could have a large number of documents, downloading and opening all the documents upon joining a session doesn’t seem like a good idea. The options I see are (a) creating a document management interface to select documents to open off the infinote server or (b) having a lazy-opening implementation where documents on the server are added to the editing session, but are not pulled off the server until they are actually selected by the user (anyone know for sure if this is possible?). For now, I’m going to take the document manager interface route, but the lazy implementation sounds like a tempting project, maybe worthy of an option in the configuration interface.
Introducing libinfinitymm
Now that exams are over I have been able to spend the past week getting to really work on my GSOC project. In this time I created a c++ wrapper for libinfnity, which is the library my project will be using. The git repository can be found on Gitorious. Libinfinity has a very flexible object oriented design (the online docs are AWOL, so heres my copy), and should make the rest of my project pretty straightforward. In order to implement the collaborative editing component you need to just supply an object which implements InfTextBuffer (now Infinity::TextBuffer), so making a Kate Document implement this interface should be a breeze compared to the glib/gmmproc funk I’ve been dealing with the past week. For the rest of the week I have a fair amount of testing/code scrubbing to get done, but hopefully not long after i’ll have some results to show off
Now, back to coding.
Wrapping libinfinity
This week I have been working on creating a C++ wrapper for libinfinity. The library uses a gobject API and is very extensible, so ditching it in favor of a non-glib library would be a real waste. Luckily, there are tools like gmmproc (an internal glibmm tool) which auto-generates the C++ classes to wrap gobject based libraries, given that you don’t mind using the gtkmm source code as your documentation. Aside from having a fun time dissecting various libraries to figure out how to use gmmproc, the application is absolutely awesome. The tool reads from definition files (which can also be auto-generated from other glibmm/pygtk tools) which store data on the library’s object names, their member functions, parameters, etc. and parses .hg and .ccg files which contain C++ code with macros (such as _WRAP_METHOD) into source files which are fed to the compiler. Some documentation can be found in the gtkmm book: http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/chapter-wrapping-c-libraries.html. After getting the hang of the tool usage, wrapping the library is a breeze, so a usable version will be on its way very soon.
Kobby, Collaborative Editing
For this year’s Google Summer of Code I will be creating a KTextEditor plugin which allows for collaborative document editing. The proposal abstract can be found at http://code.google.com/soc/2008/kde/appinfo.html?csaid=9433F3446323A693.
The goal of this project is to bring in editor collaboration to KDE. This will allow users to share document trees and watch remote modifications made to them in real time. More so, in order to do this users will no longer have look outside of the editor or IDE. While I have had this project in mind it is amazing how many times I wish I had an editor with the ability to do this, mostly while sitting at a cafe trying to help out someone with a piece of code. This alone has me very excited to get this project working.
Luckily, a very powerful library for all the backend work exists, libinfinity (git://git.0×539.de/git/infinote.git). This library handles all the network communication and security, synchronization, and document hosting, while providing me with a nice TextBuffer interface to glue my plugin to. Writing this plugin will be the meat of my work this summer. Aside from that, I will be adding some nifty client-side features such as document re-visioning, and hopefully adding user access control to the library.
For now, I’m left trying to clear off my plate as much as possible before schools end so I can really devote a couple months to developing an open source project. ![]()
Trivial java chatroom client / server
This week I hacked out an extremely trivial chat room client and server in java. The protocol is very close to xmpp, where all messages are in XML and contained within a message tag. The server model is pretty simple: it just rebroadcasts all messages recieved to all users. Eventually some sender confirmation can be added by making the server compare the ‘from’ attribute of the opening message tag with the socket it came from. The server is also single threaded and makes use of Java’s nonblocking i/o facilities for all read/write operations. The code for the client and server are completely separate, so if nothing else the server can be useful for other projects.

