Hi all,
it seems that my coined feature name "synchronous notification" is confusing everybody. I hope to explain it better now.
Synchronous notification is the name I gave to Npgsql implementation of Listen/Notify support where you (the Npgsql client) receive a notification message "synchronously" or "almost" at same time the notification is sent from server. This contrasts to what Npgsql had before: the client would just receive any notification on next iteration with server as this was when we processed the notification server sent us.
One possible solution for this problem before was the client to keep "polling" the server with empty commands in order to force an interation with server and receive the notification. Now, behind the scenes, Npgsql creates a new thread which keeps polling server for you with Socket.Poll() method while client is idle. This way, as soon as notification arrives in Npgsql socket, it can promptly process notification and deliver it to client with no intervention of client as before. This will help very much client applications which just stays there and wants to receive notifications from server without any modification.
It is disabled by default. You can enable it by specifying SyncNotification=true in your connection string.
I hope this explanation helps clear what is this feature of Npgsql :)
Please, share what you think about this feature and if it is working for you like it should.
it seems that my coined feature name "synchronous notification" is confusing everybody. I hope to explain it better now.
Synchronous notification is the name I gave to Npgsql implementation of Listen/Notify support where you (the Npgsql client) receive a notification message "synchronously" or "almost" at same time the notification is sent from server. This contrasts to what Npgsql had before: the client would just receive any notification on next iteration with server as this was when we processed the notification server sent us.
One possible solution for this problem before was the client to keep "polling" the server with empty commands in order to force an interation with server and receive the notification. Now, behind the scenes, Npgsql creates a new thread which keeps polling server for you with Socket.Poll() method while client is idle. This way, as soon as notification arrives in Npgsql socket, it can promptly process notification and deliver it to client with no intervention of client as before. This will help very much client applications which just stays there and wants to receive notifications from server without any modification.
It is disabled by default. You can enable it by specifying SyncNotification=true in your connection string.
I hope this explanation helps clear what is this feature of Npgsql :)
Please, share what you think about this feature and if it is working for you like it should.
Comments