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). |
Note |
---|
Many of these are just goals for now and are in the process of being implemented. |
Anchor | ||||
---|---|---|---|---|
|
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 | ||||
---|---|---|---|---|
|
Note |
---|
Only the FileSystem implementation is provided as part of the core system. Others are provided in separate Jar files that are 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": "filesystem-provider",
"type": "FileSystem",
"baseDir": "./config"
},
{
"name": "saga-provider",
"type": "Elastic",
"scheme": "http",
"hostname": "localhost",
"port": 9200,
"timestamp": "updatedAt",
"exclude": [
"updatedAt",
"createdAt"
]
}
]
} |
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.