Skip to main content
Version: Current

Request Server - introduction

Request Servers (otherwise known as request/replies and often shortened to reqrep) provide snapshot data from a table or view in response to a request from the front end. Once the response is received, the transaction is over (unlike a Data Server, which stays connected to the client and pushes updates).

Introduction

Request Servers have other features distinct from a Data Server, such as allowing one-to-many joins, and even completely custom request servers for serving up non-linear data (e.g. sets of disjointed data to serve up to a report).

  requestReply("TRADE", TRADE_VIEW) {
permissioning {
permissionCodes = listOf("TRADER", "SUPPORT")
auth(mapName = "ENTITY_VISIBILITY") {
authKey {
key(data.counterpartyId)
}
}
}
}

Request Servers are conventionally configured in the file application-name-reqrep.kts. This file should be in the application-name-script-config module.

So, if your application is called positions, the file would be named positions-reqrep.kts.

You should also check the Request Server component in your application's system-processes and service-definition files, as described in the Configuring runtime page.

info

The following examples in this section assume you have the following fields and tables present:

    field(name = "INSTRUMENT_ID", type = STRING)
field(name = "INSTRUMENT_CODE", type = STRING)
field(name = "INSTRUMENT_NAME", type = STRING)
field(name = "VWAP", type = STRING)
field(name = "LAST_TRADED_PRICE", type = DOUBLE)
field(name = "TRADED_CURRENCY", type = STRING)
field(name = "EXCHANGE_ID", type = STRING)
field(name = "SPREAD", type = DOUBLE)
field(name = "ALTERNATE_TYPE", type = STRING)
    table (name = "INSTRUMENT_DETAILS", id = 11005) {
INSTRUMENT_CODE
INSTRUMENT_ID
INSTRUMENT_NAME
LAST_TRADED_PRICE
VWAP
SPREAD
TRADED_CURRENCY
EXCHANGE_ID
ALTERNATE_TYPE
primaryKey {
INSTRUMENT_ID
}
}

Open API

important

Open API support was introduced in version 7.0 of the Genesis platform.

To help with external integration and testing, Open API specifications are generated for each resource in the Request Server.

Internally, the framework uses metadata system to generate JSON schemas for input and return objects in the Open API spec. For more details on this, see our pages on Network messages - type-safe messages and metadata annotations.

Metrics

You can find details of how to use metrics with Request Servers in our pages on metrics.