WeaveEdit Blog

Ben Dev Diary #5 – 20th June 2010

Posted on: September 4, 2010

The past few days I have been looking at the finer details of what the server side of WeaveEdit is going to entail. The main choices we have to make are whether the ‘server’ is going to be built into WeaveEdit as in a server version and a client version. The other option would be to have a ‘server’ module that can be instantiated. This would allow us to have one version of the program and launch the server module when it was needed.

To help make this decision I made up a page detailing what functionality the server will need to take care of. By looking at all of this it made it easier to make the final decision.

*******************
Manage the connections with the other clients
– Two-way TCP connection with each client, as well as a ‘pho-connection’ with the client who is the host (host-client).
– Additional connection for the ‘chat’ feature. Messages sent to the server and broadcast to all users. Short delay will be noticeable.

Track the changes made to the document(s)
– Adjust position of change based on the other uses changes.
– Document synchronisation via MD5 (chunk’s of the document will be compared to the corresponding chunks of the master copy).
– Keep pointers to the ‘host-client’s’ version of the document in event someone fails checksum.

Manage the users who are currently editing the document
– Keep all user information such as name, text colour, ID#, IP, port.
********************

By detailing all of this information it made the choice easier. We decided to use the approach of having a server module that can be instantiated when a user starts a session rather than having the server aspects heavily tied into the program thus creating a server and a separate client version.

Leave a comment

About The Project

WeaveEdit is a highly portable collaborative text editor capable of several users reading and editing a document in real time.

It is available for Mac OS X, Windows & Linux.

Want to recieve email updates?

Enter your email:

Join 1 other subscriber