Content
Updated by Cyril Rohr about 2 months ago
Hi, we have a descion to make regarding [our OP<->NC setup script](https://github.com/nextcloud/integration_openproject/blob/master/integration_setup.sh).
We are planning to extend the script to support the OIDC setup in the future. This has raised the question of whether we should switch from Bash to a higher-level language for better maintainability.
Let's collect opinions here in the description:
### **Feedback: OpenDesk**
Totally in favor of using a higher-level language. Python or another language. Ideally it would be Go
### **Feedback:** **@Eric Schubert**
The key focuses for the integration script, in my opinion, are:
* **HTTP requests**
* **Error behavior** (timeouts or long-running requests)
* **Type-safe serialization**
Based on these points, I have two suggestions:
* **Go**
* **Rust**
What are the advantages and perhaps disadvantages of each?
#### Go
* Simple, limited syntax; easy to learn with few keywords
* Very lightweight bootstrapping, just two files
* Compiles directly for the target architecture: `linux-x64`, `armv8`, etc.; standalone, no runtime/interpreter required
* Type-safe JSON serialization
* High performance
* Built-in HTTP library
#### Rust
* More complex syntax, requires some initial effort to get started
* Very lightweight bootstrapping, just two files
* Compiles directly for the target architecture: `linux-x64`, `armv8`, etc.; standalone, no runtime/interpreter required
* Type-safe JSON serialization
* High performance
* High safety and robustness for error handling in HTTP usage through async language features
### Feedback: <mention class="mention" data-id="16773" data-type="user" data-text="@Cyril Rohr">@Cyril Rohr</mention>
I'm not sure what are the functional requirements for this script for the short and mid-term. Is it supposed to drive browser interactions at some point? If so, I assume something that can easily work with puppeteer (i.e. JS/TS) would be best (also since everyone knows how to write Javascript)? Otherwise I'm fine with Go.
After reviewing the [integration script](https://github.com/nextcloud/integration_openproject/blob/master/docs/setting_up_via_shell_script.md), just a food for thought: any plan to instead provide some kind of openproject CLI for admin tasks (written in go), i.e. you could drive the integration with `openproject enable nextcloud [args]`. So that the integration bash script could be a one-liner?
Also opens more use-cases down the line to manage an openproject install.
We are planning to extend the script to support the OIDC setup in the future. This has raised the question of whether we should switch from Bash to a higher-level language for better maintainability.
Let's collect opinions here in the description:
### **Feedback: OpenDesk**
Totally in favor of using a higher-level language. Python or another language. Ideally it would be Go
### **Feedback:** **@Eric Schubert**
The key focuses for the integration script, in my opinion, are:
* **HTTP requests**
* **Error behavior** (timeouts or long-running requests)
* **Type-safe serialization**
Based on these points, I have two suggestions:
* **Go**
* **Rust**
What are the advantages and perhaps disadvantages of each?
#### Go
* Simple, limited syntax; easy to learn with few keywords
* Very lightweight bootstrapping, just two files
* Compiles directly for the target architecture: `linux-x64`, `armv8`, etc.; standalone, no runtime/interpreter required
* Type-safe JSON serialization
* High performance
* Built-in HTTP library
#### Rust
* More complex syntax, requires some initial effort to get started
* Very lightweight bootstrapping, just two files
* Compiles directly for the target architecture: `linux-x64`, `armv8`, etc.; standalone, no runtime/interpreter required
* Type-safe JSON serialization
* High performance
* High safety and robustness for error handling in HTTP usage through async language features
### Feedback: <mention class="mention" data-id="16773" data-type="user" data-text="@Cyril Rohr">@Cyril Rohr</mention>
I'm not sure what are the functional requirements for this script for the short and mid-term. Is it supposed to drive browser interactions at some point? If so, I assume something that can easily work with puppeteer (i.e. JS/TS) would be best (also since everyone knows how to write Javascript)? Otherwise I'm fine with Go.
After reviewing the [integration script](https://github.com/nextcloud/integration_openproject/blob/master/docs/setting_up_via_shell_script.md), just a food for thought: any plan to instead provide some kind of openproject CLI for admin tasks (written in go), i.e. you could drive the integration with `openproject enable nextcloud [args]`. So that the integration bash script could be a one-liner?
Also opens more use-cases down the line to manage an openproject install.