Propagating posgresql updates

I am new to Vaadin, so hello comunity :slight_smile:

I am designing small management application, I will probably use direct access to database via JPA, etc.

But there are also some records (reported errors, etc.) which on the insert I would like to stream directly to the web client. As my solution is based on the PostgreSQL, I would like to utilize NOTIFY capabilities and started thinking instead of routing them trough the server to client, that I will let the client side directly connect via WebSocket to PostgreSQL queue.

In Java there is new JDBC driver which support this, but as far as I know it allows direct websocket connection.

Does anyone have experience with this kind of streaming client directly to postgredb via websocket?

I think this is most efficient solution.

Just my two cents: While that sounds possible, it also seems like it might be quite tricky to get it working right. You’d be potentially spending a lot of effort to do things in a non-standard way - the standard way in this case would be listening to the notifications on server side and updating them to the UI with Push. I’d recommend at least trying it out with Push first and only start looking into an alternative solution like that if it looks like that the original way doesn’t perform well enough by some metric.

Best regards,