What should i use t3-stack or express-trpc-nextjs for this project?

Hi guys, I have a question. I'm building a fullstack app and my first thought was to use t3-stack to do it, because it's so cool. But, the app needs scheduled tasks, wbrtc and very good interaction for realtime chat, so I can't decide whether to go for t3-stack or nextjs-express-trpc-prisma. Anyway, the real question, is there a way to deploy a nextjs project to render or railway and still gain the benefits of a CDN? Since Vercel does not work for my backend due to vercel timeout serverless functions. My idea for now is to deploy expresss-trpc backend to Railway and nextjs frontend to Vercel, but then I couldn't use t3-stack. What do you guys recommend?
5 Replies
theo (t3.gg)
theo (t3.gg)3y ago
"Vercel does not work for my backend due to vercel timeout serverless functions" You should explain why on ^ first Chances are the problem causing your timeouts is the thing that will dictate the rest
oljimenez
oljimenez3y ago
Well, at the start of this proyect i was using NextJs and Supabase, but i really need to handle realtime subscriptions from the server, because i need handle events like someone leave the chat (close the tab) or also implement a webRTC server for handling video/audio calls. In the end I couldn't do it in supabase so i decide build my own server and handle all this for my self. Vercel Serverless Functions have 10sec/60sec/900sec timeout depends of the plan, so is not recomended for build websockets connections. That's why i'm looking for render or railway for my backend. What do you think is the best decision for this case? I don't have much experience (almost 2 years) so I'm a bit lost in these kinds of decisions.
theo (t3.gg)
theo (t3.gg)3y ago
The beauty of Vercel is that it is stateless Introducing servers is introducing state and it is choosing to 100x the complexity of what you built I would not recommend implementing your own WebRTC when 100ms, Twilio, Agora, Daily.co and so many more options exist
oljimenez
oljimenez3y ago
Ok, that is for WebRTC. But how can i handle close tab on close websockets connections for chat? What do you recommend. I understand that building my own server is more complexity, but right now i don't know an alternative way of fix this problem with my realtime chat.
theo (t3.gg)
theo (t3.gg)3y ago
Any webrtc solution will have that built in. You can use any websocket provider for presence Check out liveblocks, pusher, ably, pubnub, or Agora's new realtime chat thing
Want results from more Discord servers?
Add your server