I want to do is PUSH
through jQuery when my mongodb adds an entry. I saw a lot of jQuery plugins out there, but they do LONG POLLING
not PUSH
.
I am very keen to know how this is happening here (if you will open two different windows and try to chat you will know)
This guy wrote this sample code.
He is using prototype.js
, and I saw in backend code, there is nothing special. Just MySQL select statements, but whenever the MySQL database changes prototype comet object responses to that.
Can we do something similar in jQuery? I belive this is not polling but PUSH
through prototype.js
.
Or is it like prototype is connected to socket? Sorry, I have not much idea about what sockets are, but what I really want to do is PUSH
through jQuery when my mongodb adds an entry.