EventsSpec
Contents
-
Events stored by Ubuntu One into Zeitgest
-
Directory Synchronization
- Directory was created locally, syncdaemon creating it on the server
- Directory was created on the server, syncdaemon creating it locally
- Directory was deleted locally, syncdaemon deleting it on the server
- Directory was deleted on the server, syncdaemon deleting it locally
- Directory synchronization conflict
-
File Synchronization
- File was created locally, syncdaemon creating on the server
- File was created on the server, syncdaemon creating locally
- File was deleted locally, syncdaemon deleting on the server
- File was deleted on the server, syncdaemon deleting locally
- File was modified locally, syncdaemon updating it at the server
- File was modified on the server, syncdaemon updating it locally
- File synchronization conflict
-
Folder Sharing
- Folder was shared by the user to another user
- Shared Folder was deleted by local user
- Folder was offered by another user
- Folder offered by another user was rejected by the local user
- Folder offered by another user was accepted by the local user
- Folder offered by another user was unaccepted (so it won't sync anymore) by the local user
- User Defined Folders (UDFs)
- Publishing
- Quota notifications from the server
- CouchDB replication events
- Tomboy replication events
- Music store transactions
- Account status events
-
Directory Synchronization
Events stored by Ubuntu One into Zeitgest
This is a spec of the events that will be stored in Zeitgeist by Ubuntu One.
All the following events have in common the "timestamp" and the "actor" fields. The latter is set to "dbus://com.ubuntuone.SyncDaemon.service" for File Synchronization, Folder Sharing, Publishing and Quota events.
Directory Synchronization
Directories will have "inode/directory" set as the mimetype.
The volume_uuid is not yet stored into zeitgeist; a cursory glance shows that all zeitgeist data provider put an empty string in this fiels. Ideally it should be the uuid of the local hard disk partition where the referenced folders or files are located.
Directory was created locally, syncdaemon creating it on the server
directory = Subject(uri="ubuntuone:uuid", interpretation=FOLDER, manifestation=REMOTE_DATA_OBJECT, origin="file:///local_path", storage="net")
- Event(interpretation=CREATE_EVENT, manifestation=SCHEDULED_ACTIVITY, subjects=[directory])
Directory was created on the server, syncdaemon creating it locally
directory = Subject(uri="file:///local_path", interpretation=FOLDER, manifestation=FILE_DATA_OBJECT, origin="ubuntuone:uuid", storage=volume_uuid)
- Event(interpretation=CREATE_EVENT, manifestation=WORLD_ACTIVITY, subjects=[directory])
Directory was deleted locally, syncdaemon deleting it on the server
directory = Subject(uri="ubuntuone:uuid", interpretation=FOLDER, manifestation=DELETED_RESOURCE, origin="file:///local_path", storage="deleted")
- Event(interpretation=DELETE_EVENT, manifestation=SCHEDULED_ACTIVITY, subjects=[directory])
Beware that Zeitgeist does not currently have a 100% satisfactory way of dealing with deletions and there may be some changes to this in the short- to mid term future. That said I think the treatment described here makes sense -- kamstrup 2010-11-23 19:35:36
Directory was deleted on the server, syncdaemon deleting it locally
directory = Subject(uri="file:///local_path", interpretation=FOLDER, manifestation=DELETED_RESOURCE, origin="ubuntuone:uuid", storage="deleted")
- Event(interpretation=DELETE_EVENT, manifestation=WORLD_ACTIVITY, subjects=[directory])
Directory synchronization conflict
A synchronization conflict renames a local directory with a ".u1conflict" extension.
local_directory = Subject(uri="file:///local_path.u1conflict", interpretation=FOLDER, manifestation=FILE_DATA_OBJECT, origin="file:///local_path", storage=volume_uuid)
Event(interpretation="u1://ConflictRename", manifestation=WORLD_ACTIVITY, subjects=[local_directory])
File Synchronization
The file interpretation is always got from the file's mimetype, by using zeitgeist.mimetype.get_interpretation_for_mimetype()
File was created locally, syncdaemon creating on the server
file = Subject(uri="ubuntuone:uuid", manifestation=REMOTE_DATA_OBJECT, origin="file:///local_path", storage="net")
- Event(interpretation=CREATE_EVENT, manifestation=SCHEDULED_ACTIVITY, subjects=[file])
File was created on the server, syncdaemon creating locally
file = Subject(uri="file:///local_path", manifestation=FILE_DATA_OBJECT, origin="ubuntuone:uuid", storage=volume_uuid)
- Event(interpretation=CREATE_EVENT, manifestation=WORLD_ACTIVITY, subjects=[file])
File was deleted locally, syncdaemon deleting on the server
file = Subject(uri="ubuntuone:uuid", manifestation=DELETED_RESOURCE, origin="file:///local_path", storage="deleted")
- Event(interpretation=DELETE_EVENT, manifestation=SCHEDULED_ACTIVITY, subjects=[file])
File was deleted on the server, syncdaemon deleting locally
file = Subject(uri="file:///local_path", manifestation=DELETED_RESOURCE, origin="ubuntuone:uuid", storage="deleted")
- Event(interpretation=DELETE_EVENT, manifestation=WORLD_ACTIVITY, subjects=[file])
File was modified locally, syncdaemon updating it at the server
file = Subject(uri="ubuntuone:uuid", manifestation=REMOTE_DATA_OBJECT, origin="file:///local_path", storage="net")
- Event(interpretation=MODIFY_EVENT, manifestation=SCHEDULED_ACTIVITY, subjects=[file])
File was modified on the server, syncdaemon updating it locally
file = Subject(uri="file:///local_path", manifestation=FILE_DATA_OBJECT, origin="ubuntuone:uuid", storage=volume_uuid)
- Event(interpretation=MODIFY_EVENT, manifestation=WORLD_ACTIVITY, subjects=[file])
File synchronization conflict
A synchronization conflict renames a local file with a ".u1conflict" extension.
local_file = Subject(uri="file:///local_path.u1conflict", manifestation=FILE_DATA_OBJECT, origin="file:///local_path", storage=volume_uuid)
Event(interpretation="u1://ConflictRename", manifestation=WORLD_ACTIVITY, subjects=[local_file])
If you are in need of custom events please take it up with the Zeitgeist team. If we include them properly in the ontologies they will integrate well with our type-hierarchy-aware query system -- kamstrup 2010-11-23 19:35:36
Folder Sharing
NOTE: there's no appropriate subject interpretation defined in zeitgeist for a remote user or contact. The Zeitgeist telepathy plugin currently uses the freeform text field on the subject. We suggest instead creating a new subject interpretation named Contact and a subject manifestation named ContactDataObject, as used below.
There are already a few contact/people ontologies we can choose to adapt for Zeitgeist. But note that we intentionally avoided the Nepomuk PIM ontology because it was simply to massively scoped for our taste -- kamstrup 2010-11-23 19:35:36
Folder was shared by the user to another user
folder = Subject(uri="ubuntuone:uuid", interpretation=FOLDER, manifestation=REMOTE_DATA_OBJECT, origin="file:///local_path", storage="net")
other_user = Subject(uri="mailto:user_email", interpretation=u1://Contact, manifestation=u1://ContactDataObject, origin=N/A, storage=N/A)
- Event(interpretation="u1://FolderShared", manifestation=USER_ACTIVITY, subjects=[folder, other_user])
Shared Folder was deleted by local user
folder = Subject(uri="ubuntuone:uuid", interpretation=FOLDER, manifestation=REMOTE_DATA_OBJECT, origin="file:///local_path", storage="net")
other_user = Subject(uri="mailto:user_email", interpretation=u1://Contact, manifestation=u1://ContactDataObject, origin=N/A, storage=N/A)
- Event(interpretation="u1://FolderUnshared", manifestation=USER_ACTIVITY, subjects=[folder, other_user])
Folder was offered by another user
Not implemented: Never happens when sharing by email (only by username)
Folder offered by another user was rejected by the local user
Not implemented: There's no UI action to reject shares, only one button to accept them.
Folder offered by another user was accepted by the local user
- folder = Subject(uri="ubuntuone:uuid", interpretation=FOLDER, manifestation=REMOTE_DATA_OBJECT, origin="ubuntuone:uuid", storage="net", text="other_user_email")
- Event(interpretation="u1://ShareAccepted", manifestation=USER_ACTIVITY, subjects=[folder])
Folder offered by another user was unaccepted (so it won't sync anymore) by the local user
- folder = Subject(uri="ubuntuone:uuid", interpretation=FOLDER, manifestation=REMOTE_DATA_OBJECT, origin="ubuntuone:uuid", storage="net", text="other_user_email")
- Event(interpretation="u1://ShareUnaccepted", manifestation=USER_ACTIVITY, subjects=[folder])
User Defined Folders (UDFs)
The user created a UDF
folder = Subject(uri="ubuntuone:uuid", interpretation=FOLDER, manifestation=REMOTE_DATA_OBJECT, origin="file://localpath", storage="net")
- Event(interpretation="u1://UserFolderCreated", manifestation=USER_ACTIVITY, subjects=[folder])
The user deleted a UDF
folder = Subject(uri="ubuntuone:uuid", interpretation=FOLDER, manifestation=DELETED_RESOURCE, origin="file://localpath", storage="deleted")
- Event(interpretation="u1://UserFolderDeleted", manifestation=USER_ACTIVITY, subjects=[folder])
The user subscribed to a UDF
folder = Subject(uri="file://localpath", interpretation=FOLDER, manifestation=FILE_DATA_OBJECT, origin="ubuntuone:uuid", storage=volume_uuid)
- Event(interpretation="u1://UserFolderSubscribed", manifestation=USER_ACTIVITY, subjects=[folder])
The user subscribed to a UDF which folder already existed in the local disk (notify that folder content will be merged)
Not implemented yet
The user unsubscribed from a UDF
folder = Subject(uri="file://localpath", interpretation=FOLDER, manifestation=DELETED_RESOURCE, origin="ubuntuone:uuid", storage="deleted")
- Event(interpretation="u1://UserFolderUnsubscribed", manifestation=USER_ACTIVITY, subjects=[folder])
Publishing
File was published by the user
file = Subject(uri="http://ubuntuone.com/p/newfile.txt", manifestation=REMOTE_DATA_OBJECT, origin="ubuntuone:uuid", storage="net")
- Event(interpretation=CREATE_EVENT, manifestation=USER_ACTIVITY, subjects=[file])
File was unpublished by the user
file = Subject(uri="http://ubuntuone.com/p/newfile.txt", manifestation=DELETED_RESOURCE, origin="ubuntuone:uuid", storage="deleted")
- Event(interpretation=DELETE_EVENT, manifestation=USER_ACTIVITY, subjects=[file])
Quota notifications from the server
NOTE: Should we add new event types here?
Current user ran out of quota
Syncdaemon found out about this while uploading file
- remaining space
Not implemented yet
Folder shared by another user ran out of quota
Syncdaemon found out about this while uploading file
- remaining space
- other_user
Not implemented yet
CouchDB replication events
The "actor" field is set to "dbus://org.desktopcouch.CouchDB.service"
A given Couch database was synchronized with other host
remote_database = Subject(uri="http://remote_host/path/db", interpretation=DOCUMENT, manifestation=REMOTE_DATA_OBJECT, origin="desktopcouch://localhost/~username/db", storage="net")
- Event(interpretation="u1://DatabaseSynchronized", manifestation=SCHEDULED_ACTIVITY, subjects=[remote_database])
Not implemented yet
Tomboy replication events
The "actor" field is set to "application://tomboy.desktop"
A given Tomboy note was synchronized with the server
- Note title
Not implemented yet
Music store transactions
The "actor" field is set to "application://Ubuntuone.rhythmbox-plugin.desktop" or "application://UbuntuOne.banshee-plugin.desktop" accordingly.
A media file was synchronized
file = Subject(uri="file:///local_path", manifestation=FILE_DATA_OBJECT, origin="ubuntuone:uuid", storage=volume_uuid, text="artist/album/title")
- Event(interpretation=CREATE_EVENT, manifestation=WORLD_ACTIVITY, subjects=[file])
Not implemented yet
Account status events
(Implementing this requires account status events that are not sent from the server yet)
NOTE: Just like Quota: Should we add new event types here?
The user subscription was renewed
Not implemented yet
The subscription expired
Not implemented yet
UbuntuOne/Specs/ZeitgeistIntegration/EventsSpec (last edited 2010-12-17 16:17:49 by alecu)
other_user = Subject(uri="mailto:user_email", interpretation=u1://Contact, manifestation=u1://ContactDataObject, origin=N/A, storage=N/A)