Go Vs Rust what to choose next for web API development

github logo ・1 min read

I have been using python and Node for developing APIs, and feel like dropping node for backend and planning to go with Go or Rust, but I was not able to take a decision to choose which one to go with.

So I am all ears, which one should I choose?

twitter logo DISCUSS (5)
markdown guide
 

Go , it got everything in stdlib for web development.
You don't need framework at all

 

What's your requirement? Who is the consumer of your API's just UI or multiple systems? What is the nature of your business logic? What is your rationale to drop python or node?

 

I'm mainly targeting Web API's and In architecture wise microservices and monolithic. I want to drop Node and not Python.

I use python frameworks like Django and Flask for web development where Django ships with pretty much everything that needed for web development and on the other hand Flask is minimal so we may need to add additional libraries to it while developing applications. In both Frameworks and language have the stability to work with.

For Node, I used Express Js for web development it is good and fast but the language and the libraries that come with them are not much stable and for every single thing we need to depend on additional libraries, webpack plugins, etc... and it's single-threaded.

So I started to look for a language that is more robust, stable, multi-threaded and compile-time language.

 

I assume you have a UI with SPA like react or angular. For the backend if you are already using Flask or Django, you could continue. If you need pure backend APIs I would avoid Django but stick to micro framework like Flask as it is minimal and does its job well. I have used it in Production under Gunicorn. Flask Works fine. If your business logic is more of a CRUD on a database, any framework is fine. But if you have too much of computations on your business logic in your application layer, then I would rethink on using languages like Rust (Rocket). Otherwise Java, .NET, Python frameworks work fine. Nodejs is also capable and can scale better as long as you don't block CPU cycles

 

The learning time to put together something in Go is significantly easier. Stdlib has everything you need.

Classic DEV Post from Mar 9

What’s an unpopular software opinion you have?

Please share! ...

Titus Joyson P profile image

DEV has become a critical resource for healthy software careers.

Create Your Account

100% free forever