isagi
PPrisma
•Created by isagi on 11/27/2024 in #help-and-questions
How to use Pulse with Next.js
But doesn't this mean I won't have real-time updates? Since the subscription/stream needs to be continuously running and server components/Route handlers are request-scoped, the server process ends after the subscription is set, so if an event is sent there will be no running server that receives it so I won't get real-time updates?
7 replies
PPrisma
•Created by isagi on 11/27/2024 in #help-and-questions
How to use Pulse with Next.js
Thank you @Nurul. I actually found that repo earlier. it's a good approach, But I believe my server component implementation could work as well since we're not initiating Pulse client side - it's all happening server side.
My main concern with the Socket.IO approach is that it might become more complex when handling specific scenarios like individual post pages or filtered subscriptions or just a lof of subscriptions. With server components, we could set up targeted subscriptions right where they're needed using Prisma's filtering.
I'd love to understand if there are specific technical limitations that would make the Socket.IO approach necessary, or if my server components approach could work with proper implementation?
7 replies