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 https://github.com/impossibl/pgjdbc-ng, 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.