Note |
---|
Resources are intended to be shared across all engines within an instance of Saga (and, possibly, across multiple nodes as well - depending on the implementation). |
Goals:
Note |
---|
Many of these goals are just goals for now and are in the process of being implemented. |
A resource provider provides access to a specific set of resources from a particular storage technology. For example, a file system directory of resource files or a collection of tables.
Children Display | ||||
---|---|---|---|---|
|
Children Display | ||||
---|---|---|---|---|
|
Note |
---|
Only the FileSystem implementation is provided as part of the core system. Others are provided in separate Jar files which specifically included on the class path when needed. |
The "type" parameter is used in resource configuration to locate the resource provider class. for example:
Code Block | ||||
---|---|---|---|---|
| ||||
"type":"FileSystem" |
or
Code Block | ||||
---|---|---|---|---|
| ||||
"type":"com.accenture.saga.resourcemgr.filesystem.FileSystemProvider" |
The type parameter is used to locate the class using the following steps:
If the type parameter has periods in it
Try and look for the class as specified
For example: com.accenture.saga.resourcemgr.filesystem.FileSystemProvider
Otherwise:
Try and find the class in the "com.accenture.saga.resourcemgr.filesystem" package
For example: "FileSystemProvider" → "com.accenture.saga.resourcemgr.filesystem.FileSystemProvider"
Try and find the class with a "Provider" suffix in the "com.accenture.saga.resourcemgr.filesystem" package
For example: "FileSystem" → "com.accenture.saga.resourcemgr.filesystem.FileSystemProvider"
Currently, there are three types of resources defined:
A resource provider must provide methods to read and write all three types of resources.
Most resources are read-only, but some resources may need to be created by the pipeline stage which uses them. For example, to create a dictionary index.
The following is a sample resource providers configuration:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"providers": [
{
"name":"pipeline-provider",
"type":"FileSystem",
"baseDir":"config"
},
{
"name":"dict-provider",
"type":"MongoDB",
"uri":"mongodb://localhost:12345",
"database":"dictionaries"
}
]
} |
This configuration has a single field ("providers", more fields may be added later) with a list of provider configurations. See the documentation for each provider type for details.