Gld Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 27: Line 27:


   type: cache
   type: cache
   implementation: local
   implementation: embedded


   key-size: 10  # optional, if not specified, the default value is 12 characters
   key-size: 10  # optional, if not specified, the default value is 12 characters
Line 38: Line 38:
====implementation====
====implementation====


Specifies either a conventional service implementation name, such as "local", <font color=red>or ... ?</font>, or a fully qualified class name that can be looked up on the class path and instantiated.
Specifies either a conventional service implementation name, such as "embedded", <font color=red>or ... ?</font>, or a fully qualified class name that can be looked up on the class path and instantiated.


==Generic Load Strategy Configuration==
==Generic Load Strategy Configuration==

Revision as of 18:17, 15 December 2016

Internal

Configuration

-c <cofiguration-file.yml>

If the configuration file is not specified on the command line (where it has priority), it is looked up a value of GLD_CONF_FILE environment variable.

Load Configuration

service:
  ...
load: 
  threads: 10
  requests|operations|messages: 1000 # optional, if not specified load will be generated forever

Cache Service Configuration

service:

  type: cache
  implementation: embedded

  key-size: 10  # optional, if not specified, the default value is 12 characters
  value-size: 1024  # optional, if not specified, the default value is 512 characters

  load-strategy:
    ...

implementation

Specifies either a conventional service implementation name, such as "embedded", or ... ?, or a fully qualified class name that can be looked up on the class path and instantiated.

Generic Load Strategy Configuration

load-strategy:
  class: <fully-qualified-class-name>

read-then-write-on-miss Load Strategy Configuration

service:

  type: cache
  ...

  load-strategy:
    name: read-then-write-on-miss
    reuse-value: false
    

reuse-value

By default, the load strategy randomly generates the first entry value and then keeps reusing it, as a speed optimization (reuse-value: "true"). To change this behavior and configure the load strategy to generate a new random value every times it needs one, set "reuse-value" to "false". Configuring the load strategy to not reuse values will make it somewhat slower.

write-then-read Load Strategy Configuration

service:

  type: cache
  ...

  load-strategy:
    name: write-then-read
    reuse-value: false
    read-to-write|write-to-read: <integer>

reuse-value

See reuse-value above.

read-to-write

write-to-read

Store Configuration

store:

  type: hierarchical
  directory: ../store # if relative, is relative to the position of the configuration file


Implementation

The implementation section defines the gld extension to use. The extension contains implementation-specific details essential to connect to, and interact with the target service.

Implementation Name

The implementation "name" specifies the name of the gld extension that will be instantiated. For more details about extension names, see "Extension Name" section.

service:
  implementation:
    name: <extension-name>

Client Libraries Configuration

Client Libraries Available in the Operational Environment

TODO: replace with a real example

service:
  implementation:
    name: jboss-datagrid-7
    classpath: ${JDG_HOME}/client/hotrod.jar
...

Also see:

Target Service Client Libraries

Client Libraries Shipped with the gld Distribution

TODO: replace with a real example

service:
  implementation:
    name: jboss-datagrid-7
    version: 7.0.0
...

Also see:

Target Service Client Libraries