You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After deciding the API model, we need to agree on implementation details.
This document is focusing on the language selection for the core APIs (person API, org API, Affilitaions API, profile API)
Considerations
Type validation
Documentation API
Code maintenance/readability
Language popularity (libraries, community)
Testing
gRPC support
Possible languages
We shouldn't be introducing any new languages to BCC IT so we're going to choose from 3 that are already used
Node js
C#
Golang
Language comparison
Node
Pros
The team is familiar with it
The most used language with most developers
Language is easy to learn and understand
Rich community with libraries allowing for testing, debugging, hot reloads
Same language as in the frontend, so it allows for code sharing
Cons
Higher latencies for API requests
Loosely typed
Stack traces are useless in async functions
NPM packages are often compromised (bad for security)
Remarks
It is possible to generate documentation and input validators from Typescript definitions
C#
Pros
Strongly typed
Input validation and documentation out of the box
Solid stack traces
Official packages provide good security (entity framework)
Cons
A lot of boilerplate
Steeper learning code
Not that well supported on VS Code
More difficult to dockerize
Remarks
Team has minimal experience with the language
Go
Pros
Strongly typed
Compiles to binary
Good testing framework
Easy to dockerize
Cross-platform support
Best performance
Cons
No experience in the team
Remark
Media is satisfied with the language
Decision
Because of insufficient experience with Go and C# we cannot make a decision 100% certainly, but based on research we feel like go is more likely to be the right choice, so we're going to implement the first API with go.
If the results are not satisfactory then we're going to re-evaluate
Consequences
We need to learn a new language which is going to take some time and effort.
Alternatives
Node: We want to avoid the mess of loosely type language causing data integrity issues
C#: Also a good alternative, but with our current knowledge it's better to go with Go
The text was updated successfully, but these errors were encountered:
Remember that ADRs are publicly available hence do not include any confidential information in the issue description!
To read more about ADR please refer to documentation.
We do have experience with .NET and we created building blocks that help to setup APIs with minimal effort. But Golang seems to be an interesting option.
The language choice can be made from service to service and team to team - different languages may be suitable for different scenarios.
However, leveraging both experience and libraries/patterns from other teams and projects should always be taken into the equation. This can be valuable both for speeding up development time and also when running into common issues.
Support the choice of GO for the first API in Members :-)
Context
After deciding the API model, we need to agree on implementation details.
This document is focusing on the language selection for the core APIs (person API, org API, Affilitaions API, profile API)
Considerations
Possible languages
We shouldn't be introducing any new languages to BCC IT so we're going to choose from 3 that are already used
Language comparison
Node
Pros
Cons
Remarks
C#
Pros
Cons
Remarks
Go
Pros
Cons
Remark
Decision
Because of insufficient experience with Go and C# we cannot make a decision 100% certainly, but based on research we feel like go is more likely to be the right choice, so we're going to implement the first API with go.
If the results are not satisfactory then we're going to re-evaluate
Consequences
Alternatives
The text was updated successfully, but these errors were encountered: