AbiCollab, the next steps.

From: <msevior_at_physics.unimelb.edu.au>
Date: Tue Jan 31 2006 - 03:12:55 CET

Hi everyone,
            Here is an update on the current state of AbiCollab and what
needs to happen next. Marc has volenteered to help out on the
XMPP communication stuff.

As some of you know my development style is do itterative bottom up coding
with just enough top-down to write the next bit of code. I need to do this
because I have to learn how things work as I go forward. The consequence
of this is that I only ever have broad roadmap of how a feature will be
implemented at the start of a project. As I advance the feature gets more
clearly defined. I understand that this make collaboration hard as I can't
explain exactly what is needed before hand. I learn as I go along.
AbiCollab is very much following this pattern. Anyway here is the current
state of play as of January 31st, 2005

---------------------------------------------------------------------
There are four classes defined in AbiCollab.h

These are:
ABI_Collab_Export(PD_Document* doc)
ABI_Collab_Import(PD_Document* doc)
AbiCollab(PD_Document * pDoc,UT_UTF8String sID);

and

AllCollabs

There is one class defined in abicollab/xmpp/xmpp.h

It is

ABI_xmpp

Here is a brief decription of he purpose of each class.

ABI_Collab_Export
Briefly ABI_Collab_Export is a lisenter on an AbiWord document. It
translates the various PT changes into XML-ized text packets. In other
words this class serializes AbiWord ChangeRecords. I've tested this code
by writing these packets out to a file. A large fraction of all the code
we need has been written. The next phase is to send these packets over
the internet with the loudmouth library which employs the XMPP protocol.

ABI_Collab_Import
This class de-serializes the packets generated by ABI_Collab_Export and
translates them into operations on the Abiword PieceTable. I've tested
this code by replaying the files generated by ABI_Collab_Export. It
generally works very well. The next phase will be to hook this class up to
receive the XML-ized packets sent over the XMPP protocol.

AbiCollab(PD_Document * pDoc,UT_UTF8String sID)
This class establishes a connection between two remote instances of
AbiWord. Changes to the supplied (pDoc) document are broadcast to the
remote AbiWord. Changes from the remote AbiWord are reflected in in pDoc.
This class has instances of ABI_Collab_Export (m_pAbiExport),
ABI_Collab_Import (m_pAbiImport) and ABI_xmpp (m_pXmpp). ABI_xmpp manages
the connection between the local and remote AbiWord.
This class requires a lot more work. None of the code has been tested.
Eventually the idea is to have:
         an ABI_Collab_Export listener and attached to pDoc. Each ChangeRecord is
serialized and broadcast to the remote AbiWord by calling
        m_pXmpp->sendPacket(UT_UTF8String & sPacket)
        ABI_Collab_Import waiting for input from
m_pXmpp->getNextPacket(UT_UTF8String & sPacket) in the method AbiCollab::
waitForIncomming(void);
        Since AbiCollab::waitForIncomming(void) blocks it must be called from a
single shot timer or glib idle function.
This class requires a lot more work. None of the code has been tested. A
lot more code has to be written.

AllCollabs
This class manages all the AbiCollab instances used throughout the
session. In principle each document can have multiple AbiCollab sessions.
In addition AbiWord could be handling multiple documents. This class is
responsible for managing all these. Connection management includes
establishing connections, removing connections and deleting connections
when a document closes or the user ends an Abiword session. This class
requires a lot more work. None of the code has been tested.

ABI_xmpp
This class is the interface between AbiWord and the XMPP protocol and the
loudmouth library. It establishes a connection through a XMPP session. It
requires an XMPP server, port, username and password. The code to validate
that a remote AbiWord has the right credentials to be connected has not
yet been written. None of the code written has been tested. Much of the
code has been been stolen from the inkboard project of inkscape. I'm very
much still learning about how loudmouth works and what is needed within
this class to make everything work.

However my ideas are that:
        ABI_xmpp::connectToServer(UT_UTF8String & server,
                                                UT_UTF8String & port,
                                                UT_UTF8String & username,
                                                UT_UTF8String & password,
                                                bool usessl);
        Connects to a remote server and somehow authorizes a remote AbiWord to
connect to it too.

        ABI_xmpp::sendPacket(UT_UTF8String & sPacket) sends the XML-ized packet
to the remote user.
        ABI_xmpp::getNextPacket(UT_UTF8String & sPacket) is called every time a
new packet arrives from the remote AbiWord. I imagine we'll need to
employ somekind of callback routine with the loudmouth library to handle
this. We may need to pass a pointer to ABI_Collab_Import within ABI_xmpp
to do this this. However I hope we can avoid this and leave ABI_xmpp free
of AbiWord code.

Overall, my development style is very much an itterative, bottom up
approach. I try to understand what is needed, code it, then see if the
interface can be improved.

So my own feel as to what is needed:
        Finish the UI and the AllCollab code. I can do this.
        Make the ABI_xmpp code and connections work.
        Make connectToSever work.
        Make sendPacket work
        Make getNextPacket work

Cheers

Martin

Received on Tue Jan 31 03:12:35 2006

This archive was generated by hypermail 2.1.8 : Tue Jan 31 2006 - 03:12:35 CET