NEWT: Back-end Technology Selection

notion image
 
Hello! My name is Rodrigo Ramirez, I’m a Full-stack developer at ReiwaTravel, and I had the opportunity and responsibility of selecting NEWT stack. Specially for the Backend and Frontend.
 

Choosing the right technology stack

 
Our decisions for selecting a technology stack were based on 3 important factors.
( Product & Team, Engineer Market, Technology Stack )
 
You can find a detailed explanation about this on the following blog:
 

NEWT Backend stack

The core of our stack is based on our programming language, API layer, Infra, so let me focus on those 3 points.
 
  • TypeScript = programming language
  • GraphQL = API layer
  • GCP = Infra
 
notion image
 
 

API Layer

 
Selection Criteria
  • One way to request information from our Web and Mobile apps.
  • The solution should be easy to maintain and scale.
 
Candidates
We summarized important points about each options
 
notion image
 
  • REST and GraphQL work well in Web and Mobile Apps, but gRPC is not yet well-supported on websites (it may require a proxy)
  • Schema-based requests are important to keep a contract between your clients and the server.
  • In the case of maintainability and testing, GraphQL and gRPC architecture mainly focus on that, but about REST, you will have to take extra care of the implementation.
  • Development Speed & Smaller Payloads were important, and here is where GraphQL and gRPC architecture are ideal for that. REST can cover all the same points, but additional maintenance costs are required. Whereas GraphQL and gRPC offer that out of the box.
 
Conclusion
GraphQL was the best option to cover all the uses cases we needed
gRPC was also a good option, but as I mentioned before, it’s not well supported for websites, and the implementation cost looks high compared to GraphQL.
 
 

Programming Language

 
Selection Criteria
  • Current team knowledge
  • We decided to use GraphQL, so we need a language that fits well with that.
  • Easy to Develop and Deploy
 
Conclusion
We decided to go with TypeScript, and the main reasons were:
  • Our team members already had production experience with TypeScript and GraphQL
  • Our frontend team also uses Typescript
  • Node.JS/Typescript is the most popular option for implementing GraphQL servers.
  • Node.JS/Typescript apps can be deployed anywhere.
 
 
 

Infra / Cloud Providers

 
Selection Criteria
  • We were looking for managed solutions since we didn’t count on a full-time infra engineer.
  • It should be easy to deploy, scale and monitor for us.
 
Candidates
We compared various solutions offered by GCP and AWS based on our selection criteria, and we finally reduced it to two options:
 
GCP: Cloud Run Managed service to deploy serverless containers
 
AWS: Elastic Beanstalk
Managed service to deploy and scale AWS EC2 instances
 
We compared the features offered by both services, but in conclusions both were good enough to achieve what we wanted to do.
notion image
 
Conclusion
We decided to go with GCP Cloud run, because:
 
  • GCP interface was easier to understand
  • Cloud run was easy to deploy and setup compared with Elastic Beanstalk.
  • We planned to use Firebase Auth and BigQuery. So keeping all in the same place will simplify the infra maintenance.
 
notion image
 

Bonus: Vercel & Testin g Environments

 
"GCP Cloud run” was good for deploying our production apps, but, How about our testing environments? Keeping one or two is not a problem, but was there an easier solution to create a testing environment quickly to simplify the work for QA engineers and developers?
 
Here comes Vercel to simplify all the infra work for us.
 
notion image
 
  • Vercel automatically generates testing environments for each PR.
  • We use GitHub Action to create a DB based on the branch name.
  • After a branch is deleted, the DB is also destroyed.
  • Vercel also generates our testing environment for our Admin and Web apps
 
 
 

We are hiring!

We are looking for talented Backend engineers to join the ReiwaTravel team and build together NEWT.
 
If you are interested, we look forward to hearing from you!
 
We will be holding events regularly, so please register as a connpass member!
 

# gcp

# graphql

# nodejs

# typescript

# vercel