With the release of Xbase++ Build#2187, new features such as SmartOrders and RemoteFilters have been introduced, bringing significant changes to how ISAM-compatible orders are implemented. As a software developer working with Xbase++, it's a good idea to understand these changes, especially when upgrading or downgrading applications at the customer site.
This article will outline the key aspects of SmartOrders and provide best practices to ensure a smooth transition.
Terminology
1. Use the NO-SMART-ORDER Connection Token:
Initially, use the `NO-SMART-ORDER` connection token to ensure that your application continues to function as it did before the upgrade. This allows you to test the new build without immediately converting to SmartOrders. This also provides a fallback option if issues arise.
Note: Alternatively, you can disable SmartOrders for your application by setting the PG_NO_SMARTORDER environment variable to any value for your process environment. This should be considered as a last resort in cases where connection strings can not easily be reconfigured with the NO-SMART-ORDER token and a rebuild of the application would be required.
2. Thoroughly Test Your Application:
Before deploying the new build to your customers, thoroughly test your existing application with SmartOrders enabled and re-build all ISAM indexes/orders. Verify both performance and behavior under various scenarios to ensure that the new system works as expected. Testing in your lab environment is a key to catching any issues before they affect your production environment.
3. Migrate All Applications Simultaneously:
Since mixing old and new applications is not possible, plan to migrate all applications sharing the same ISAM emulating database to SmartOrders at the same time. This coordinated upgrade will prevent compatibility issues and ensure a smooth transition across all your systems.
By carefully planning and executing these transitions, you can take full advantage of the new capabilities and increased performance offered by SmartOrders while minimizing disruptions to your applications and databases.
Referenes:
SmartOrders - Intro
This article will outline the key aspects of SmartOrders and provide best practices to ensure a smooth transition.
Note that ignoring the following when upgrading/downgrading your Xbase++ runtime may lead to errors in navigational ISAM operations, or may lead to invalid or missing stored procedures required for the ISAM emulation. Your data is not affected. The issues are only related to the automatically maintained SQL indexes required for the ISAM emulation.
Terminology
- Old: Refers to Xbase++ applications using Build#2158 or earlier
- New: Refers to Xbase++ applications using Build#2187 or later
Key Points to Know About SmartOrders
Automatic Order Update:
When updating an old Xbase++ application to the new build, the existing orders are automatically attempted to be updated to SmartOrders during the next reindexing process. This means that after upgrading, the system will try to optimize existing orders with the next ISAM index/order re-create using the new SmartOrder approach.Creation of New Orders:
Any new orders created in applications using Build#2187 or higher will be SmartOrders by default, provided that it is possible within the context of the application. This ensures that new data handling is optimized right from the start.Compatibility Issues:
Mixing old and new applications that access the same PostgreSQL ISAM-emulating database is not possible. The difference in how orders are managed between the old and new builds can lead to serious data access issues. Therefore, all applications accessing the same database must be on a new build to maintain compatibility.Downgrading Considerations:
If you need to downgrade from a new application (Build#2187) to an old one, you must re-create all indexes. This is necessary because the SmartOrders format is not compatible with the older order handling system. Without re-creating the indexes, the old application will not function correctly.Best Practices for Transitioning to SmartOrders
To avoid potential issues when upgrading your applications to the new SmartOrders system, it's recommended to follow these steps:1. Use the NO-SMART-ORDER Connection Token:
Initially, use the `NO-SMART-ORDER` connection token to ensure that your application continues to function as it did before the upgrade. This allows you to test the new build without immediately converting to SmartOrders. This also provides a fallback option if issues arise.
Note: Alternatively, you can disable SmartOrders for your application by setting the PG_NO_SMARTORDER environment variable to any value for your process environment. This should be considered as a last resort in cases where connection strings can not easily be reconfigured with the NO-SMART-ORDER token and a rebuild of the application would be required.
2. Thoroughly Test Your Application:
Before deploying the new build to your customers, thoroughly test your existing application with SmartOrders enabled and re-build all ISAM indexes/orders. Verify both performance and behavior under various scenarios to ensure that the new system works as expected. Testing in your lab environment is a key to catching any issues before they affect your production environment.
3. Migrate All Applications Simultaneously:
Since mixing old and new applications is not possible, plan to migrate all applications sharing the same ISAM emulating database to SmartOrders at the same time. This coordinated upgrade will prevent compatibility issues and ensure a smooth transition across all your systems.
Final Reminders
When dealing with SmartOrders and other new features in Xbase++ Build#2187 or higher, it's essential to approach upgrades and downgrades with caution. Always conduct thorough testing in your lab environment before rolling out changes to your customers.By carefully planning and executing these transitions, you can take full advantage of the new capabilities and increased performance offered by SmartOrders while minimizing disruptions to your applications and databases.
Referenes:
SmartOrders - Intro