Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update request server rule name #1428

Merged
merged 9 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions docs/03_server/03_request-server/02_basics.md
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PLEASE DON'T MERGE YET.
I think I might want to rewrite this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I have changed the order of things now.

Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ requestReplies {
}
```

## Adding a name

Every `requestReply` in your .kts must have a unique name. If you do not provide one, it will be allocated automatically. In the previous example, the `requestReply` will automatically be named as `REQ_INSTRUMENT_DETAILS` - based on the table name.

## Multiple Request Servers

Almost certainly, your application will need to have more than one `requestReply`. So, let us state the obvious and show you a file with two `requestReply` codeblocks. Again, each is the simplest kind you could possibly have.

```kotlin
Expand All @@ -48,6 +42,24 @@ requestReplies {
}
```

## Adding a name

Every `requestReply` in your .kts must have a unique name. If you don't give the `requestReply` a name, the platform will create a name, based on the table or view. In the first example above, no name has been supplied. The table used is INSTRUMENT_DETAILS, so the platform calls this `requestReply` REQ_INSTRUMENT_DETAILS.

It is easy to specify a name for the `requestReply`. For example, here we are calling our `requestReply` ALL_COUNTERPARTIES:


```kotlin
requestReplies {
requestReply("ALL_COUNTERPARTIES", COUNTERPARTY)
...
}
```

When you run `genesisInstall`, the Genesis platform adds the prefix `REQ_` to the name you have specified. So, in the example above, the `requestReply` becomes REQ_ALL_COUNTERPARTIES. That is the name you will need to use when you access this `requestReply`.

So, all the resources in your Request Server have names beginning with REQ_ regardless of whether you specify a name.

## Specifying fields on request and reply
With all the `requestReply` codeblocks we have seen so far, all the fields in the table are returned.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ requestReplies {
}
```

## Adding a name

Every `requestReply` in your .kts must have a unique name. If you do not provide one, it will be allocated automatically. In the previous example, the `requestReply` will automatically be named as `REQ_INSTRUMENT_DETAILS` - based on the table name.

## Multiple Request Servers

Almost certainly, your application will need to have more than one `requestReply`. So, let us state the obvious and show you a file with two `requestReply` codeblocks. Again, each is the simplest kind you could possibly have.

```kotlin
Expand All @@ -48,6 +42,24 @@ requestReplies {
}
```

## Adding a name

Every `requestReply` in your .kts must have a unique name. If you don't give the `requestReply` a name, the platform will create a name, based on the table or view. In the first example above, no name has been supplied. The table used is INSTRUMENT_DETAILS, so the platform calls this `requestReply` REQ_INSTRUMENT_DETAILS.

It is easy to specify a name for the `requestReply`. For example, here we are calling our `requestReply` ALL_COUNTERPARTIES:


```kotlin
requestReplies {
requestReply("ALL_COUNTERPARTIES", COUNTERPARTY)
...
}
```

When you run `genesisInstall`, the Genesis platform adds the prefix `REQ_` to the name you have specified. So, in the example above, the `requestReply` becomes REQ_ALL_COUNTERPARTIES. That is the name you will need to use when you access this `requestReply`.

So, all the resources in your Request Server have names beginning with REQ_ regardless of whether you specify a name.

## Specifying fields on request and reply
With all the `requestReply` codeblocks we have seen so far, all the fields in the table are returned.

Expand Down