Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "IdAS Registries Proposal"

(See Also)
(Definitions)
Line 5: Line 5:
  
 
===Definitions===
 
===Definitions===
* a ContextId (aka "cid") an URI identifier of a Context. It may be an XRI. The intent is that cids are globally unique. In practice they may not be.
+
* a ContextId (aka "cid") an URI identifier of a Context. It may be an [http://en.wikipedia.org/wiki/XRI XRI]. The intent is that cids are globally unique. In practice they may not be.
 
* IdAS is an attribute service aggregator/abstraction. It manages a set of statically or dynamically installed [[Context Provider]] plugins
 
* IdAS is an attribute service aggregator/abstraction. It manages a set of statically or dynamically installed [[Context Provider]] plugins
 
* A Context Provider (analogous to a JDBC driver) acts as a factory for IContexts
 
* A Context Provider (analogous to a JDBC driver) acts as a factory for IContexts

Revision as of 11:29, 9 February 2007

Introduction

This document describes a new approach to handling IdAS context provider configuration issues (and more). It builds on work discussed at the F2F in Provo Jan 2007. This document works top down from use cases.

It proposes a design that divides the registry work into two completely separate registries. One ("IdASRegistry") is a registry of context providers. The other ("IdASContextRegistry") manages the binding between a ContextId and a (ContextProvider, config-data) pair.

Definitions

  • a ContextId (aka "cid") an URI identifier of a Context. It may be an XRI. The intent is that cids are globally unique. In practice they may not be.
  • IdAS is an attribute service aggregator/abstraction. It manages a set of statically or dynamically installed Context Provider plugins
  • A Context Provider (analogous to a JDBC driver) acts as a factory for IContexts

IdAS Use Cases

  1. Create a new (IContext, cid) combination
  2. Destroy a Context (by cid)
  3. Connect to a Context (by cid)
  4. Disconnect from a Context (by cid)

IdAS Non-Use Case

  1. Associate a pre-existing Context that exists in some data store with a ContextId

Terms Used

  • cid: short for "ContextId" (an identifier)
  • factoryConfig: context provider-specific configuration data required to initialize the IContextFactory itself
  • contextConfig: context provider-specific configuration data required to connect to, open, etc. an IContext
  • cpid: id of a context provider (IContextFactory class name ? Eclipse extension id ?)

Key Interfaces

IdAS

cid create(cpid, contextConfig)

IContext connect(cid)

void disconnect(cid)

void destroy(cid)

IContextFactory

Much simpler than what we have now

cid create(contextConfig)

void destroy(contextConfig)

IContext connect(contextConfig)

IdASContextRegistry

NEW: A registry of ContextIds (cids) and their associated (cpid and contextConfig) pair

void register(cid, cpid, contextConfig)

void unregister(cid)

cpid&contextConfig resolve(cid)

IdASRegistry

IdASRegistry becomes much simpler than the currently implemented one

IContextFactory getContextFactory(cpid)

void registerContextFactory(cf)

void removeContextFactory(cf)

Implementation

IdAS

cid create(cpid, contextConfig)
{
 IContextFactory cf = IdASRegistry.getContextFactory(cpid); 
 cid = cf.createContext(config);
 IdASContextRegistry.register(cid, cpid, contextConfig); 
 return cid;
}
IContext connect(cid) 
{
 cpid+contextConfig = IdASContextRegistry.resolve(cid);
 IContextFactory cf = IdASRegistry.getContextFactory(cpid);
 IContext = cf.connect(contextConfig);
}
void destroy(cid)
{
 cpid+contextConfig = IdASContextRegistry.resolve(cid); 
 IContextFactory cf = IdASRegistry.getContextFactory(cpid);
 cf.destroy(contextConfig)  
}

IdASContextRegistry

cpid&contextConfig resolve(cid)
{
 // if cid is an XRI, resolve it to a URL
 // HTTP get the XRDS document
 // lookup the "Higgins IdAS Context Provider" service type with it
 // return cpid&contextConfig
 // 
 // The code to do this is called an XRI Resolver. It already 
 // exists in a Java implementation maintained by OpenXRI
 // that is available at SourceForge here
 // The community that works on this is jazzed about helping the 
 // Higgins project implement this.
 //
}
void register(cid, cpid, contextConfig)
{
 // if cid is an XRI, resolve it to a URL
 // HTTP get the XRDS document at URL
 // find the "Higgins IdAS Context Provider" service type within it
 // add cpid and config as "service metadata"
 // HTTP put updated XRDS document
 // 
 // The code to do this at a "community" level is something that
 // the XRI TC members have been working on and could get 
 // done for our purposes very quickly.
}

Open Issues

  1. Pseudocode below doesn't (yet) address factoryConfig data usage and handling
  2. Exact datatype of a cpid

See Also

Back to the top