Is Next.JS for this purpose is too much?
Unanswered
American black bear posted this in #help-forum
American black bearOP
Hi all,
I am a developer in a startup company, considering using next for both frontend and backend of the web (other backend: microservices in Go, sharing the same db with the web).
The web app needs to support the following:
1. Mongo interaction
2. Redis interaction
3. Websockets
4. HTTP API handling
5. Data manipulation (5-8 seconds runtime, nothing too complex).
6. Authentication (auth0)
Other info:
* We are 2 web developers
* After seed we will be 5 web developers
Is it just too much for nextjs?
Should we aim for a different app server?
I am a developer in a startup company, considering using next for both frontend and backend of the web (other backend: microservices in Go, sharing the same db with the web).
The web app needs to support the following:
1. Mongo interaction
2. Redis interaction
3. Websockets
4. HTTP API handling
5. Data manipulation (5-8 seconds runtime, nothing too complex).
6. Authentication (auth0)
Other info:
* We are 2 web developers
* After seed we will be 5 web developers
Is it just too much for nextjs?
Should we aim for a different app server?
14 Replies
@American black bear Hi all,
I am a developer in a startup company, considering using next for both frontend and backend of the web (other backend: microservices in Go, sharing the same db with the web).
The web app needs to support the following:
1. Mongo interaction
2. Redis interaction
3. Websockets
4. HTTP API handling
5. Data manipulation (5-8 seconds runtime, nothing too complex).
6. Authentication (auth0)
Other info:
* We are 2 web developers
* After seed we will be 5 web developers
Is it just too much for nextjs?
Should we aim for a different app server?
You can build anything using Nextjs but if you're going to add websockets and stuff then you will need to either host the application in a serverful environment
@Red-naped Sapsucker or?
everything should work
Red-naped Sapsucker
asking because you said "either host in a serverful environment", which implied an alternative
if you are going to setup websockets in nextjs's api routes then only you need serverful environment
@Red-naped Sapsucker asking because you said "either host in a serverful environment", which implied an alternative
or connect to a custom backend where you've setup websockets via client side sdk
as for #5, does it mean CPU bound tasks? if so you might want to offload it to the Go micro services as Node.js is single thread event loop, it will choke the entire app.
unlike Go, it’s not preemptive but cooperative asynchronous single thread runtime
American black bearOP
Can't I use a thread worker or something?
@@ts-ignore You can build anything using Nextjs but if you're going to add websockets and stuff then you will need to either host the application in a serverful environment
Asian black bear
Wait, I didn't knew this. I cant use websockets with Vercel out of the box?
I will need some third party service such as RabbitMQ, Live Blocks or Pusher?
I will need some third party service such as RabbitMQ, Live Blocks or Pusher?
it is possible to create OS threads but if u have Go backend, the life is easier to keep it simple in Node.js side.
@tafutada777 it is possible to create OS threads but if u have Go backend, the life is easier to keep it simple in Node.js side.
Asian black bear
Can you tell me more about these OS threads in GO? I'm really interested on the language, but not found any use case yet that drives me to implement something and really learn it.
@Asian black bear no, it's not Go but Node.js
as for Go, it does not support OS thread, but M:N threading, called groutine, preemptive super light weight threads.
as for Go, it does not support OS thread, but M:N threading, called groutine, preemptive super light weight threads.