|
3. Applying to Your App |
Authors: |
|
|
|
Complete this worksheet as you read to begin planning OpenSAM in your application.
|
Application name: |
||
|
My SaaS application is: Home Application Productivity Application |
||
|
The document types my application supports: Any type HTML Email JPG PNG GIF Other images Video
|
||
|
The document collections my application supports: Folders, 1 level Folders, multi-level Tags Books, Projects, Albums Keywords
|
||
|
The document identifiers my application supports: File or Project Name Folder/Filename Hierarchy Unique IDs, Asset IDs, or DB Keys Other |
||
|
My application's document commit points: User Saves Periodic during edits Defined points within a workflow or process Other |
||
|
Document instance types my application stores: Authoritative Cached References Just-in-time |
||
|
Current WebDAV support in my application: As a client: authenticate SSO browse files read files write files read/write meta data As a server: list files read files write files read/write meta data incl. arbitrary meta data |
||
|
Planned WebDAV support in my application: As a client: authenticate SSO browse files read files write files read/write meta data As a server: list files read files write files read/write meta data incl. arbitrary meta data |
||
|
For Home Applications: |
||
|
My application does/will
support pre-configured links with replacement
fields for launching a specific set of
My application does/will
support customer customized links with replacement
fields for launching arbitrary My application does/will offer limited-lifetime WebDAV sessionIDs for Productivity Applications to use. |
||
|
For Productivity Applications: |
||
|
My application does/will
support accepting and utilizing WebDAV server URLs and Session
IDs within our
My application does/will
support accepting and utilizing WebDAV based
file names or templates to open |
We'll use the following scenario to anchor this discussion:
This entire scenario took place in Kelly's browser. Nothing was downloaded or uploaded. All templates, documents, and supporting materials are stored on the servers and are easily tracked, updated, and shared.
When everything works perfectly, this scenario is not difficult to implement. Keep in mind, however, that the user may want to pause, resume, or redirect the scenario at different points and that any system or user errors must be accurately reported to the user and recovered from.
Some areas of this scenario may not fit your application's model. Web 2.0 applications do much more than open and close documents. OpenSAM supports other models which are discussed later in this document.
Each application described above performs several tasks behind the scene. Although it appears simple to the user, we practitioners know that if just one data item was not properly transmitted in just one step of the scenario, the whole sequence would fail.
The Home Application is both the starting point of the sequence and the recipient of the documents at the end of the sequence. This sandwiching of the Productivity Applications by the Home Application is a pivotal aspect of the OpenSAM framework. Because the Home Application launches the Productivity Applications (step e.), it is able to pass to the Productivity Applications credentials that grant them access to save the documents back to the Home application.
Some data is transmitted behind the scenes during our scenario. Here it is in complete detail:
Online solutions are more complex than the document centric example given above. Online solutions operate on a wider variety of data, utilize more tools and components, and involve more participants than document centric desktop solutions do.
Users are accustomed to the files and folders paradigm, however, and think of their data and their processes in those terms. To bridge the powerful solution ⇔ document centric gap, we recommend you strive to wrap your solution in a "Document Veneer." By doing so and working with SAM, your solution will be interoperable with more online Home and Productivity applications.
Document veneer for an online system consists of three elements:
Define Documents and Collections
Your application undoubtably groups user's data in various ways. Spreadsheets have workbooks. Databases have tables. Photo collections have albums and photos. A first step to a Document Veneer is to define precisely what documents and document collections your application offers. Although your definition of a document and document collections may establish some artificial borders between components of your system, this is neccessary for other SAM applications to work with subsets of your user's data.
Collection is the WebDAV term for folder or directory.
Define and Map Document Identifiers
Desktop systems and HTTP use the folder/filename hierarchy to organize documents. Online systems may use alternatives such as tags, projects, keywords, UniqueIDs, and/or a search-for-everything model. The challenge is that for SAM applications to work together, they need a single way to browse and refer to documents and document collections.
Because HTTP and it's successor WebDAV are so broadly supported, we recommend you map your document naming and organization scheme to HTTP's folder/filename hierarchy. This way all other SAM and even non-SAM applications can browse and manipulate your documents. The perma-link mechanism used by blogs, however, is not sufficient.
WebDAV has the ability to do a 'dir' on a folder and return a very detailed list of files, subfolders, and their metadata. This allows a user operating in one SAM application to browse their documents and collections in another SAM application. Users find this direct access to their documents accross portions of the system very appealing.
You can choose to support this to varying degrees. You may already support access to your document via a
domainname.com/get.cgi?id=1234
query. For other SAM applications to browse a user's documents, however, they will want to view them as:
domainname.com/foldername/usersfilename.ext
instead. We recommend that you take the document organization paradigm you present to your users (folders, projects, tags, etc.) and expose it directly in your HTTPS and WebDAV URLs. For example, if a user is a member of Group A and works with documents within Project B there, then enable them to browse and find their documents at:
domainname.com/GroupA/ProjectB/documentname.ext.
Define Document Commit Points
Commit Points are actions and points in time when changes to a document are committed to the system and become the current authoritive version of the document. Since multiple participants of a SAM mashup manage and manipulate documents, we must define when a document changes from the perspective of outside participants.
For example, as users open, modify, and save their data within your solution, you've defined points when the data is "committed" and becomes the current version. For collaborative or other reasons, you may commit their data upon an auto-save or automatic submission. Or you may autosave to a temporary copy and only commit it when the user clicks the Save button. Either way, define for your application's precise actions or conditions that commit a user's data to the current version of their document. Your Document Commit Points define when a newer version of a document is made available across SAM applications.
If your application follows the desktop model, the Document Commit Points would operate as follows:
RESULT: The
authoritative version of the document remains the one saved in step
c.
A more dynmic model might proceed as follows:
In this case, artificial Commit Points are established. For example, you could establish that every 10 minutes of continuous editing defines a commit point. You'll want to synchronize these commit points with your version recoverying or rollback scheme. You'll also want to define these commit points so they are not too granular. The other SAM applications in your mashup do not want to manage 100s over versions created during a single editing session.
This resulting Document Veneer enables a wide variety of other components to browse and manipulate your documents without custom coding to your API or your paradigm. This last point is, by far, the biggest benefit of SAM and serves as a guiding principal for SAM.
The preceding discussion is conceptual. We now switch gears and discuss Document handling in SAM in more concrete terms.
Combining applications into a SAM mashup means that documents will be managed and displayed by several applications, runing on several servers. For performance reasons, some serves will wish to cache copies of a document. To support unique features, some servers will maintain additional data associated with a document.
There are several techniques in SAM to maximize efficiency and to ensure that out-of-date documents or data are never presented to a user. SAM works with these four types of document instances:
|
Authoritative |
|
|
Cached |
|
|
Reference |
|
|
Just-in-time |
|
These four document instance types help us build powerful and efficient application mashups. Mashups can be extended or rewired without dramatic changes to the implementations or UI. Here is example wiring of a SAM mashup. There are many variations.

The first step in designing a SAM mashup is to identify which application will provide Authoritative Storage.
Home Applications frequently provide Authoritative Storage. The Home Application appears to be a central storage repository to the user. Home Applications can, however, manage references, cached, or just-in-time document types with no apparent difference to the user.
Heavy weight Productivity Applications often provide the Authoritative Storage for their documents, especially if the documents require special storage processing such as databases, broadly inter-connected community or workflow applications, or bulky data services such as video hosting.
Your searching infrastructure also impacts the choice of Authoritative Storge. Users wish to search in one place — their Home Application — for all their documents. A Productivity Application, however, may offer specialized search features and utilize specialized indexing technology for their document type. If a Productivity Application is to serve as Authoritative Storage, they should offer search federation services so they can execute a search on behalf of a Home Application. The details of this mechanism have not yet been defined.
Copyright © 2006-2007, the authors.