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.
Difference between revisions of "IdAS Registries Proposal"
(→IdASRegistry) |
(→IdAS Implementation) |
||
Line 66: | Line 66: | ||
cf = IdASRegistry.getContextFactory(cpid); | cf = IdASRegistry.getContextFactory(cpid); | ||
cid = cf.createContext(config); | cid = cf.createContext(config); | ||
− | + | IdASContextRegistry.register(cid, cpid, config); | |
return cid; | return cid; | ||
} | } |
Revision as of 23:11, 8 February 2007
Contents
Introduction
This document describes a new approach to handling IdAS context provider configuration issues. 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 Providers.
- A Context Provider (analogous to a JDBC driver) acts as a factory for IContexts
Use Cases
- create a new (IContext, cid) combination
- connect to existing cid (returns IContext)
- open an IContext
- close an IContext
- destroy a cid
Non-Use Case
- associate existing IContext with cid
Objects
- cid = ContextId (indentifier)
- config = Config data
- IContext = a Context instance
- cpid = id of a context provider (IContextFactory class name)
- cf = a context factory (i.e. IContextFactory)
Services
- IdAS
- IdASContextRegistry --registry of ContextIds
- IdASRegistry --registry of available cps
- cp --a context provider
IdAS
cid create(cpid, config) IContext connect(cid) destroy(cid)
cp (Context Provider)
cid create(config) void destroy(config) IContext connect(cid)
IContext
SubjectId open(callbackHandler) void close() void destroy()
IContextFactory
IContext createContext(config)
IdASContextRegistry
void register(cid, cp, config) void unregister(cid) cpid&config resolve(cid)
IdASRegistry
cf getContextFactory(cpid) void registerContextFactory(cf) void removeContextFactory(cf)
IdAS Implementation
cid create(cpid, config) { cf = IdASRegistry.getContextFactory(cpid); cid = cf.createContext(config); IdASContextRegistry.register(cid, cpid, config); return cid; }
IContext connect(cid) { cpid+config = IdASContextRegistry.resolve(cid); cp = IdASRegistry.get(cpid); IContext = cp.connect(config); }
void destroy(cid) { cpid+config = IdASContextRegistry.resolve(cid); cp = IdASRegistry.get(cpid); cp.destroy(config) }
IdASContextRegistry Implementation
void register(cid, cpid, config) { // if cid is an XRI, resolve it to an 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 }
cpid&config resolve(cid) { // if cid is an XRI, resolve it to an URL // HTTP get the XRDS document // lookup the "Higgins IdAS Context Provider" service type with it // return cpid&config }