/[pdpsoft]/trunk/grid-mw-security/ees/thesis/api_design.tex
ViewVC logotype

Diff of /trunk/grid-mw-security/ees/thesis/api_design.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 952 by aramv, Fri Oct 16 10:08:37 2009 UTC revision 953 by aramv, Wed Oct 21 08:40:48 2009 UTC
# Line 6  Line 6 
6  % Door init de plugins laat  % Door init de plugins laat
7  % Een run is algemener geworden. Eerst konden we use cases aan naar het aantal run functies dat we hadden.  % Een run is algemener geworden. Eerst konden we use cases aan naar het aantal run functies dat we hadden.
8  \section{EES Execution Framework}  \section{EES Execution Framework}
9  The EEF holds functions that control the lifecycle of subsequent components.  The EEF API defines functions that control the execution of the EEF's internal components.
10  It exposes functions to initialize, run and terminate the framework, namely:  This API is used by the EES to expose the EEF as a service.
11    Emulating the behaviour of the lifecycle of an object, the API exposes functions to initialize, run and terminate the framework, namely:
12    
13  \begin{itemize}  \begin{description}
14  \item EEF\_Init()  \item[ EEF\_Init()]{
15  \item EEF\_Run()  Initializes the framework, in which the Evaluation Manager parses the configuration file, uses the Plug-in Manager to load the specified plug-ins and configures authorization policy chains.
16  \item EEF\_Term()  }
17  \end{itemize}  \item[ EEF\_Run()]{
18    Starts a run, which tries to fulfil the Obligations set in the AOS by executing the policies until a successful mapping is achieved or the list of configured policies is exhausted.
19    }
20    \item[ EEF\_Term()]{
21    Terminates the EEF, freeing its allocated memory.
22    }
23    \end{description}
24  % motivatie  % motivatie
25  % BUT WHY?  % BUT WHY?
26  % imitatie van OO gedrag  % imitatie van OO gedrag
27  % lcmaps did it  % lcmaps did it
28    
29  \section{Plug-ins}  \section{Plug-ins}
30  Plug-ins hold all the business logic needed by the EES.  \label{plugin_api}
31    Plug-ins hold all the business logic relating to Grid authentication.
32  % niet zozeer business, maar zeer specifieke taken afhandelen  % niet zozeer business, maar zeer specifieke taken afhandelen
33  % de EEF is de business logic voor de EES.  % de EEF is de business logic voor de EES.
34  % plugins doen specifieke, goed afgebakende taken uitvoeren  % plugins doen specifieke, goed afgebakende taken uitvoeren
35  The plug-in API defines functions to initialize, run and terminate.  The plug-in API defines functions to initialize, run and terminate, again emulating the behaviour of an object.
36  Plug-ins for the EEF should implement the following functions:  Plug-ins for the EEF should implement the following functions:
37    \begin{description}
38    \item[plugin\_initialize()]{Should initialize the plug-in for execution.}
39    \item[plugin\_run()]{Should execute the plug-in's business logic.}
40    \item[plugin\_terminate()]{Should free used memory.}
41    \end{description}
42    This conforms to the legacy plug-in API as used by LCAS and LCMAPS with the omission of the plugin\_introspect() function, which was used to query plug-ins on the information they required before it could be passed to them.
43    This legacy function is now deprecated because plug-ins have access to the AOS API, in which they can hand-pick the information they need.
44    
45  \begin{itemize}  % BUT WHY?
 \item plugin\_initialize()  
 \item plugin\_run()  
 \item plugin\_terminate()  
 \end{itemize}  
 This is the same API as LCAS and LCMAPS use, with the omission of the plugin\_introspect() function.  
 % TODO BUT WHY?  
46  % waarom introspect weggelaten? -> lcmaps queriede de plug-ins voor welke input ze nodig hadden, maar nu kunnen plugins dat zelf opvragen via de AOS.  % waarom introspect weggelaten? -> lcmaps queriede de plug-ins voor welke input ze nodig hadden, maar nu kunnen plugins dat zelf opvragen via de AOS.
47  % Zelfde manier maar ruimer, breder  % Zelfde manier maar ruimer, breder
48  % oplossing voor een beperking  % oplossing voor een beperking
49  %The only changes visible to third-party developers are the addition the AOS, and the omission of the requirement to implement a plug-in\_introspect() function.  %The only changes visible to third-party developers are the addition the AOS, and the omission of the requirement to implement a plug-in\_introspect() function.
50    
51  \section{Attribute \& Obligation Store}  \section{Attribute \& Obligation Store}
52  The AOS is a data store that can express trees.  The AOS is a data store that can express (relational) data through a simple getter/setter mechanism.
53  % TODO why? what? how? goal? dialtone?  
54  I have chosen to expose a number of getter/setter functions.  The API calls implemented so far are:
55    
56    \begin{description}
57    \item[setAttribute(label, value)]{Stores the provided attribute value and associates it with with a named label}
58    \item[getAttribute(label)]{Returns an attribute by the label it's associated with}
59    \item[setObligation(label, value)]{Stores the provided attribute value and associates it with a named label}
60    \item[getObligation(label)]{Returns an obligation by the label it's associated with}
61    \item[destroyObligation(label)]{Destroys an obligation by the label it's associated with, freeing memory allocated for it}
62    \end{description}
63    
64    A proposed API design for dealing with relational data:
65    \begin{description}
66    \item[getNode(label)]{Returns a pointer to the data structure that represents the node.}
67    \item[addChild(label, child node]]{Adds a child node to the node associated with a given label.}
68    \item[getChild(label)]{Returns a pointer to the data structure that represents the child node associated with the data.}
69    \item[getParent(label)]{Returns a pointer to the data structure that represents the parent node associated with the data.}
70    \item[getValueByNode(node)]{Returns the value associated the data structure to which a pointer was provided.}
71    \end{description}
72    The internal structures of the data pointers returned should be hidden from plug-ins, as their implementation is not part of the API provided for them.
73    If more introspection into the internal state of the AOS is required, it's best to expand upon this simple API.

Legend:
Removed from v.952  
changed lines
  Added in v.953

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28