Anti-Patterns

Issue Explanation Anti-Pattern Consequence Recommendations

Attempting to initiate a new request for the startReservationsDailySummaryProcess operation (request that uses the parameter "startLastModifiedDate/endLastModifiedDate") while an existing request is still in progress, leading to the error "Previous request exists within the allowed 3-hour time frame."

This error indicates that there is an ongoing request for the startReservationsDailySummaryProcess operation that has not completed the entire three-step data process (POST, HEAD, and GET). The API enforces a restriction that only one request for this operation is allowed within a 3-hour time frame.

Initiating a new request without allowing the previous one to complete could lead to increased server load and potential disruptions in the expected data flow.

It is crucial to finalize the preceding request by executing all three steps (POST, HEAD, and GET) before attempting to initiate a new data request for the startReservationsDailySummaryProcess operation. This recommendation should be followed not only for startReservationsDailySummaryProcess but also for other POST asynchronous operations that fetch data from OPERA Cloud. Ignoring ongoing requests for any asynchronous operation may result in undesired outcomes. Always ensure that each asynchronous operation follows a sequential and orderly execution to maintain data integrity and API functionality.

Attempting to update data to OPERA Cloud immediately after its creation using asynchronous APIs without considering the payload size, assuming no restrictions on the update process.

While the operations that POST data to OPERA Cloud, including rate updates, operate on a first-come, first-served basis, allowing updates right after creation, the primary limitation lies in the payload size. Ignoring the payload size recommendation of 200 entries within the item array can lead to suboptimal performance, increased server load, and potential disruptions in the processing of API requests.

Frequent and unrestricted updates without adhering to payload size guidelines may result in inefficient API processing, increased latency, and potential errors. This can impact the overall reliability and performance of the asynchronous update operations.

It is crucial to consider and adhere to the recommended and optimal payload size of 200 entries within the item array when updating rates or performing other POST data to OPERA Cloud operations. Ignoring this guideline may lead to an anti-pattern where updates are made without proper consideration, potentially causing performance issues and compromising the reliability of the API. Always ensure that API usage aligns with recommended best practices for optimal performance and data integrity.