This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Overview

The goal of Phase 1 is to provide simple Note Sharing in Tomboy. It should be dirt simple and ready to go "right out of the box".

Sharing Preferences

http://193.97.123.222/tomboy/tomboy-note-sharing-preferences.png

By default, sharing will not be enabled when a user first runs Tomboy. They've got to actively decide whether they want to publish their notes on the network. A user must also tell Tomboy to look for shared notes on the local network before it will work.

When a user clicks on the "Share my notes on my local network" button, "Share selected notes" is selected by default with none of the notes selected. This is a security feature that prevents a user's notes from being shared for the few moments while they configure which notes should be shared.

A user can change the shared name (the name which shows up to other users/computers).

A user can also specify a password that other Tomboy clients will be required to provide before seeing the shared notes.

1. GConf Preferences

GConf Base Path: /apps/tomboy/sharing

2. Other Preferences

Rather than use a GConf Preference for passwords, GNOME Keyring is used instead. Tomboy looks for a stored password to know whether password-protection is enabled.

Sharing Dialog

http://193.97.123.222/tomboy/tomboy-note-sharing-dialog.png

This dialog is available by selecting the "Shared Notes" item from Tomboy's TrayIcon. If "Look for shared notes" is enabled in the sharing preferences, the ServiceLocator (mDNS) will watch the local network for other Tomboy Clients. As it discovers them, they will appear in this list.

When you expand the "computer" row, a connection to the Tomboy client will be attempted. If a password is required, you will be prompted for it. After connecting successfully, a list of shared notes appears.

From this point, you can highlight a note and press the "Download" button (or double-click a note). The note is automatically downloaded to your computer and created as a local note. If one with the same name already exists, a numbered title will be used. For example, if you are attempting to download a note that's titled, "My Note" but you already have a local note with the same name, the downloaded note will be saved as, "My Note 1". The number will automatically be incremented if you already have a note named "My Note 1".

Not implemented: If "Look for shared notes" is not enabled, the "Shared Notes" menu item in the TrayIcon should either be grayed out or...a button/checkbox/other UI should be placed in the "Shared Notes" dialog to allow the user to quickly enable the feature.

Note: The downloaded not is not kept in sync with the computer it was downloaded from. Any type of synchronization of notes will be dealt with in Tomboy/NoteSharing/PhaseTwo.

Architecture

http://193.97.123.222/tomboy/tomboy-note-sharing-mdns-text-records.png

1. mDNS Service Type

The service type for a shared Tomboy client is: _tomboy._tcp

2. mDNS Service Name

A unique identifier on the local network must be used to advertise the Tomboy client on mDNS. By default, the following is used:

    <Machine Guid>._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 Service Name:

    01570188-e414-48ff-af79-748269d0fcb6-bht-tp._tomboy._tcp.local.

3. 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:

4. Current Implementation Class Diagram: Tomboy.Sharing Namespace

http://193.97.123.222/tomboy/tomboy-note-sharing-class-diagram.png

Communication

1. Current implementation:

For simplicity's sake, I've chosen to use WebServices via Mono.WebServer.dll (xsp) for Tomboy clients to:

  1. Read the list of shared notes
  2. Download note content
  3. Pros:
    • Easy to use
    • Code is fairly clean
    • No maintenance of HttpListener/Web Server/etc.
  4. Cons:
    • More beef than what we really need
    • Others?

2. Other possible options:

Notebooks

Hopefully someone cleverly hacks something together quickly to add notebook support into Tomboy. Rather than adding features of granular sharing of notes (i.e., share Note A with User A, User B, but not User C or anyone else), notebooks can have their own password. If you want to share a notebook of notes with a certain group of people, share the notebook, add a password to the shared notebook, and hand out the password to the group of people you'd like to share it with.

What is "notebook support?" Well the ability to create notes in sets for specific purposes. For example, I could have a "Tomboy Project" notebook where all the notes I create about Tomboy are stored there. I may also have a "Reminders" notebook or a "Team Meetings" notebook.

Now, whether notes can exist in multiple notebooks? I'll leave that one up to the hacker who submits the patch! :)


2024-10-23 10:58