Overview

The goal of ZeroConf Note Sharing is to make Tomboy note sharing dirt simple and enabled "right out of the box". This includes Phase 1 and Phase 2 mentioned on Tomboy/NoteSharing.

Architecture

http://live.gnome.org/Tomboy/NoteSharing/ZeroConf?action=AttachFile&do=get&target=MdnsRecordDiagram.png

mDNS Service Type

The service type for a shared Tomboy client is:

    _tomboy._tcp.local.

mDNS Service Name

When Tomboy is running on a machine that has enabled note sharing, the machine must be advertised as an mDNS service. Since there may be multiple computers on the same subnet with the same host name (though not likely), a unique identifier (GUID) is prepended to the service name. This is the name that will advertise a Tomboy client on the local network:

    <Machine GUID>-<Machine Host Name>._tomboy._tcp.local.

When sharing is first enabled, Tomboy will generate a GUID for the machine and store it in GConf under /apps/tomboy/sharing/guid. The GUID will then be used to advertise shared notes.

Example:

    GUID: 01570188-e414-48ff-af79-748269d0fcb6
    Host Name: bht-tp
    mDNS Service Name: 01570188-e414-48ff-af79-748269d0fcb6-bht-tp._tomboy._tcp.local.

Text Records

mDNS text records allow other clients to know more information about the mDNS service being advertised on the network.

The following text records will be used for broadcasting a Tomboy client:

    name=<"Shared name" as typed by the user in the sharing preferences dialog>
    port=<HttpListener port that clients can use to communicate with this Tomboy service>

Message Types/HTTP API

I haven't decided what implementation would be the best for actually transferring the note data back and forth between machines yet, but the following things will need to be present:

  • Authentication/Connection
    • Authenticate to a machine for accessing either public (optional) or private (required) notes
  • Notes
    • Note Info Object
      • Contains summary information about a note
      • Name
      • Last modified date
    • Note Object
      • Contains everything the Note Info Object does
      • Contains the contents of a note
    • Retrieve list of notes available from a Tomboy Client (returns an array of NoteInfoObjects)

    • Retrieve the content of a single note (returns a NoteObject)

Possible transport implementation:

  • Model after the code in Banshee that provides DAAP (iTunes music sharing) - My preferred choice at the moment...and I'm actively investigating it.
  • HttpListener for .NET 1.1 from Maria's WSOC project

    • Could use a combination of this + DB4O for serialization
  • WebServices + Mono.WebServer.dll (xsp)

  • Others?

Sharing Preferences

http://live.gnome.org/Tomboy/NoteSharing/ZeroConf?action=AttachFile&do=get&target=SharePrefsMockup.png

A Tomboy Client can be configured to share in the following states:

  • Share all notes, public
  • Share selected notes, public
  • Share all notes, password protected
  • Share selected notes, password protected
  • Enable synchronization, password protected
    • Used for machine-machine complete note synchronization

Preferences

  • Shared Name
    • GConf Path: /apps/tomboy/sharing/shared_name

    • Default Value: <Machine's Host Name>'s Notes

      • prefill the first time the dialog is opened/configured

Sharing Browser

http://live.gnome.org/Tomboy/NoteSharing/ZeroConf?action=AttachFile&do=get&target=ShareBrowseMockup.png

This is kind of a dual-purpose dialog. It allows users to:

  • View shared notes from other machines
  • Connect to their other machine and set up synchronization between the two

If sharing is not enabled, the dialog should not show anything but an "Enable Sharing" button that takes them directly to the "Sharing" page in the Tomboy Preferences Dialog.

Once sharing is enabled, the dialog will show all Tomboy clients it can see on the local network. Clients that have previously been configured to be synchronized will show the latest synchronization status (i.e., "22 notes, synchronized 3 minutes ago").

If a highlighted machine has synchronization enabled (password protected), the "Configure Synchronization" button should be enabled and allow the user to enter the synchronization password. If a highlighted machine does not have synchronization enabled, the synchronization buttons will not be enabled. If synchronization has already been configured, the "Configure Synchronization" button should be disabled and the "Disconnect Synchronization" should be enabled. Prompt the user "Do you really want to..." when they press "Disconnect Synchronization".

By default, each machine should should a TreeView expander (little arrow image) (a dummy row should be added to the TreeStore to cause this to happen). When the user clicks the expander to expand the row, the following should happen:

  • Public sharing, NOT password protected
    • The shared public notes should appear and the user should be able to double-click on them to view them
  • Public sharing, password protected
    • The user should be prompted for a password
      • Add a checkbox to "Save password" into the gnome keyring so the password does not have to be prompted for next time

Apps/Tomboy/NoteSharing/ZeroConf (last edited 2013-08-09 00:14:57 by WilliamJonMcCann)