Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue 27] API Language ADR #38

Merged
merged 16 commits into from
Jul 7, 2023

Conversation

SammySteiner
Copy link
Contributor

Resolves #27

Discusses pros and cons of three popular api service languages.

- Nava and HHS experience with Python and APIs built with Python
- Number of available libraries and frameworks
- Free and open source to use
- Ideal for data computation and complex database queries
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add that it has superior data science / algorithmic libraries compared to the other two?

Python as a scripting language is fast and productive. Web-based applications can be created quickly and the code is highly readable. Python syntax is easy to understand, well-defined and extensible. APIs built over python are highly scalable and have an unmatched speed.

- **Pros**
- Nava and HHS experience with Python and APIs built with Python
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add something about broad developer familiarity, outside of just HHS/Nava, because that determines whether it's easy to hire people, whether it's easy for open source contributors, etc.

I would think Python and Node/JS have relatively equal popularity, with Java kind of falling behind, it doesn't seem as commonly used anymore by modern applications.

- Free and open source to use
- Ideal for data computation and complex database queries
- **Cons**
- Single threaded and can be slower than other options
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Python has multi-threading (if we wanted for some reason) and async support (on newest version)

- Could use the same framework for frontend, simplifying infrastructure
- **Cons**
- Not as mature as other options
- Responsiveness may be slowed by any CPU intensive computation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we went with a full-stack JavaScript implementation, if we could extrapolate data-intensive and computation heavy workloads into Python scripts anyway. Or maybe in that case just better to go with full-stack Python if we have a lot of use-case for that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saying, maybe there's a world where we pick both? :D

@acouch acouch mentioned this pull request Jun 28, 2023
2 tasks
@widal001 widal001 mentioned this pull request Jun 30, 2023
18 tasks
@SammySteiner SammySteiner marked this pull request as ready for review June 30, 2023 14:54
@SammySteiner SammySteiner changed the title API Language ADR [Issue 27] API Language ADR Jun 30, 2023
@widal001 widal001 mentioned this pull request Jun 30, 2023
14 tasks
@SammySteiner SammySteiner requested a review from acouch June 30, 2023 17:23
Copy link
Collaborator

@widal001 widal001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great @SammySteiner I think you captured the pros and cons of going with Python well!

I left a few small suggestions to fix minor typos and had one comment about Python's unmatched speed -- which is at odds with the con about python's single-threaded locking just a few lines down.


### Python

Python as a scripting language is fast and productive. Web-based applications can be created quickly and the code is highly readable. Python syntax is easy to understand, well-defined and extensible. APIs built over Python are highly scalable and have an unmatched speed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APIs built over Python are highly scalable and have an unmatched speed.

I'm a big fan of python, but I'm not sure this is a true statement. Python is outperformed pretty consistently by Go and Node.js even when using a ASGI-based web framework like FastAPI.

documentation/decisions/adr/0003-api-language.md Outdated Show resolved Hide resolved
documentation/decisions/adr/0003-api-language.md Outdated Show resolved Hide resolved
documentation/decisions/adr/0003-api-language.md Outdated Show resolved Hide resolved
documentation/decisions/adr/0003-api-language.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@lucasmbrown-usds lucasmbrown-usds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! This was a lot of work for a basic decision, but I'm also really glad we're laying a strong foundation for our choices so we can move ahead with speed in the future. Nice work pulling this all together @SammySteiner !

@widal001 widal001 added the docs: adr Architecture decision record ticket label Jul 5, 2023
@SammySteiner SammySteiner merged commit e51b052 into main Jul 7, 2023
@SammySteiner SammySteiner deleted the sammysteiner/issue-27-api-language-adr branch July 7, 2023 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs: adr Architecture decision record ticket
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ADR]: Language to use for the API
5 participants