0

Can anyone suggest how I might detect when a node has been updated via jquery?

I know jquery is a client-side technology but I really need to utilize jquery(ajax) to alert my users when a node is updated.

1
  • Do you mean a particular node or any node? The latter will be pretty tricky but not impossible
    – Clive
    Commented Nov 14, 2011 at 17:49

1 Answer 1

1

In the classic HTTP model, the server is passive and can only return information to the client when it request it. So, in this model, to alert the users when a node is updated, you have to periodically poll the server the ask it if the node has been updated. If you have a lot of clients waiting for the update of a lot of nodes, this can quickly overload your web server with too much request to handle.

Today, the best solution for this kind of requirements is to use WebSockets or a similar full-duplex technologies. Drupal and PHP are not designed to serve a WebSockets. Technologies like node.js and Socket.IO, or APE are more suited.

The Node.js integration module integrates node.js and Socket.IO in a easy to use solution. It provides an API to easily implements your need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.