I reviewed some of the parts previously proposed
according to the discussion of the last developers' meeting and
added the suggested feature about requesting a completeSet
regardless of the RQ to which the server is responding.
Modified parts are highlighted in red.
--------------------------------------
Proposal: server requests client for completeSet
Issue:
It may be necessary for the server to re-synchronize its data with
the client in case of data corruption.
Use cases:
- the server is unable to process a delta thus suspecting of data
inconsistency with the client
- an unexpected error causes some of the server data to become
corrupted
Solution:
In these cases it would be useful for the server to be able to
request the client to send a completeSet as soon as possible.
Implementation proposal:
- use of the Status attribute in an empty Warning
or Error element set as advisory (Type=”11”):
This element can be used in any RS message
coming from the server responding to any AlpineBits RQ.
Limiting the request for a completeSet of a specific data only
in response to the RQ of the corresponding AlpineBits action,
could force a server to keep inconsistent data for a long time
while waiting for the client to send the correct RQ. To avoid
this, it has been proposed to allow a server to add such
completeSet request in any AlpineBits RS so that it can use any
communication started by the client to forward a specific
data-synchronization request.
Since the completeSet request doesn’t necessarily imply an error
nor a warning about the related RQ message, I found at first that
the advisory Warning element was the best choice for such
request.
But since the purpose is to have a fixed standardized element to
be used when necessary in order to ease the implementation, this
was not possible in case of errors because the Warnings
container requires the Success element which has no sense
used together with the Errors container.
So the final proposal defines a fixed standardized element for
both Warning and Error elements so that a server
can use the one that best suits the response it is going to send.
The Status attribute according to OTA is defined as
follows:
“If present, recommended values are those enumerated in the
OTA_ErrorRS, (NotProcessed | Incomplete | Complete | Unknown)
however, the data type is designated as string data, recognizing
that trading partners may identify additional status conditions
not included in the enumeration.”
OTA therefore allows the definition of additional values for such
attribute so we could easily define the following:
- ALPINEBITS_FREEROOMS for requesting a completeSet of free rooms data
- ALPINEBITS_RATEPLANS for
requesting a completeSet of rate plan data (full data +
completeSet)
- ALPINEBITS_INVENTORY for requesting the room configuration
The value for the Status attribute must be chosen from
the above ones based on the needs of the server.
The Type attribute is set to “11” (advisory) so to make
clear that the element is not an AlpineBits warning (Warning
element with Type=”3”) nor an AlpineBits error (Error
element with Type=”13”).
The content of the element can be left empty.
Only one of such elements may be sent in a
given response, implying that if a server requires several
completeSets for different data, it must request them in
different responses (one for each).
This is in order to maintain a form of single “request-response”
communication without the client’s need to keep track of several
completeSet requests in a single RS message.
A server SHOULD request a specific completeSet only regarding
data that the client supports (i.e. that has been previously
sent by the client at least once).
A client MUST ignore any completeSet request regarding data it
does not support with the given server.
Upon receiving a response with one of these elements in the form
described above, the client MUST transmit the required completeSet
as soon as possible, ideally right after receiving the response,
in order to avoid any inconsistency to remain on the server for
too long.
A server MUST NOT request a completeSet in
response to a completeSet regarding the same data sent by the
client.
A client MUST ignore any completeSet request received in
response to a completeSet if the requested completeSet refers to
the same data just sent (FreeRooms, RatePlans or Inventory).
This is to avoid communication loops in which a server, due to
processing errors, automatically requests a completeSet after
receiving one, thus forcing a client to continuously send full
data.
Example 1:
<Success/>
<Warnings>
<Warning Type=”11” Status=”ALPINEBITS_FREEROOMS”></Warning>
</Warnings>
The server accepts the message and requests a FreeRooms
completeSet.
Example 2:
<Success/>
<Warnings>
<Warning Type=”3”>
Rate elements referred to same InvTypeCode with
overlapping periods
</Warning>
<Warning Type=”11” Status=”ALPINEBITS_RATEPLANS”></Warning>
</Warnings>
The server sends a warning together with a request for a RatePlans
completeSet.
Example 3:
<Errors>
<Error Type=”13” Code=”321”>
missing Start attribute in StatusApplicationControl
element
</Error>
<Error Type=”11” Status=”ALPINEBITS_FREEROOMS”></Error>
</Errors>
The server sends an error together with a request for a FreeRooms
completeSet.
Il 12/06/18 17:00, Tech YA ha scritto: