Hacker News new | past | comments | ask | show | jobs | submit | helloworld42024's comments login

You're overcomplicating everything. Websocket endpoints. Simple.


...and that oversimplifies everything. Yes, websockets to the browser are likely to be a piece of the answer. But a server needs to maintain the session for the websocket and send messages. And that server needs to subscribe to data updates in the database... while also respecting auth of the current user.

It is certainly a problem with an achievable solution, but it is not simple.


In his initial message, the original poster provided a link to Supabase, which integrates PostgreSQL with PostgREST out of the box. This setup automatically offers websocket server functionality:

1. The websocket server, database data subscriptions, and all session management are consolidated in this layer.

2. Updates to data are efficiently managed using a built-in PostgreSQL function.

3. User authentication is managed via React, employing either JWT or OAuth.

As I mentioned earlier, it's quite simple.


Agree.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: