Simpler.Grants.gov Public Wiki
Grants.govSimpler.Grants.govGitHubDiscourse
  • 👋Welcome
  • GET INVOLVED
    • Why open source?
    • How to contribute code
    • How to file issues
      • Report a bug
      • Request a feature
      • Report a security vulnerability
    • Community guidelines
      • Code of Conduct
      • Reporting and removing content
      • Incident response protocol
    • Community events
      • Fall 2024 Coding Challenge
        • Event Submissions & Winners
      • Spring 2025 Collaborative Coding Challenge
        • Event Submissions & Winners
    • Communication channels
  • Product
    • Roadmap
    • Deliverables
      • 🏁Static site soft launch
      • 🏁Static site public launch
      • 🏁GET Opportunities
      • 🏁Open source onboarding
      • 🏁Co-Design Group planning
    • Decisions
      • ADR Template
      • ADRs
        • Dedicated Forum for Simpler.Grants.gov Community
        • Recording Architecture Decisions
        • Task Runner for the CI / CD Pipeline
        • API Language
        • Use Figma for design prototyping
        • ADR: Chat
        • DB Choices
        • API Framework and Libraries
        • Back-end Code Quality Tools
        • Front-end Language
        • Communications Tooling: Wiki Platform
        • Use Mural for design diagrams and whiteboarding
        • Ticket Tracking
        • Front-end Framework
        • Front-end Code Quality Tools
        • Front-end Testing & Coverage
        • Backend API Type
        • Front-end Testing & Coverage
        • Deployment Strategy
        • Use U.S. Web Design System for components and utility classes
        • FE server rendering
        • Use NPM over Yarn Architectural Decision Records
        • U.S. Web Design System in React
        • Communications Tooling: Video Conferencing
        • Back-end Production Server
        • Communications Tooling: Analytics Platform
        • Commit and Branch Conventions and Release Workflow
        • Cloud Platform to Host the Project
        • Infrastructure as Code Tool
        • Data Replication Strategy & Tool
        • HHS Communications Site
        • Communications Tooling: Email Marketing
        • Communications Tooling: Listserv
        • Use Ethnio for design research
        • Uptime Monitoring
        • Database Migrations
        • 30k ft deliverable reporting strategy
        • Public measurement dashboard architecture
        • Method and technology for "Contact Us" CTA
        • E2E / Integration Testing Framework
        • Logging and Monitoring Platform
        • Dashboard Data Storage
        • Dashboard Data Tool
        • Search Engine
        • Document Storage
        • Document Sharing
        • Internal Wiki ADR
        • Shared Team Calendar Platform
        • Cross-Program Team Health Survey Tool
        • Adding Slack Users to SimplerGrants Slack Workspace
        • Repo organization
        • Internal knowledge management
        • Migrate Existing API Consumers
      • Infra
        • Use markdown architectural decision records
        • CI/CD interface
        • Use custom implementation of GitHub OIDC
        • Manage ECR in prod account module
        • Separate terraform backend configs into separate config files
        • Database module design
        • Provision database users with serverless function
        • Database migration architecture
        • Consolidate infra config from tfvars files into config module
        • Environment use cases
        • Production networking long term state
    • Analytics
      • Open source community metrics
      • API metrics
  • DESIGN & RESEARCH
    • Brand guidelines
      • Logo
      • Colors
      • Grid and composition
      • Typography
      • Iconography
      • Photos and illustrations
    • Content guidelines
      • Voice and tone
    • User research
      • Grants.gov archetypes
  • REFERENCES
    • Glossary
  • How to edit the wiki
Powered by GitBook
On this page
  • Context and Problem Statement
  • Decision Drivers
  • Options Considered
  • Decision Outcome
  • Positive Consequences
  • Negative Consequences
  • Pros and Cons of the Options
  • Python
  • Javascript and Node
  • Java

Was this helpful?

Edit on GitHub
  1. Product
  2. Decisions
  3. ADRs

API Language

PreviousTask Runner for the CI / CD PipelineNextUse Figma for design prototyping

Last updated 28 days ago

Was this helpful?

  • Status: Active

  • Last Modified: 2023-06-30

  • Related Issue:

  • Deciders: Lucas, Aaron, Sammy, Daphne, Billy

Context and Problem Statement

This ADR is to decide what programming language the API server for simpler.grants.gov will use. This API server will initially be responsible for responding to queries to search a replicated database, but will grow to encompass all the back-end responsibilities of grants.gov

In addition to the Nava and HHS teams ability to develop and maintain an API in the chosen language, it is also important that this language lends itself to open source engagement.

Decision Drivers

  • Nava and HHS familiarity with language and common libraries

  • Performance of language and associated frameworks at scale

  • Support of Open Source community

  • Cost of necessary licenses, support, etc.

Options Considered

  • Python

  • Javascript and Node

  • Java

Decision Outcome

Chosen option: Python, because it is free and open source and designed to be easy for anyone to learn quickly and contribute. Additionally, while all the languages can support the technical needs, Python in particular is optimized to handle the large and complex grants.gov dataset, and makes other parts of the project simpler, including ETL and data analysis for the analytics endpoints.

Positive Consequences

  • We're hopeful that this choice will lead to open source contribution and adoption

  • We can make use of python libraries designed for complex data queries to quickly deliver features and analytics

Negative Consequences

  • Will require some context switching when going from work on the API to the front-end

Pros and Cons of the Options

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, reliable, and fast.

Because of its popularity in the open source community, Python makes it easy for open source contributors to support our work.

  • Pros

    • Nava and HHS experience with Python and APIs built with Python

    • Number of available libraries and frameworks

    • Robust data science and algorithmic libraries

    • Free and open source to use

    • Ideal for data computation and complex database queries

  • Cons

    • Single threaded locking of GIL can make computationally expensive operations slower than other options

Javascript and Node

Node JS is used to build fast, highly scalable network applications based on an event-driven non-blocking input/output model, single-threaded asynchronous programming. It also suits well for microservice-based products. Such Node.js utility is accomplished by such characteristics as support of a non-blocking input-output and a significant number of connections.

Because of its popularity in the open source community, Javascript and Node makes it easy for open source contributors to support our work.

  • Pros

    • Nava experience with Javascript language and Node based API servers

    • Fast single threaded but asynchronous event driven operation

    • Free and open source to use

    • Same language as most front-end apps requiring less context switching for developers

    • Could use the same framework for front end, simplifying infrastructure

  • Cons

    • Not as mature as other options

    • Responsiveness may be slowed by any CPU intensive computation

Java

Java is widely used for building enterprise-scale web applications as it is one of the most stable languages on the market. Java’s advantages include platform independence, multi-threaded processing, automatic garbage collection, and security.

Because of its proprietary nature, Java is not as popular with the open source community, which adds some barriers for open source contributors to support our work.

  • Pros

    • Multi-threaded processing

    • Long track record of reliability and stability as an Enterprise solution

  • Cons

    • Commercial use requires expensive licenses and not as open source friendly

    • Compilation and abstraction by the Java Virtual Machine makes performance slower

    • Nava team is not as familiar with Java as they are with the other options

#27