DataSource peers configuration (part 2)

Here are the rest of the DataSource configuration items that define a DataSource application’s connections to its DataSource peers.

"this DataSource application" means the DataSource application for which you are defining the configuration. "DataSource peer" or "peer" means a DataSource application that this DataSource application communicates with.

For more DataSource-peer configuration items, see DataSource peers configuration (part 1).

datasrc-batch-time

datasrc-batch-time specifies the time period in seconds for this DataSource application to batch together messages sent to a peer.

As an example, if datasrc-batch-time time is 0.2 seconds, when the DataSource application needs to send a message to the peer and there are no outgoing mesages already in the queue, it queues the message and waits 0.2 seconds. Any subsequent outgoing messages are also queued until 0.2 seconds have elapsed, and then all the queued messages are sent to the peer in one batch. Batching messages in this way can improve performance when there is a high rate of data updates being sent to the peer.

Use in: C

Syntax: datasrc-batch-time <time-period>

Type: float

Default value: : 0.01 (seconds)

Values accepted:

  • Minimum: 0.0 seconds (messages not batched)

  • Maximum: 10.0 seconds

datasrc-default-obj-hash-size

datasrc-default-obj-hash-size specifies the default number of entries in the hashtable that holds information about this DataSource application’s active subscriptions.

Use in: C

Syntax: datasrc-default-obj-hash-size <number-of-objects>

Type: integer

Default value: 16384 objects

datasrc-id

Deprecated. Use datasrc-local-label instead.

datasrc-id specifies the ID number of this DataSource application. You can override this ID for a particular peer connection by adding a local-id option to the add-peer configuration item relating to the connection.

Use in: C, Java

Syntax: datasrc-id <ID-number>

Type: integer

Default value: 0

datasrc-interface

datasrc-interface defines the network interface to listen on for connections from DataSource peers.

Use in: C, Java

Syntax: datasrc-interface <network-interface>

Type: integer

Default value: [all available interfaces]

datasrc-local-label

datasrc-local-label sets a name that uniquely defines this DataSource application within the Caplin Platform installation. Together with the remote-label option of add-peer, it replaces datasrc_id and the remote-id option of add-peer.

You can override this label for a particular peer connection by adding a local-label option to the add-peer configuration item relating to the connection (this allows you to implement multiple connections for the same peer).

Here’s an example of how datasrc-local-label and remote-label are used together.

Use in: C, Java

Syntax: datasrc-local-label <label-name>

Type: string

Default value: [none]

datasrc-name

datasrc-name The name of this DataSource application, which the application’s DataSource peers use to identify it.

You can override this name by adding a local-name option to an add-peer entry - the local-name is then the name that the DataSource peer defined by the add-peer entry uses to identify this application.

The name can contain the parameters %a and %h

At run time, %a is replaced by the DataSource application-name, and %h is replaced by the host name of the machine on which the DataSource application is running.

Use in: C, Java

Syntax: datasrc-name <name-of-this-DataSource-application>

Type: string

Default value: %a-%h

datasrc-pkt-log

datasrc-pkt-log specifies the name of this DataSource application’s packet log file. Can also be used to turn off logging.

The name can include an absolute file path, otherwise the specified file path is relative to the path specified by the log-dir configuration item. The name can contain the parameter %a, which is replaced at run-time by the DataSource application-name.

Use in: C, Java

Syntax: datasrc-pkt-log <log-file-name>

Type: string

Default value: packet-%a.log

To turn off logging, use datasrc-pkt-log /dev/null.

datasrc-port

datasrc-port Specifies the network port to listen on for connections from DataSource peers. The default of 0 means that no connections can be made to this DataSource application (in which case, you’d configure the application so that it initiates the connections to its peers; see the addr and port options of add-peer).

Use in: C, Java

Syntax: datasrc-port <port-number>

Type: integer

Default value: 0 (No connections can be made.)

To listen for secure (SSL) connections from DataSource peers, you must specify the configuration item datasrc-sslport.

datasrc-reject-new-peers

datasrc-reject-new-peers when set to TRUE, prevents a peer from connecting to this DataSource application when there’s already a peer connected that has the same label (or the same ID if there’s no label defined for the peer).

Setting datasrc-reject-new-peers prevents abnormal behaviour if the system is wrongly configured and two peers are inadvertently deployed with the same labels or IDs. By default, if a DataSource peer tries to connect to this DataSource application but there is already one connected with the same label or ID, the current peer is disconnected and the new one is allowed to connect. The first peer could then attempt to reconnect, which would cause the second peer to be disconnected. The second peer would then in turn attempt to reconnect, and so on.

This configuration item turns off this default behaviour, so the second DataSource peer is never allowed to connect.

The peer’s label is defined in the remote-label option of this DataSource application’s add-peer configuration entry. The peer’s ID is defined in the remote-id option of the add-peer.

Use in: C, Java

Syntax: datasrc-reject-new-peers <boolean>

Type: boolean

Default value: FALSE (a new peer with the same label or ID as an existing one is allowed to connect)

datasrc-tcp-nodelay-off

datasrc-tcp-nodelay-off specifies whether the DataSource application’s peer connection sockets should have the TCP_NODELAY feature turned off. The default is FALSE, which means TCP_NODELAY is enabled. Setting this configuration item to TRUE disables TCP_NODELAY.

Use in: C, Java

Syntax: datasrc-tcp-nodelay-off <boolean>

Type: boolean

Default value: FALSE (TCP_NODELAY is disabled)

peer-accept-wait-time

peer-accept-wait-time specifies the time in seconds to wait for an information packet when accepting a connection from a peer.

Use in: C

Syntax: peer-accept-wait-time <time-interval>

Type: float

Default value: 10.0 seconds

peer-monitor-interval

peer-monitor-interval specifies the interval in seconds at which statistics about this DataSource application’s connection to its DataSource peers are read and transferred to the application’s JMX monitoring module.

You can override this item for a specific peer by adding a monitor-interval option to this DataSource application’s add-peer configuration item for the peer.

Use in: C

Syntax: peer-monitor-interval <time-interval>

Type: float

Default value: 30.0 seconds

peer-thread-pool-size

peer-thread-pool-size specifies the maximum number of pooled connection threads allocated to handle the DataSource application’s peer connections that don’t have an explicitly named thread.

If this item is configured, the DataSource application creates a pool of threads that are used to handle peer connections. The item specifies the maximum number of threads in the pool.

When a peer connection doesn’t have a named thread configured for it (see the thread-name option of the add-peer item), communication with the peer is handled on one of the pool threads. However, if peer-thread-pool-size is 0 or not defined, an unnamed thread is created and dedicated to that peer. If peer-thread-pool-size is less than the number of peer connections with no explicitly named thread, these connections share threads from the pool.

If you configure more than 30 peers, you should define peer-thread-pool-size.

For more about peer-thread-pool-size and the thread-name option of add-peer, see How can I…​ Configure threads for peer communication.

Use in: C

Syntax: peer-thread-pool-size <max-number-of-threads>

Type: integer

Default value: -1 (no pool configured - see explanation below)

source-request-timeout

source-request-timeout specifies a timeout in seconds for a DataSource peer’s response to a request (for example, a subscription request) sent to it by this DataSource application. If the peer doesn’t respond within this time, the requested object is assumed to be not available and the application sends a discard message for the object to the peer.

source-request-timeout is a global timeout that applies to all DataSource peers; you can override it for individual peers by setting the request-timeout option of add-peer. You can override all of these timers for a particular data service by setting the request-timeout option of add-data-service.

Use in: C

Syntax: source-request-timeout <timeout-in-seconds>

Type: float

Default value: -1.0 (no timeout)


See also: