Best practices
Development loop
Section titled “Development loop”The Developer Loop is the repetitive cycle of coding, building, and testing. To make developing fast and easy there are several recommendations.
It is recommended to use a staged testing approach to ease local development of ProcessingSteps without the need for full integration to the platform.
Integration during development
Section titled “Integration during development”Once the signature of a ProcessingStep is (more or less) stable it is possible to register the function within PineXQ but without deployment. The function can then already be integrated in Workflows. Use a prerelease version to indicate the working stage of the ProcessingStep and version ranges in the Workflows to seamlessly update the used ProcessingSteps. During development the function is then computed on a developer machine by remote connection.
This way a full workflow or existing data in the platform can be used to drive local development or debugging.
Suggested development loop
Section titled “Suggested development loop”A loop that is very productive when code is more complex than the simplest functions or needs integration into workflows is as follows:
- [Optional] Create new project with the cli tool:
pinexq init - Design the function signature (parameters, DataSlots and return value) and implement a dummy or empty body
- [Optional] implement the reader / writers and test their behavior using local (unit) tests
- Implement the function and test with local (unit) tests and data
- Register the ProcessingStep without deployment
pinexq register.- now the ProcessingStep can be started in the Platform or be used in workflows but no processing will happen since it is not deployed. Hint: use a version range to specify the use ProcessingStep in Workflows so the latest fitting version is used automatically when executing the workflow.
- It is recommended to use a prerelease version in the development stage
- Run ProCon locally (from your IDE) and establish a remote debugging connection to PineXQ. Note: the Portal will give you assistance with the required connection parameters. Find it on the ProcessingStep list.
- Execute a job using the platform, test and refine your code using your local development environment.
- Repeat Steps
2.to4.until satisfied - Deploy a final version with desired (non prerelease) version
pinexq deploy. - [Optional] Cleanup development version (decommission, delete or hide registered prerelease ProcessingStep)