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

ADR for usage of gRPC for networking between services #479

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cturnbull-bitwarden
Copy link

🎟️ Tracking

Originated out of https://bitwarden.atlassian.net/wiki/spaces/EN/pages/809828356/Proposal+The+Pricing+Plans+Service

📔 Objective

This PR introduces a new ADR titled "Adopting gRPC for Inter-Service Communication". The purpose is to document the decision-making process and outcomes regarding adopting gRPC for inter-service communication within Bitwarden's microservices architecture.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@cturnbull-bitwarden cturnbull-bitwarden requested a review from a team as a code owner November 20, 2024 19:07
@github-actions github-actions bot added the adr label Nov 20, 2024
Copy link

github-actions bot commented Nov 20, 2024

Logo
Checkmarx One – Scan Summary & Detailsb6b15e7e-73aa-4173-94a5-bce3fcf5a59b

No New Or Fixed Issues Found

Copy link

cloudflare-workers-and-pages bot commented Nov 25, 2024

Deploying contributing-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 86940bc
Status: ✅  Deploy successful!
Preview URL: https://0091685f.contributing-docs.pages.dev
Branch Preview URL: https://adr-24-grpc.contributing-docs.pages.dev

View logs

Copy link
Contributor

@withinfocus withinfocus left a comment

Choose a reason for hiding this comment

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

I think a pivot on the contents will be beneficial here. I think I can get behind the end outcome based on my own experiences, but the way you got there isn't vetted as-is.

fast inter-service communication. It offers several advantages over traditional REST APIs and other
HTTP/1.1 technologies:

1. **Performance**: gRPC uses Protocol Buffers as its interface definition language and binary
Copy link
Contributor

Choose a reason for hiding this comment

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

⛏️ These don't need to be numbered; just use bullets.

fast inter-service communication. It offers several advantages over traditional REST APIs and other
HTTP/1.1 technologies:

1. **Performance**: gRPC uses Protocol Buffers as its interface definition language and binary
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. **Performance**: gRPC uses Protocol Buffers as its interface definition language and binary
1. **Performance** - gRPC uses Protocol Buffers as its interface definition language and binary

Like the considered options, dash these.


## Context and Problem Statement

As Bitwarden's microservices architecture continues to evolve, the need for efficient, reliable, and
Copy link
Contributor

Choose a reason for hiding this comment

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

🎨 Please drop any and all references to "microservices" in favor of "service-oriented architecture" or just "services".

- **Adopt gRPC for all inter-service communication** - Completely replace REST with gRPC for all
service-to-service interactions.
- **Hybrid approach** - Implement gRPC for all new services while maintaining existing solutions.
- **Evaluate alternative RPC frameworks** - Consider other RPC frameworks like Apache Thrift or
Copy link
Contributor

Choose a reason for hiding this comment

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

💭 This is really what the ADR is about. While we often have a proposed solution when the ADR is written, gRPC is explained above before options are even laid out. What I'd like to see adjusted here is to move the gRPC content below and into the decision outcome as well as pros and cons. These additional RPC frameworks should be listed as options, with the decision outcome explaining why they were not a good fit. Your background above shouldn't be anything about gRPC but the problem at hand and desire to optimize the channel, security, etc. generically and not aligned with a specific choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants