DDR-RI User Manual 1.1
From Morfeo Wiki
Contents |
Previous Documentation
Download
- Binaries:
- You can download this release from here
- Source:
New Features Version 1.1
New REST Service
This implementation provides two Services:
-
org.morfeo.devinfo.simple.ServiceImpl(the same as Version 1.0)
- This service implements a DDR service which knows all the data sources where to retrive values given a vocabulary, aspect and property (the sources are sorted by priority). If a data source can not continue with the request or doesn't know the value of the property, the following data source will be query according to the priority
-
org.morfeo.devinfo.simple.connector.RESTService(new Service)
- This service is simply a connector to a remote DDR which is based on
ServiceImpland uses a cache for caching the property values indexed by Evidences
- This service is simply a connector to a remote DDR which is based on
Configuration
This implementation uses different properties to configure the REST Service
Required properties
- Property
org.morfeo.devinfo.simple.data(the same as Version 1.0)- It's the path to resources as device clustering files and ehcache configuration
- E.g. /apps/DevInfo-Simple-1.1/resources
- Property
org.morfeo.devinfo.simple.rest.url- URI to DDR Rest Service
- E.g. http://195.235.93.83:8081/DDRService (MORFEO Service)
- Install your own DDR REST Service
Optional properties
- Property
org.morfeo.devinfo.simple.rest.cache- URI or absolute path to the cache configuration file
- If this property is not defined the path will be the previous data property value + /devinfo/devInfo-cache.xml
- E.g. /apps/resources/other/devInfo-cache.xml
Cache
- The REST Service uses a cache for caching the property values indexed by Evidences
- The configuration file is described below (we would advise this configuration by default):
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <diskStore path="java.io.tmpdir" /> <defaultCache maxElementsInMemory="10000" eternal="false" timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="true" diskSpoolBufferSizeMB="30" maxElementsOnDisk="10000000" diskPersistent="false" diskExpiryThreadIntervalSeconds="120" memoryStoreEvictionPolicy="LRU" /> <!-- Holds PropertyValue's for each Evidence --> <cache name="devInfo" maxElementsInMemory="500" eternal="false" timeToIdleSeconds="3600" memoryStoreEvictionPolicy="LFU"> <cacheEventListenerFactory class="org.morfeo.devinfo.simple.connector.ListenerFactory" /> </cache> </ehcache>
- defaultCache is provided by ehcache (by default)
- The cache that holds property values is called devInfo and its definition is mandatory
- maxElementsInMemory: maximum number of objects that will be created in memory (one object for each evidence)
- eternal: if eternal, timeouts are ignored and the element is never expired.
- memoryStoreEvictionPolicy: policy would be enforced upon reaching the maxElementsInMemory limit
- timeToIdleSeconds:time to idle for an element before it expires
-
org.morfeo.devinfo.simple.connector.ListenerFactoryremoves expired elements
-
For more information about the configuration view http://ehcache.sourceforge.net/documentation/configuration.html
How to use
- View previous version
Feedback
Should you have any comment or feedback, please contact us at: