Promoting a SQLstream Application
There are two approaches to application promotion:
The application is maintained as a set of scripts, which can be source controlled. All local data is added via SQL scripts which can be applied to target SQLstream s-Server repositories using SQLline.
Care must be taken to always develop and test using application instances built cleanly from the scripts, rather than making manual adjustments - whether using SQLstream s-Studio or SQLline - to the SQLstream repository objects and data.
This approach assumes that the application is represented by the entire content of the SQLstream s-Server repository.
To promote the application, do the following three operations:
•Cause a checkpoint to be produced on the source system (for example, by a clean shutdown of SQLstream s-Server or a user-initiated checkpoint.
oA checkpoint backup of the repository is created if you stop the SQLstream s-Server by typing !quit or !kill into the SQLstream s-Server terminal window. (See Starting and Stopping SQLstream s-Server.) Typing Ctrl+C in that window can also stop the server, but does not not create a checkpoint backup of the repository. The next restart of the server will restore the previous checkpoint backup, lacking any changes made to repository objects since that prior backup. Typing Ctrl+C should only be done in extreme circumstances.
•Copy the checkpoint files to the target system, replacing the checkpoint there.
Post promotion actions
It may be necessary to modify some elements of the application. For example, to relocate from development to test, alterations may be needed to the URLs or other options for foreign streams, which can be achieved by either of the following two operations:
1.By (automatically) editing the catalog file before starting SQLstream s-Server, or
2.By running a SQL script against the catalog once SQLstream s-Server is started.
After doing either 1 or 2, make sure to checkpoint the final definition. Otherwise, if it falls over, you have to do the conversion again. Use a command such as:
$ checkpoint --createnamed finalDefinition