inside the gds the engine, activities, data resource implementations and role mapping
DESCRIPTION
Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping. EPCC, University of Edinburgh Tom Sugden ([email protected]) First International Summer School on Grid Computing , Vico Equense, Italy. Overview. Low-level components of a Grid Data Service: Engine - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/1.jpg)
Inside the GDSThe Engine, Activities,
Data Resource Implementations and Role Mapping
EPCC, University of EdinburghTom Sugden ([email protected])
First International Summer School on Grid Computing, Vico Equense, Italy
![Page 2: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/2.jpg)
2 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Low-level components of a Grid Data Service:– Engine– Activities– Data Resource Implementations– Role Mappers
Extensibility of the OGSA-DAI architecture– Interfaces and Implementations
Overview
![Page 3: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/3.jpg)
3 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Internal Architecture
Engine
Activity Activity
Data ResourceImplementation Database
Perform Document Response Document
Role Mapper
Activity Elements
Connection
Role Query & Results
Data
![Page 4: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/4.jpg)
4 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
The Engine
The Engine is the central component of a GDS. Dictates the behaviour of the service when
documents are submitted.– Parses perform document– Identifies required activities– Instantiates the activity implementations– Processes the activities– Combines outputs to form a response document– Returns response document to GDS
![Page 5: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/5.jpg)
5 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
The Engine Interface
Allows different implementations to be developed to alter the behaviour of the service.
Invoke invokes a request. Terminate terminates the request currently
processing, if one exists.
<Engine>
+ invoke(performDocument: Document, context: Map) : Document+ terminate(): void
![Page 6: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/6.jpg)
6 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Engine Construction
When a GDS is created, it instantiates an Engine using details from its configuration
The Engine constructor takes a Context object known as the Engine Context
Engine ContextActivity MapSchema Map
Data Resource Implementation
![Page 7: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/7.jpg)
7 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Engine Invocation
GridDataService::perform takes an XML document as input parameter
GDS calls the Engine’s invoke method.
invoke( performDocument: Document, invocationContext: Map ): Document
The perform document describes actions for GDS to perform
The invocation context contains the distinguished name from the user certificate
![Page 8: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/8.jpg)
8 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
The OGSA-DAI R3 Engine
Executes one request at a time. Validates perform documents against their schema. Terminates a request when:
– all activities have completed– an error occurs– the terminate method is called
When a request is terminated, all data relating to that request is discarded.
Status changes processed by the engine are published as service data.
![Page 9: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/9.jpg)
9 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Processing a Perform Document
The Engine validates perform documents using the schema map from the Engine Context
activity element activity schema
Instantiates activity implementations using the activity map from the Engine Context
activity element activity implementation class
Creates an Activity Handler to process the activity
![Page 10: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/10.jpg)
10 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Activities
An Activity dictates an action to be performed by a GDS– Query a data resource– Transform data– Deliver results
Each Activity has a corresponding:– Activity Element sqlQueryActivity– XSD schema sql_query_statement.xsd– Java implementation
SQLQueryStatementActivity
![Page 11: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/11.jpg)
11 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Provided Activity Implementations
OGSA-DAI R3 provides– SQLQueryStatementActivity– SQLStoredProcedureActivity– SQLUpdateActivity– RelationalResourceManagementActivity– XPathStatementActivity– XUpdateStatementActivity– XMLCollectionManagementActivity– XMLResourceManagementActivity– XSLTransformActivity– GZIPCompressionActivity– ZIPArchiveActivity– Deliver[To|From][URL|GDT|GFTP]Activity
SQL database activities
XML:DB database activities
Transform activities Delivery activities
![Page 12: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/12.jpg)
12 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Activity Handlers
Activity Handlers process Activities– Manage inputs and outputs– Perform the processing– Monitor the status
Decouples activity processing behaviour from the engine and activities– SimpleHandler
Generates output only when it is required– RunAheadHandler
Generates output before it is required
![Page 13: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/13.jpg)
13 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Activity Inputs and Outputs
Activities read and write blocks of data– Allows efficient streaming between activities
to reduce memory overhead A block is an Object
– Usually a String or byte array Currently input and outputs are untyped Interfaces for reading and writing
– BlockReader– BlockWriter
![Page 14: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/14.jpg)
14 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
BlockReader and BlockWriter Interface
Activity inputs
Activity output
<BlockReader>
+ next() : Object
<BlockWriter>
+ put( block: Object ) : void+ close() : void+ open() : void
![Page 15: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/15.jpg)
15 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Activity Context
The Activity Context
Activities are initialised using the Activity Context
Engine ContextData Resource Implementation
Invocation ContextUser Credentials
Inputs - BlockReadersOutputs -BlockWriters
![Page 16: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/16.jpg)
16 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Accessing Data Resources
Activities often interact with data resources– Query a database, update a table row, etc
Data resources often require user validation– User ID and password
An Activity can use its Context information to access and interact with a data resource– Data Resource Implementation– User Credentials
![Page 17: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/17.jpg)
17 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Accessing Data Resource Sequence Diagram
:Activity :RoleMapper:DataResourceImplementation
Get connection using user credentialsGet role using user credentials
:DatabaseRole
Get user ID and password
open connection using user ID and password
Do exciting things with the connection
Return collection
:Context
Get user credentials and data resource implementation
![Page 18: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/18.jpg)
18 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Data Resource Implementations
Data Resource Implementations govern access to data resources– Open/Close connections– Validate user credentials using a RoleMapper– Facilitates connection pooling
All Data Resource Implementations extend an abstract base class
uk.org.ogsadai.porttype.gds.dataresources.DataResourceImplementation
![Page 19: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/19.jpg)
19 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
The Role and RoleMapper Interfaces
A RoleMapper maps user credentials to a Role
OGSA-DAI provides– SimpleFileRoleMapper – reads database roles from a file– DatabaseRole – encapsulates username and password
<RoleMapper>
+ setConfiguration(configuration: String) : void+ map(credentials: String, database: String) : Role
<Role>
![Page 20: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/20.jpg)
20 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Role Mapping
The SimpleFileRoleMapper loads the Role Map file referenced from the GDSFConfig
This file maps X509 Certificate User Credentials to username and password combinations– An X509 Certificate is a type of digital document used in Web
Services to attest to the identity of an individual or other entity
…<Database name="MyDatabase"> <User dn=“[email protected],OU=Group,O=Org,O=Another” userid=“jsmith" password=“carrotcake" /></Database>…
![Page 21: Inside the GDS The Engine, Activities, Data Resource Implementations and Role Mapping](https://reader033.vdocument.in/reader033/viewer/2022052703/568154e3550346895dc2dcc0/html5/thumbnails/21.jpg)
21 OGSA-DAI R3 Tutorial for the International Summer School on Grid Computing, Vico Equense, Italy
Conclusion
The Engine is the core of a GDS. The Engine uses Activities to perform actions. Activities use Data Resource Implementations
to access data resources. OGSA-DAI R3 includes many activities for
querying, updating, transforming and delivering data.
Architecture is designed for extensibility:– New Activities– New Role Mappers– New Data Resource Implementations