Annotations: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
--- Introduction ---
== Introduction ==


Annotations is a service that can associate arbitrary information about URLs.
Annotations is a service that can associate arbitrary information about URLs.
Line 5: Line 5:
The goal is to use it for both history and bookmarks.
The goal is to use it for both history and bookmarks.


- Possible uses -
Possible uses:
 
* Visit count (*)
* Visit count (*)
* Last visit date (*)
* Last visit date (*)
Line 16: Line 15:
(*) May be stored in history instead (TBD)
(*) May be stored in history instead (TBD)


--- Internal design ---
== Internal design ==
 


The design consists of two tables. The first maps URLs to internal IDs.
The design consists of two tables. The first maps URLs to internal IDs.
Line 26: Line 26:
* Expiration information
* Expiration information


--- External interface ---
=== Expiration ===
 
Because some annotations can be large, and the number of pages can also become very large, some sort of annotation expiration scheme is required. Annotations beyond the expiration date will be deleted. The time frame must be variable because some annotations may be large and should expire faster, while others may be small and have minimal overhead for keeping them around. The option of never expiring will also be provided.
 
This time frame may be measured from annotation creation, but it could potentially be more valuable to measure from from last page access time: "this annotation expires after one month of page disuse".
 
== External interface ==


Required operations:
Required operations:
Line 35: Line 41:


Issues: Namespacing of annotation names
Issues: Namespacing of annotation names
-- Expiration --
Because some annotations can be large, and the number of pages can also become very large, some sort of annotation expiration scheme is required. Annotations beyond the expiration date will be deleted. The time frame must be variable because some annotations may be large and should expire faster, while others may be small and have minimal overhead for keeping them around. The option of never expiring will also be provided.
This time frame may be measured from annotation creation, but it could potentially be more valuable to measure from from last page access time: "this annotation expires after one month of page disuse".

Revision as of 23:50, 18 August 2005

Introduction

Annotations is a service that can associate arbitrary information about URLs.

The goal is to use it for both history and bookmarks.

Possible uses:

  • Visit count (*)
  • Last visit date (*)
  • Fav icon
  • Page thumbnail
  • Notes
  • Persistent storage for Javascript on the page

(*) May be stored in history instead (TBD)

Internal design

The design consists of two tables. The first maps URLs to internal IDs.

The second stores all annotations:

  • URL ID
  • Annotation name
  • Value
  • Expiration information

Expiration

Because some annotations can be large, and the number of pages can also become very large, some sort of annotation expiration scheme is required. Annotations beyond the expiration date will be deleted. The time frame must be variable because some annotations may be large and should expire faster, while others may be small and have minimal overhead for keeping them around. The option of never expiring will also be provided.

This time frame may be measured from annotation creation, but it could potentially be more valuable to measure from from last page access time: "this annotation expires after one month of page disuse".

External interface

Required operations:

  • Get/set annotation "x" on this page
  • Give me all the annotations on this page
  • Give me all pages with annotation "x"="y" or "x" > "y", etc.

Issues: Namespacing of annotation names