You run Resoa service domains within a ResoaServiceGateway.Gateways will
- look for Resoa service domain jar files on classpath environment (defined by the ResoaServiceDomainExplorer environment)
- deploy the configured services with one central instance
- call the service init method if exists
- deploy local and cron services
- enable persistence for your service domain if required
- create Java objects out of the HTTP/JSON request payload
- role based security and session management
- service invocation and response handling
- error handling for request/response/transactions
ResoaServiceGateway provide functionality for stand alone containers. For grid services (i.e. for Resoa Persistence) you need to setup a ResoaNodeGateway. Therefor must exist a GridInfo.xml file within the gatewayRoot path.
<GridInfo xmlns="http://www.resoa.org/topology"
xmlns:stack="http://www.resoa.org/stack/config"
persistenceFactory="org.resoa.persistence.PersistenceFactory"
databaseTransition="org.resoa.persistence.rdbms.SQLTransition"
cacheManager="org.resoa.persistence.core.MemoryCacheManager">
<Profile name="gateway.local.1" type="NODE">
<stack:AccessPoints address="localhost" port="7874"/>
</Profile>
</GridInfo>
The attributes of GridInfo let you specify the storage parameters for Resoa persistence, grid connectivity requires the definition of a resoa.stack accesspoint. Ensure that connections to the port are not blocked by firewall as grid nodes will establish socket connections between each other.
Defining the grid topology
Resoa grid nodes use the resoa protocol stack services for secure connection management.You need to create a stack license file in advance for every participating node. The org.resoa.grid.GridFileBuilder will do this job for you. Create a grid configuration folder and add a GridInfo.xml file, specifying at least the accessPoint host information, for every participating node.
Running the GridFileBuilder will create a folder for every node with all the files you need for startup.
// ------------------------------------------------------
//Â Gradle Task for running GridFileBuilder
// ------------------------------------------------------
task setupGrid (type: JavaExec) {
main = 'org.resoa.grid.GridFileBuilder'
classpath = sourceSets.main.runtimeClasspath
// first argument is the grid configuration folder with the gateway configuration files, second argument the target folder for the grid runtime files.
args = ['/resoa/myTopologyDefinition', '/resoa/mygrid'].toList()
}