7. Using Repeat Queries with OpenAPI : Repeat Query ID : Compile-time and Runtime IDs
Share this page                  
Compile-time and Runtime IDs
An OpenAPI application can use either a compile-time or runtime ID for repeat queries. A compile-time ID is more difficult to maintain, while a runtime ID is less efficient because different clients running the same application will not share repeat queries.
The application programmer must maintain a compile-time ID. If a query is changed and recompiled, the query ID must be changed to distinguish the new query from the previous version. The application programmer must create the query ID in such a way as to guarantee uniqueness, not just in that application, but across all existing applications.
A runtime ID can use information about the client runtime environment, such as machine name and process ID, to create a unique ID for that client. This is easier to manage than a compile-time ID, but clients running the same application and executing identical queries will duplicate resources on the server. OpenAPI can create a runtime-unique repeat query ID for the application. The application is not required to provide a repeat query ID when the repeat query is defined. If the repeat query ID is omitted, OpenAPI generates a runtime-unique ID that uses host, process, timestamp, and application profile information. An application should not mix usage of OpenAPI-generated IDs and application-provided IDs.